On Thu, May 2, 2019 at 6:58 PM Rock Pereira <[hidden email]> wrote:
> 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
> 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 for the example. Next time, please provide a reproducible
example that others can run. We don't have your file
> Rock Pereira
> [[alternative HTML version deleted]]
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance > -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.