与yahoo的quantmod链接是否停止工作?

时间:2017-05-18 15:13:39

标签: r quantmod

我每周使用一次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'

1 个答案:

答案 0 :(得分:3)

引用this quantmod issue thread,这是源自雅虎的问题,而且在quantmod的开发版本中有一个修复。在CRAN上发布该修复程序之前,您可以尝试安装开发版本。

quantmod readme中的安装说明:

所述
remotes::install_github("joshuaulrich/quantmod", ref="157_yahoo_502")
# or
devtools::install_github("joshuaulrich/quantmod", ref="157_yahoo_502")
相关问题