[R-SIG-Finance] getOptionChain function in quantmod

Joshua Ulrich josh.m.ulrich at gmail.com
Mon Apr 4 15:28:18 CEST 2016


On Mon, Apr 4, 2016 at 6:09 AM, Benno Longobardolino <wotuzu17 at gmail.com> wrote:
> Hi UseRs,
>
> I've got a question about the getOptionChain function in the quantmod
> package.
>
> when I run this code I receive the front-month expiry option chain of Apple
> from finance.yahoo.com:
>
> library(quantmod)
> getOptionChain("AAPL")
>
> However, when I look this up on the website of finance.yahoo.com (
> http://finance.yahoo.com/q/op?s=AAPL+Options) then I see an additional
> column => "Implied Volatility".
>
> My question are:
> 1) Why is this column omitted in the output of getOptionChain?

Because I couldn't find any documentation about how it is calculated.

> 2) Is yahoo's calculation of the implied volatility generally reliable?

See above.

> 3) Are there other (easy) ways to calculate this using existing R libraries?

See the CRAN Finance Task View for many options (pun intended):
https://cran.r-project.org/web/views/Finance.html

Two examples: RQuantLib, fOptions.

>
> Thank you,
>
> Andreas
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at r-project.org 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.



-- 
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com
R/Finance 2016 | www.rinfinance.com



More information about the R-SIG-Finance mailing list