我正尝试使用getSymbols.tiingo
中的quantmod
下载120份S&P 500股票数据,但返回的Error:
没有任何解释。当我根据收盘价进行合并时,在数据框中可获得66只股票。有人知道问题出在哪里吗?
library(quantmod)
StockData = new.env()
tickers <- as.character(read.csv('http://trading.chrisconlan.com/SPstocks_current.csv', stringsAsFactors = F,header = F)[1:120,1])
StartDate = as.Date("2018-01-01")
EndDate = as.Date("2018-08-31")
API = "API"
getSymbols.tiingo(tickers, env = StockData, from = StartDate, to = EndDate, api.key = API)
Error:
Stock_Adj_Data <- do.call(merge, eapply(StockData, Cl))
ncol(Stock_Adj_Data)
[1] 66