Error in quantmod getOptionChain()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in quantmod getOptionChain()

Rock Pereira
I got an error today when downloading the full option chain. It worked fine on Friday
SPY20130422 <- getOptionChain("SPY", Exp = NULL)Error in allcontracts[dn, 3] : incorrect number of dimensions
I'm using R 3.0 on Windows 7 x32.
Thanks.
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.
Reply | Threaded
Open this post in threaded view
|

Re: Error in quantmod getOptionChain()

Jeffrey Ryan
Hi Rock,

The issue is likely with Yahoo! itself.  Depending on where your query
hits, you can occasionally get flaky responses.

> packageVersion('quantmod')
[1] ‘0.4.0’
> getOptionChain("SPY")
$calls
                    Strike  Last   Chg Bid Ask   Vol     OI
SPY130426C00140000   140.0 15.94  0.96  NA  NA    20     95
SPY130426C00145000   145.0 10.30  0.03  NA  NA     3     83
SPY130426C00146000   146.0  9.49  0.00  NA  NA     1    316
SPY130426C00147000   147.0  8.56  0.00  NA  NA    27    218
SPY7130426C00147000  147.0  7.40  0.00  NA  NA   167    167
SPY130426C00148000   148.0  7.32  0.00  NA  NA   129    405
SPY130426C00149000   149.0  6.36  0.00  NA  NA   210    412
SPY130426C00150000   150.0  5.57 -0.10  NA  NA     3    932

Best,
Jeff


On Mon, Apr 22, 2013 at 6:44 PM, Rock Pereira <[hidden email]>wrote:

> I got an error today when downloading the full option chain. It worked
> fine on Friday
> SPY20130422 <- getOptionChain("SPY", Exp = NULL)Error in allcontracts[dn,
> 3] : incorrect number of dimensions
> I'm using R 3.0 on Windows 7 x32.
> Thanks.
> 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.
>


--
Jeffrey Ryan
[hidden email]

www.lemnica.com

R/Finance 2013: Applied R in Finance
May 17, 18 Chicago, IL
www.RinFinance.com

        [[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.