yahoo 的 quantmod link 是否停止工作?
Does the quantmod link to yahoo stop working?
我每周使用一次 quantmod,今天我得到了一个我不习惯得到的错误:
spy<-getSymbols(c("SPY"), src = 'google', from = '1990-01-01', auto.assign = T)
SPY<-cbind(SPY)
dim(SPY)
spy<-getSymbols(c("SPY"), src = 'yahoo', from = '1990-01-01', auto.assign = T)
**Error in download.file**(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=SPY&a=0&b=01&c=1990&d=4&e=18&f=2017&g=d&q=q&y=0&z=SPY&x=.csv'
In addition: Warning message:
In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=SPY&a=0&b=01&c=1990&d=4&e=18&f=2017&g=d&q=q&y=0&z=SPY&x=.csv': HTTP status was '504 Maximum Transaction Time Exceeded'
参考this quantmod issue thread,这是一个源自Yahoo的问题,在quantmod的开发版中已经修复。在 CRAN 上发布该修复程序之前,您可以尝试安装开发版本。
如quantmod readme中的安装说明所述:
remotes::install_github("joshuaulrich/quantmod", ref="157_yahoo_502")
# or
devtools::install_github("joshuaulrich/quantmod", ref="157_yahoo_502")
我每周使用一次 quantmod,今天我得到了一个我不习惯得到的错误:
spy<-getSymbols(c("SPY"), src = 'google', from = '1990-01-01', auto.assign = T)
SPY<-cbind(SPY)
dim(SPY)
spy<-getSymbols(c("SPY"), src = 'yahoo', from = '1990-01-01', auto.assign = T)
**Error in download.file**(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=SPY&a=0&b=01&c=1990&d=4&e=18&f=2017&g=d&q=q&y=0&z=SPY&x=.csv'
In addition: Warning message:
In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=SPY&a=0&b=01&c=1990&d=4&e=18&f=2017&g=d&q=q&y=0&z=SPY&x=.csv': HTTP status was '504 Maximum Transaction Time Exceeded'
参考this quantmod issue thread,这是一个源自Yahoo的问题,在quantmod的开发版中已经修复。在 CRAN 上发布该修复程序之前,您可以尝试安装开发版本。
如quantmod readme中的安装说明所述:
remotes::install_github("joshuaulrich/quantmod", ref="157_yahoo_502")
# or
devtools::install_github("joshuaulrich/quantmod", ref="157_yahoo_502")