Closed cotyreh closed 2 weeks ago
I can't run your code and spx <- quantmod::getOptionChain("^SPX")
works for me. Can you give me a minimal example that only uses quantmod functions so I investigate?
Also, Yahoo seems to be having issues with historical price data too (#417), so this may not be something I can fix in quantmod.
It looks like you are correct. I tried this morning to recreate the issue and it seems to have resolved itself.
Closing this because it was an issue on Yahoo's end. Nothing to do in quantmod.
Description
I think yahoo finance is returning empty data when retrieving options. I have this function below in a script that will sort out most issues early on and print NAs if there is some connection/server issue that will result in missing data:
Normally, this will catch most issues. As of a few days ago, however, yahoo is sometimes not returning data even when making a successful connection. I noticed I was missing data, but my script wasn't writing NAs into those spots to tell me one of the normal errors had occurred. This is what is printed in the log when that happens:
It looks like yahoo returns an empty data frame. The script will go on to calculate the greeks if there wasn't an error and it has the data to work with, but in these cases it is moving on thinking it has data but failing later on. It runs once every minute and rarely found issues like this for a couple months now. This is a new one that has been happening every 5 to 10 minutes for a few days. I imagine it's something happening on yahoo's end?