0
$\begingroup$

Something go wrong with FinancialData[]

In version 11.3, when I import data like

FD = FinancialData["AS:AALB", "Close", {{2017, 01, 01}, {2019, 03, 31}}]

The result is a dataset like: {{2017, 1, 2}, 31.13}, {{2017, 1, 3}, 31.005}, {{2017, 1, 4}, 30.965}

In version 12 the result is a TimeSeries.

After the import, I usualy export the data to a SQL database. Now I have to use different steps. The problem is that the new version is not stable and each time I want to manipulate the dataset before export, my notebooks quit.

anybody recognise this issue?

$\endgroup$
  • 1
    $\begingroup$ Michiel, you describe the output of a TimeSeries but then you talk about difficulties exporting a Dataset. Could you give an example for what exactly does not work (so it can be reproduced)? On what machine are you? $\endgroup$ – gwr Apr 29 at 15:43
2
$\begingroup$

Have you tried wrapping the TimeSeries with Normal?

By which I mean, something like this:

FD = FinancialData["AS:AALB", "Close", {{2017, 01, 01}, {2019, 03, 31}}];

Normal[FD] /. {d_DateObject :> DateList[d][[;; 3]], q_Quantity :> QuantityMagnitude[q]}

Yields:

{{{2017, 1, 2}, 31.13}, {{2017, 1, 3}, 31.005}, {{2017, 1, 4}, 
  30.965}, {{2017, 1, 5}, 31.035}, {{2017, 1, 6}, 
  30.745}, {{2017, 1, 9}, 30.75}, {{2017, 1, 10}, 
  30.49}, {{2017, 1, 11}, 30.56}, {{2017, 1, 12}, 30.37},...
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.