[R-SIG-Finance] getOptionChain returns NULL data
Jeff Ryan
jeff.a.ryan at gmail.com
Sun Mar 7 05:18:53 CET 2010
The quantmod on R-forge solves this issue (the OCC's new OSI key
initiative + yahoo = havoc).
Your other issue is that there is no 2010-05 exp... There is 04 and
07 though...
You're sessionInfo or packageDescription output would typically be
useful in future emails.
HTH,
Jeff
> getOptionChain("AMZN",Exp="2010-04")
$calls
Strike Last Chg Bid Ask Vol OI
ZQN100417C00050000 50 68.20 0.00 78.65 79.10 3 178
ZQN100417C00055000 55 72.70 0.00 73.65 74.15 0 104
ZQN100417C00060000 60 68.15 -0.55 68.65 68.90 1 90
ZQN100417C00065000 65 51.50 0.00 63.65 64.15 0 89
ZQN100417C00070000 70 58.85 3.26 58.70 58.95 10 235
ZQN100417C00075000 75 53.85 11.52 53.70 53.95 5 414
QZN100417C00080000 80 48.85 3.35 48.75 48.95 10 607
QZN100417C00085000 85 43.40 9.75 43.80 44.00 1 553
QZN100417C00090000 90 37.90 0.10 38.85 39.05 8 1307
QZN100417C00095000 95 31.83 0.00 33.95 34.15 5 940
QZN100417C00100000 100 29.20 0.10 29.10 29.20 20 1841
QZN100417C00105000 105 24.40 0.20 24.25 24.40 32 641
QZN100417C00110000 110 19.60 0.20 19.65 19.75 93 1249
QZN100417C00115000 115 15.35 0.20 15.15 15.25 132 2383
QZN100417C00120000 120 11.11 0.01 11.10 11.15 455 7083
QZN100417C00125000 125 7.55 -0.15 7.55 7.60 1957 6470
QZN100417C00130000 130 4.71 -0.14 4.70 4.75 3479 6522
QZN100417C00135000 135 2.71 -0.16 2.70 2.73 1754 5704
QZN100417C00140000 140 1.50 -0.05 1.44 1.48 1799 7647
QZN100417C00145000 145 0.74 -0.09 0.73 0.77 348 4537
QZN100417C00150000 150 0.38 -0.02 0.38 0.40 100 4177
QZN100417C00155000 155 0.21 0.03 0.19 0.21 23 2161
QZN100417C00160000 160 0.11 0.00 0.10 0.13 85 2773
QZN100417C00165000 165 0.04 0.00 0.06 0.08 0 1600
QZN100417C00170000 170 0.01 0.00 0.04 0.07 10 829
QZN100417C00175000 175 0.05 0.00 0.01 0.07 0 988
QZN100417C00180000 180 0.03 0.00 NA 0.06 20 1135
QZN100417C00185000 185 0.03 0.00 NA 0.03 0 651
QZN100417C00190000 190 0.03 0.00 NA 0.05 0 1212
QZN100417C00195000 195 0.04 0.00 NA 0.04 0 2115
QZN100417C00200000 200 0.09 0.00 NA 0.04 0 262
QZN100417C00210000 210 0.03 0.00 NA 0.03 0 3415
$puts
Strike Last Chg Bid Ask Vol OI
ZQN100417P00050000 50 0.03 0.00 NA 0.04 190 953
ZQN100417P00055000 55 0.03 0.00 NA 0.04 81 524
ZQN100417P00060000 60 0.04 0.00 NA 0.05 35 244
ZQN100417P00065000 65 0.05 0.00 0.01 0.06 4 1079
ZQN100417P00070000 70 0.05 0.00 0.03 0.06 8 758
ZQN100417P00075000 75 0.05 -0.05 0.05 0.08 15 979
QZN100417P00080000 80 0.08 -0.03 0.07 0.10 32 2059
QZN100417P00085000 85 0.13 0.00 0.11 0.13 38 3703
QZN100417P00090000 90 0.18 0.00 0.17 0.18 17 2487
QZN100417P00095000 95 0.25 -0.01 0.23 0.25 32 6528
QZN100417P00100000 100 0.37 -0.02 0.35 0.36 75 8171
QZN100417P00105000 105 0.55 -0.04 0.53 0.56 161 4555
QZN100417P00110000 110 0.86 -0.11 0.85 0.88 644 5384
QZN100417P00115000 115 1.40 -0.13 1.39 1.43 569 12351
QZN100417P00120000 120 2.33 -0.17 2.29 2.32 1601 7001
QZN100417P00125000 125 3.75 -0.30 3.70 3.80 3144 4510
QZN100417P00130000 130 5.95 -0.30 5.90 6.00 1155 4691
QZN100417P00135000 135 8.90 -0.20 8.90 8.95 329 1415
QZN100417P00140000 140 12.65 -0.45 12.60 12.70 70 1675
QZN100417P00145000 145 16.99 -1.06 16.90 17.00 36 1208
QZN100417P00150000 150 22.05 0.14 21.50 21.65 52 535
QZN100417P00155000 155 26.85 -1.45 26.35 26.50 5 584
QZN100417P00160000 160 31.50 -3.18 31.25 31.40 12 298
QZN100417P00165000 165 36.45 -2.00 36.20 36.30 41 160
QZN100417P00170000 170 41.60 0.00 41.10 41.40 25 144
QZN100417P00175000 175 55.75 0.00 45.90 46.40 0 54
QZN100417P00180000 180 61.45 0.00 50.90 51.40 0 16
QZN100417P00185000 185 54.55 0.00 55.85 56.60 0 16
QZN100417P00195000 195 73.15 0.00 65.85 66.60 0 10
QZN100417P00200000 200 84.00 0.00 70.85 71.60 0 14
$symbol
[1] "AMZN"
On Sat, Mar 6, 2010 at 9:24 PM, rex <rex at nosyntax.net> wrote:
> After Yahoo changed to the new option symbols this code returns:
>
>> library(quantmod)
>> amznOpts <- getOptionChain('AMZN', Exp = "2010-05")
>> amznOpts
>
> $calls
> NULL
>
> $puts
> NULL
>
> $symbol
> [1] "AMZN"
>
> It used to return:
>
> $calls Strike Last Chg Bid Ask
> Vol OI
> [...]
>
> $puts
> Strike Last Chg Bid Ask Vol OI
> [...]
>
> Is there a fix for this?
> If not, is there another convenient method to get option chain data using R?
>
> I've searched w/o finding an answer.
>
> Thanks,
>
> -rex
> --
> While Linux is larger than Emacs, at least Linux has the excuse that it
> needs to be. -- Linus Torvalds
>
> _______________________________________________
> 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
jeffrey.ryan at insightalgo.com
ia: insight algorithmics
www.insightalgo.com
More information about the R-SIG-Finance
mailing list