Skip to content

Another new bug with quantmod

5 messages · Cedrick Johnson, Noah Silverman, Mark Breman +1 more

#
Hi,

the getOptionChain function has been working perfectly, up until
tonight.  Now the exact same code fails.

AAPL.OPTS <- getOptionChain("AAPL", NULL)
Error in calls[, 2] : incorrect number of dimensions

Any ideas?

Here is my current session info

R version 2.12.0 (2010-10-15)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    

other attached packages:
 [1] fOptions_2110.78   fBasics_2110.79    timeSeries_2130.90
timeDate_2130.91   mda_0.4-1        
 [6] class_7.3-2        MASS_7.3-8         nnet_7.3-1        
quantmod_0.3-14.1  TTR_0.20-2       
[11] xts_0.7-5          zoo_1.6-4          Defaults_1.1-1   

loaded via a namespace (and not attached):
[1] grid_2.12.0     lattice_0.19-13 tools_2.12.0
#
Seems to be working here

$`Nov 2010`
$`Nov 2010`$calls
                     Strike  Last   Chg   Bid   Ask   Vol    OI
AAPL101126C00230000    230 79.40  0.00 83.95 85.85    32    95
AAPL101126C00240000    240 68.60  0.00 73.50 75.40    17    15
AAPL101126C00250000    250 58.30  0.00 63.95 65.35    25    25
AAPL101126C00260000    260 47.75  0.00 54.00 55.80    47   120
<snip>


.. using xts 0.7.5 as well.. Perhaps was an intermittent Y! outage?

-c
#
The error appears when you call the function with the "Exp = NULL" flag

getOptionChain("APPL")  WORKS
getOptionChain("AAPL", Exp = NULL)  FAILS.
On 11/24/10 9:46 PM, Johnson, Cedrick W. wrote:
#
Hi Noah,

The formatting for the source from Yahoo has changed - so the quantmod
code needed to remove the workaround introduced back in late August
that handled the lack of front month being explicitly available to
parse;  i.e. the yahoo has added the front month link back in.

More disconcerting is the fact that this worked for Mark.

I fear yahoo does some pretty serious load balancing that may or may
not be 100% consistent across servers.  So some get the benefit of
breaking and some do not.  I think this eventually settles down - but
for now I have patched the sources to work with the 'new' html.

rev 556 on R-forge.

Best,
Jeff

Happy Thanksgiving to those celebrating today!
On Thu, Nov 25, 2010 at 3:23 AM, Mark Breman <breman.mark at gmail.com> wrote: