MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Possible Bug in Dates Supplied with FinancialData Function

Hello everyone,

Not sure whether I've misunderstood how FinancialData works, but it 
seems to me that the wrong date is attached to prices if they are 
downloaded using a monthly frequency.

I used the following start and end dates.

	seriesStartDate = {2009, 01, 01};
	seriesEndDate = {2011, 6, 30};

I download daily prices for Apple Inc. by running

	dailyPrices = FinancialData["AAPL", {seriesStartDate, seriesEndDate, =93Day=94}]

If I then download monthly prices by running

	monthlyPrices = FinancialData["AAPL", {seriesStartDate, seriesEndDate, =93Month=94}]

the observations are dated at the beginning of each month but correspond to the price on the last day of the month.  The price of Apple on 2009-01-30, for example, when downloaded as daily is $90.13 but when downloaded as monthly, that same price is date stamped 2009-01-02, that is, at the beginning of the month.  So, when downloading using a monthly frequency, the date stamps may mislead you into thinking that you are getting beginning-of-month prices when, in fact, you are getting end-of-month prices.

I almost always need end-of-month prices, so to get the correct dates, I download as daily and extract the last daily observation for each month

	GatherBy[dailyPrices, #[[1, {1, 2}]] &]
	Last /@%

You could do the same using Cases.



  • Prev by Date: Re: Using Plot3D; rotating the plot but, getting a different image after exporting.
  • Next by Date: Re: Transforming an expression to publication form
  • Previous by thread: Re: Inverse of Interpolating Function?
  • Next by thread: ExampleData[{"Geometry3D", "Torus"}]