Hello all,
I am wondering how to export total return data into a CSV acceptable to Multicharts. The data needs to be in Date,Open,High,Low,Close,Volume. Specifically, date can not have commas delimiting years, months, and days (I would prefer YYYY/MM/DD). I am new to Mathematica and have tried converting the table to strings and trying to flatten the table before partitioning it. Any help would be greatly appreciated.
Thanks.
Hi Ashish,
as you say the problem is that when you save the date in the standard format with commas, a CSV file will think of them as individual “columns”.
A way to get around this is to format the date using DateString. Suppose you have downloaded data:
list = FinancialData["GE", "Feb. 5, 2014"];
this variable now contains the date (separated by commas) and the value. Like this
This next command formats the date into anything you like:
data = {DateString[#[1], {“Year”, “/”, “Month”, “/”, “Day”}], #[2]} & /@ list;
You can then safely export and import that data set in CSV format.
Cheers,
Marco

