[R-SIG-Finance] quantmod getOptionChain error on yahoo
Rock Pereira
pere|r@_rock @end|ng |rom hotm@||@com
Fri May 3 01:58:27 CEST 2019
I have downloaded option chains daily, for over a year, using a cronjob with Rscript. But a few days ago, I got this error:
"
Error in data.frame(Strike = strike, Last = lastprice, Chg = change, Bid = bid, : object 'volume' not found
"
I'd like some help with this error. My code is below
-------
library(quantmod)
symbols <- as.character( read.csv("list_OPTIONS.txt", header=FALSE, sep=",", stringsAsFactors = FALSE)[,1] )
options <- sapply(symbols, function(s) getOptionChain(s, Exp=NULL, src='yahoo'))
rdsFilename <- paste0("opt_", format(Sys.Date(),"%Y%m%d"), ".rds")
saveRDS(options, rdsFilename)
------
Thanks,
Rock Pereira
[[alternative HTML version deleted]]
More information about the R-SIG-Finance
mailing list