[R-SIG-Finance] adjustOHLC discrepancy

Jim Green student.northwestern at gmail.com
Wed Sep 19 02:25:50 CEST 2012


Dear List:

I expect that use.Adjusted=TRUE or FALSE wouldn't affect the adjusted
close.  But running the following code proved I was wrong.

> getSymbols('C',src='yahoo')
[1] "C"
> head(adjustOHLC(C))
             C.Open   C.High    C.Low  C.Close C.Volume C.Adjusted
2007-01-03 190.8698 192.9960 187.6464 189.4639  2282100     498.66
2007-01-04 189.4639 192.5502 187.6464 188.8123  1658700     496.94
2007-01-05 188.6066 188.7780 186.7548 187.8179  1317900     494.32
2007-01-08 187.2349 189.1210 186.2061 188.7780  1236900     496.85
2007-01-09 188.6409 189.1210 185.8289 187.1320  1963000     492.52
2007-01-10 186.1032 186.8577 185.0059 185.6232  1744900     488.55
> head(adjustOHLC(C,use.Adjusted=TRUE))
             C.Open   C.High    C.Low C.Close C.Volume C.Adjusted
2007-01-03 502.3605 507.9563 493.8765  498.66  2282100     498.66
2007-01-04 498.6548 506.7777 493.8714  496.94  1658700     496.94
2007-01-05 496.3958 496.8471 491.5221  494.32  1317900     494.32
2007-01-08 492.7886 497.7525 490.0809  496.85  1236900     496.85
2007-01-09 496.4912 497.7548 489.0903  492.52  1963000     492.52
2007-01-10 489.8136 491.7992 486.9254  488.55  1744900     488.55

by using adjustOHLC, the C.close value is not the same as C.Adjusted
provided directly by yahoo.
             C.Open   C.High    C.Low  C.Close C.Volume C.Adjusted
2007-01-03 190.8698 192.9960 187.6464 189.4639  2282100     498.66

I think adjustOHLC and adjRatios are theoretically correct and  I
wonder where this discrepancy comes from. Is it possible Yahoo uses a
different method to calculate its adjusted close.

Which adjusted close would everyone recommend? the raw close adjusted
by adjustOHLC or the adjusted close provided by yahoo?

Thanks!
Jim.



More information about the R-SIG-Finance mailing list