[R-SIG-Finance] But in quantmod function

Jeff Ryan jeff.a.ryan at gmail.com
Tue Nov 16 08:55:57 CET 2010


Hi Noah,

An odd combo of bug and no information.  The bug is the translation of
^ to %5E on the HTML parsing.  The no information stems from the lack
of contract information for some symbols (^DJI has no options data
that I see on Yahoo: see http://finance.yahoo.com/q?s=^DJI ).

A patch had been committed on R-forge - which I managed to do about 30
minutes after your original email, just didn't get a chance to ping
back the list.

Revision 553 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 16 02:19:36 2010 UTC (5 hours, 26 minutes ago) by jryan
File length: 2702 byte(s)
Diff to previous 548
o  getOptionChain(.yahoo) now handles leading ^ in
   yahoo symbology (e.g. ^RUT).  Thanks to Noah Silverman
   for the report
o  cleaned up missing docs for new bid/ask functionality

As far as reports/patches/ideas go, certainly email me directly or the
list (which is obviously quite happy to reply ;-) ) if/when you catch
something askew.  The power of OSS is the community interaction in my
opinion.

Thanks,
Jeff

-- 
Jeffrey Ryan    |    Founder    |    jeffrey.ryan at lemnica.com

www.lemnica.com


On Mon, Nov 15, 2010 at 7:06 PM, Noah Silverman <noah at smartmediacorp.com> wrote:
> Hi,
>
> I think I've found a bug in the quantmod library.
>
> The function "getOptionChain" fails when fetching the chain of an index
> (S&P, DJIA, etc.)
> (Note:  It works beautifully for options on stocks.)
>
> chain <- getOptionChain("^GSPC", Exp=NULL)
> Error in strsplit(opt, "<tr.*?>")[[1]] : subscript out of bounds
>
> chain <- getOptionChain("^RUT", Exp=NULL)
> Error in from:to : NA/NaN argument
>
>
> Any ideas?
>
> -N
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch 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.
>



-- 
Jeffrey Ryan
jeff.a.ryan at gmail.com



More information about the R-SIG-Finance mailing list