getSymbols总是抛出错误。我错过了什么?

时间:2013-09-18 09:11:19

标签: r

只需复制一个简单的代码。但getSymbols总是会抛出错误:

# Set initial values
initDate='2002-07-31'
endDate='2012-10-31'
initEq=100000

start<-"2005-01-01"
end<- format(Sys.Date(),"%Y-%m-%d") # yyyy-mm-dd 

# Set currency and instruments
currency("USD")
stock("IEF",currency="USD",multiplier=1)
stock("SPY",currency="USD",multiplier=1)

# Load data with quantmod
print("Loading data")
symbols = c("IEF", "SPY")
getSymbols(symbols, from=start, to=end) 

错误:

  

警告讯息:
      1:在download.file中(粘贴(yahoo.URL,“s =”,Symbols.name,“&amp; a =”,from.m,:
)         下载长度108057!=报告长度200
      2:在download.file中(粘贴(yahoo.URL,“s =”,Symbols.name,“&amp; a =”,from.m,:
)         下载长度120958!=报告长度200

为什么?

0 个答案:

没有答案