[R] Problem getting Option Quotes
Joshua Ulrich
josh.m.ulrich at gmail.com
Sat Oct 25 19:03:12 CEST 2014
On Thu, Oct 23, 2014 at 9:42 AM, Robert Sherry <rsherry8 at comcast.net> wrote:
>
> I am using R and quantmod to get stock and option quotes. However, it has
> stopped working. I expect the following
> function call to produce a list of options:
> getOptionChain( "XOM", Exp = "2015-01-20" )
> However, I get the following error messages:
> Error in lapply(strsplit(opt, "<tr>"), function(.) gsub(",", "",
> gsub("N/A", :
> subscript out of bounds
> In addition: Warning message:
> In readLines(paste(paste("http://finance.yahoo.com/q/op?s=", Symbols, :
> incomplete final line found on
> 'http://finance.yahoo.com/q/op?s=XOM&m=2015-01-20+Options'
>
> Has something changed? Am I doing something wrong?
>
Yahoo changed the webpage the data are scraped from. The function
will have to be re-written to scrape from the new page.
> Thanks
> Bob
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
More information about the R-help
mailing list