Message Boards Message Boards

Manipulate financial data before exporting it?

The answer provided by rhermans at StackExchange was perfect!

Module[
 {
  names = {"GS", "MS", "BAC"},
  dates = {{2000, 1, 1}, {2000, 1, 20}},
  filename = "spreadsheet.xls",
  data
  },
 data = Map[
   Transpose[
     Prepend[FinancialData[#, 
       dates], {# <> " date", # <> " value"}]] &, names];
 File@Export[filename, Transpose[Flatten[data, 1]]]
 ]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract