Hi guys!
I am trying to download historical information on the S&P 500 through the function BatchGetSymbols, but I am getting an error message. Honestly I have no idea on how to fix it, could you please help me out on this? I need to deliver my paper today
Here's the code that I am using:
sp=BatchGetSymbols('^GSPC', first.date='2002-01-02',last.date='2022-01-31')
Here's what I am getting as error:
Running BatchGetSymbols for:
tickers =^GSPC
Downloading data for benchmark ticker
^GSPC | yahoo (1|1) | Not Cached - Error in download..
^GSPC | yahoo (1|1) | Not Cached - Error in download..Error in stop_vctrs()
:
! Input must be a vector, not NULL.
Run rlang::last_error()
to see where the error occurred.
Warning messages:
1: Unknown or uninitialised column: ticker
.
2: Unknown or uninitialised column: threshold.decision
.
3: Unknown or uninitialised column: ticker
.
4: Unknown or uninitialised column: price.adjusted
.
Thank you so much!