Hello there! I am trying to use BatchGetSymbols to download financial data for a particular list of tickers, unfortunately, I get the message " Error in download.." for the vast majority of tickers. I've found an old post with a similar issue but the solution there was just to wait and this doesn't seem to work in this case.
This is the code I am using. I have included just the first 4 tickers as the problem persists regardless of the number of tickers I include. With these four I get the error for the first three while I am able to download the last one
You have to put quotes in dates and specify the appropriate format to convert from character to Date, as.Date("2015-30-09", format = "%Y-%d-%m"), alternatively you can put in descending format like as.Date("2015-09-30").
library(BatchGetSymbols)
tick<-c("AAP","ABT","AFL","AIG")
b.out<-BatchGetSymbols(tickers = tick,
first.date =as.Date("2015-30-09", format = "%Y-%d-%m"),
last.date = as.Date("2020-30-09", format = "%Y-%d-%m"))
#>
#> Running BatchGetSymbols for:
#>
#> tickers =AAP, ABT, AFL, AIG
#> Downloading data for benchmark ticker
#> ^GSPC | yahoo (1|1) | Not Cached | Saving cache
#> AAP | yahoo (1|4) | Not Cached | Saving cache - Got 100% of valid prices | Good stuff!
#> ABT | yahoo (2|4) | Not Cached | Saving cache - Got 100% of valid prices | Good stuff!
#> AFL | yahoo (3|4) | Not Cached | Saving cache - Got 100% of valid prices | You got it!
#> AIG | yahoo (4|4) | Not Cached | Saving cache - Got 100% of valid prices | Good stuff!
It would be good to run the code with reprex to make feedback easier.