Skip to content
Prev 12489 / 63461 Next

Yahoo bug in tseries::get.hist.quote and its::priceIts

Dirk Eddelbuettel <edd@debian.org> writes:
Er, how does this affect get.hist.quote? I see some flakiness, but the
basic conversion appears to work:
trying URL
`http://chart.yahoo.com/table.csv?s=spc&a=0&b=01&c=1998&d=3&e=24&f=2004&g=d&q=q&y=0&z=spc&x=.csv'
Error in download.file(url, destfile, method = method) :
        cannot open URL
`http://chart.yahoo.com/table.csv?s=spc&a=0&b=01&c=1998&d=3&e=24&f=2004&g=d&q=q&y=0&z=spc&x=.csv'
In addition: Warning message:
cannot open: HTTP status was `404 Not Found'
trying URL
`http://chart.yahoo.com/table.csv?s=spc&a=0&b=01&c=1998&d=3&e=24&f=2004&g=d&q=q&y=0&z=spc&x=.csv'
Content type `application/octet-stream' length unknown
opened URL
.......... .......... .......... .......... ..........
.......... .......... ..
downloaded 72Kb

time series starts 1998-01-02
time series ends   2004-04-01

(Yes, that's the same URL, a few seconds later!)
How about this?
`data.frame':   1586 obs. of  7 variables:
 $ Date       : Factor w/ 1586 levels "1-Apr-02","1-Ap..",..: 786 732 681 629 524 368 315 263 210 157 ...
 $ Open       : num  91.0 90.5 91.2 92.0 91.9 ...
 $ High       : num  91.6 91.5 91.4 92.5 92.3 ...
 $ Low        : num  90.4 89.7 90.7 90.7 91.7 ...
 $ Close      : num  91.3 90.7 91.3 90.7 91.9 ...
 $ Volume     : int  5063200 7988000 4623400 4260200 4159400 1111800 6844200 5316300 5013600 3112600 ...
 $ Adj..Close.: num  91.3 90.7 91.3 90.7 91.9 ...