Skip to main content
edited tags
Link
formatting
Source Link
Brett Champion
  • 20.9k
  • 2
  • 65
  • 122

I'm trying to run a regression using "Fit"Fit on the output of FinancialData["SPY", "Jan. 1, 2011"]FinancialData["SPY", "Jan. 1, 2011"]. However, the dates returned from FinancialDataFinancialData are not in a format that is recognized by Fit..Fit.the The function returns dates in the format {y,m,d}{y,m,d}, and I need the dates to be expressed in decimal form. I'm relatively new to Mathematica, but I've got to believe there's an easy way to transform the list provided by FinancialDataFinancialData into one that has the format of { date in decimal, price}{<date in decimal>, price}. Any guidance would be most appreciated.

I'm trying to run a regression using "Fit" on the output of FinancialData["SPY", "Jan. 1, 2011"]. However, the dates returned from FinancialData are not in a format that is recognized by Fit...the function returns dates in the format {y,m,d}, and I need the dates to be expressed in decimal form. I'm relatively new to Mathematica, but I've got to believe there's an easy way to transform the list provided by FinancialData into one that has the format of { date in decimal, price}. Any guidance would be most appreciated.

I'm trying to run a regression using Fit on the output of FinancialData["SPY", "Jan. 1, 2011"]. However, the dates returned from FinancialData are not in a format that is recognized by Fit. The function returns dates in the format {y,m,d}, and I need the dates to be expressed in decimal form. I'm relatively new to Mathematica, but I've got to believe there's an easy way to transform the list provided by FinancialData into one that has the format of {<date in decimal>, price}. Any guidance would be most appreciated.

Tweeted twitter.com/#!/StackMma/status/212357580503261184
Source Link
RayC
  • 91
  • 1

How can I convert the dates returned by FinancialData into decimal representation?

I'm trying to run a regression using "Fit" on the output of FinancialData["SPY", "Jan. 1, 2011"]. However, the dates returned from FinancialData are not in a format that is recognized by Fit...the function returns dates in the format {y,m,d}, and I need the dates to be expressed in decimal form. I'm relatively new to Mathematica, but I've got to believe there's an easy way to transform the list provided by FinancialData into one that has the format of { date in decimal, price}. Any guidance would be most appreciated.