Why does getSymbols.tiingo return error - RStudio

261 Views Asked by At

I'm trying to download 120 S&P 500 stock data using getSymbols.tiingo from quantmod but it returned Error: without any explanations. When I merge it based on the close price, I get 66 stocks in the data frame. Does anyone know what the problem is?

  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
0

There are 0 best solutions below