Closed milktrader closed 11 years ago
I should have checked this first, but this confirms that it's not the Yahoo api but the yahoo
function that is bugged.
> getSymbols("GLD", from="2010-01-01")
As of 0.4-0, ‘getSymbols’ uses env=parent.frame() by default.
This behavior will be phased out in 0.5-0 when the call will check
getOptions("getSymbols")$env for default value. If NULL, auto.assign will
be set to FALSE. This message is only shown once per session.
[1] "GLD"
> head(GLD)
GLD.Open GLD.High GLD.Low GLD.Close GLD.Volume GLD.Adjusted
2010-01-04 109.82 110.14 109.31 109.80 16224100 109.80
2010-01-05 109.88 110.39 109.26 109.70 14213100 109.70
2010-01-06 110.71 111.77 110.41 111.51 24981900 111.51
2010-01-07 111.07 111.29 110.62 110.82 13609800 110.82
2010-01-08 111.52 111.58 110.26 111.37 15894600 111.37
2010-01-11 113.34 113.59 112.52 112.85 17253000 112.85
The api was defaulting to the first record because it was getting a bogus value for month.
After some debugging it appears the issue with with Yahoo. The
c
field is for the from year value, but it's ignored.