# Viewing the actual Timeseries data of FinancialData Object

How can i get a list of all the entries in FinancialData["SP500", {{2014, 10, 23}, {2016, 10, 22}}] ? I would like to read the actual entries but examples i am seeing has been plotting the data. How can print out the TimeSeries data for the object. Is there a command which will print the properties of an object also?

• try ts = FinancialData["SP500", {{2014, 10, 23}, {2016, 10, 22}}]; Normal @ts or use ts["DatePath"] (See TimeSeries >> Details and Options for the properties you can extract.)
– kglr
Nov 8 '21 at 0:20
• use percentchange instead of percent_change. (Blank (_) has a very special meaning/role in Mathematica.)
– kglr
Nov 8 '21 at 1:40

You can also use the property "FractionalChange" as the second argument to FinancialData to get a time series of percent changes:

fractionalChange = FinancialData["SP500",
"FractionalChange",
{{2014, 10, 23}, {2016, 10, 22}}]


The first 10 rows of fractionalChange:

Take[Normal @ fractionalChange, 10] // Column


DateListPlot[fractionalChange]


Yet another way is to use built-in FinancialIndicator "RateOfChange" to get a time series object of percent changes:

ts = FinancialData["SP500", {{2014, 10, 23}, {2016, 10,   22}}];

rateOfChange = FinancialIndicator["RateOfChange", 2] @ ts


First 10 rows:

Take[Normal @ rateOfChange, 10] // Column


The two series rateOfChange and fractionalChange have the same path of {time, value} pairs if we take the QuantityMagnitude of values in fractionalChange:

rateOfChange["Path"] ==
TimeSeriesMap[QuantityMagnitude, fractionalChange]["Path"]

True

Clear["Global*"]

\$Version

(* "12.3.1 for Mac OS X x86 (64-bit) (June 19, 2021)" *)

ts = FinancialData["SP500", {{2014, 10, 23}, {2016, 10, 22}}];

data = Normal[ts][[All, 2]];


Note that variable names cannot contain a Blank (_)

percentChange = 100 Differences[#]/Most[#] & @data;

DateListPlot[
Transpose[{Rest[Normal[ts][[All, 1]]], percentChange}],
ImageSize -> Large]


• Thanks for your detailed answer. I have 1 question, in percentChange` there is a space between 100 and Differences. Why is there no * (multiplication sign there). Just trying to understand the syntax which is used in Mathematica Nov 8 '21 at 1:40
• A space is an implied multiplication. Nov 8 '21 at 1:43