Skip to content
Prev 13873 / 15274 Next

adjustOHLC.R issues

On Mon, Apr 11, 2016 at 8:48 PM, Ernie Stokely <wizardchef at gmail.com> wrote:
The adjusted close from Yahoo used to only have 2 decimal places, so
what you describe would have been subject to massive loss of accuracy
when there were many adjustments.  That's the entire reason I wrote
TTR::adjRatios and why quantmod::adjustOHLC exists.

That said, they provide more decimal places now, and adjustOHLC
provides a use.Adjusted argument, so you could have used the
adjustments you describe above by calling: adjustOHLC(VTI,
use.Adjusted=TRUE).
Works fine for me using the latest quantmod and TTR on CRAN:

R> getSymbols("VTI", from="2006-03-01")
[1] "VTI"
R> first(VTI)
           VTI.Open VTI.High VTI.Low VTI.Close VTI.Volume VTI.Adjusted
2006-03-01   128.15    128.9  127.79     128.7     216400     52.56795
R> first(adjustOHLC(VTI))
           VTI.Open VTI.High  VTI.Low VTI.Close VTI.Volume VTI.Adjusted
2006-03-01  52.3433 52.64964 52.19626  52.56795     216400     52.56795

Perhaps you're using an older version of one/both packages?
Yahoo describes their adjusted close column here:
https://help.yahoo.com/kb/finance/SLN2311.html