Problem with yahoo history data

Discussion in 'Data Sets and Feeds' started by kiev, Apr 11, 2013.

  1. kiev


    Yahoo history data only offers adjusted close, but I want adjusted open, high etc., so I try to calculate adj open from other data yahoo offered.

    I begin from "C", and compare the difference btw adj close with close, I find it's weird. The difference becomes larger and larger when time goes back from now. The charts btw time and difference like this:

    -----------------0.01 0.01 0.01 0.01 0.01
    ------------------------------------------------0.02 0.02 0.02 0.02 0.02
    -------------------------------------------------------------------------------0.3 0.3

    From June/1/2011 to now, there is no split with C, only dividend. The dividend is 0.01 each time.

    In my opinion, the difference btw adj close and close should be dividend, the difference begins from declaration date of dividend and end at ex date, after ex date, the difference should goes back to zero. The charts btw time and difference should look like this:

    ----------------0.01 0.01 0.01 0.01 0.01--------------

    I use "-" to represent space.

    In yahoo history data, the difference(adj close vs close) begins from last ex date until next ex date, and the difference turns larger and larger when you look data backward. But I think the difference should not exceed dividend(0.01), and sometime the difference should be zero.

    Can anyone explain this?
  2. IMO, the above assumption is the issue.

    Before the ex-date, the holder of the stock is entitled to receive the dividend; after the ex-date, the holder is not entitled to receive it. Therefore, on the ex-date the share theoretically becomes less valuable.

    To adjust for this change in price, I believe Yahoo uses a multiplicative factor of (Close(T-1) - d)/(Close(T-1)) applied to all prices before T. (A multiplicative factor - rather than a straightforward subtraction - in order to keep returns the same pre- and post-adjustment). So, depending on how the stock price moved over this time, you may or may not see a constant difference between pre- and post adjustment prices.

    Furthermore, the adjustment needs to be applied again each time the stock went ex-date in the past. So the multiplicative factors from each ex-date end up being applied on top of each other. So, again, you are unlikely to see a difference that is constant across all time.
  3. hft_boy


  4. kiev



    It seems you are right, but why Yahoo processes all the data before T (ex date)instead of only from declare date to ex date?
  5. kiev


    so to calculate adj open, adj high... is pretty simpler than what i thought before.
  6. Careful with Yahoo Finance data, it is known to have some pretty egregious errors in it. For example, ITT on 20111101:

    Adjusted price jumps from ~$18 to ~$90 which can royally screw up your backtest.

    This is just one example, there are dozens or maybe even hundreds of other ones. I've personally encountered about a dozen such errors...

    I recommend using the free daily stock data from QuantQuote which can be found here:

    Search the page for 'free' and click on the 'Free Data' tab. It's exactly what you want, the OHLCV columns are all split/dividend adjusted, and doesn't have the multitude of errors Yahoo has.
  7. jharmon


    You should never adjust on anything but dates before the exdate.

    The declare, record and payment date make _no_ difference to your price data.