Skip to content
Prev 10483 / 15274 Next

yahoo dates

On Mon, 9 Jul 2012, G See wrote:

            
I'm not sure but maybe that is still too early. The problem is real and 
occurs for me "now" (around 10:00 GMT), both for individual stocks and 
indexes:

R> library("quantmod")
R> getSymbols(c("^GSPC", "IBM"))
R> tail(GSPC, 3)
            GSPC.Open GSPC.High GSPC.Low GSPC.Close GSPC.Volume GSPC.Adjusted
2012-07-06   1367.09   1367.09  1348.03    1354.68  2745140000       1354.68
2012-07-09   1354.66   1354.87  1346.65    1352.51   399252300       1352.46
2012-07-09   1354.66   1354.87  1346.65    1352.46  2904860000       1352.46
R> tail(IBM, 3)
            IBM.Open IBM.High IBM.Low IBM.Close IBM.Volume IBM.Adjusted
2012-07-06   193.92   193.94  189.74    191.41    4952900       191.41
2012-07-09   190.66   191.00  188.05    189.65    3569800       189.67
2012-07-09   190.76   191.00  188.05    189.67    3988100       189.67

Note the last line in both cases, especially the volume. The same is 
visible, of course, at the Yahoo! Finance site:

http://finance.yahoo.com/q/hp?s=^GSPC+Historical+Prices
http://finance.yahoo.com/q/hp?s=IBM+Historical+Prices

Users of Yahoo! Finance also complained about this in the user forum. But 
as nobody could offer a good explanation for this, we implemented a patch 
in tseries' get.hist.quote() that omits the last observation in case its 
date is dupblicated:

R> library("tseries")
R> tail(get.hist.quote("IBM"), 3)
              Open   High    Low  Close
2012-07-05 194.88 196.85 193.63 195.29
2012-07-06 193.92 193.94 189.74 191.41
2012-07-09 190.76 191.00 188.05 189.67
Warning message:
In get.hist.quote("IBM") : first date duplicated, first instance omitted

Best,
Z