getOptionChain: Download Option Chains

Description Usage Arguments Details Value Author(s) References Examples

Description

Function to download option chain data from data providers.

Usage

1
getOptionChain(Symbols, Exp = NULL, src="yahoo", ...)

Arguments

Symbols

The name of the underlying symbol.

Exp

One or more expiration dates, NULL, or an ISO-8601 style string. If Exp is missing, only the front month contract will be returned.

src

Source of data. Currently only ‘yahoo’ is provided.

...

Additional parameters.

Details

This function is a wrapper to data-provider specific APIs. By default the data is sourced from yahoo.

Value

A named list containing two data.frames, one for calls and one for puts. If more than one expiration was requested, this two-element list will be contained within list of length length(Exp). Each element of this list will be named with the expiration month, day, and year (for Yahoo sourced data).

If Exp is set to NULL, all expirations will be returned. Not explicitly setting will only return the front month.

Author(s)

Jeffrey A. Ryan, Joshua M. Ulrich

References

http://finance.yahoo.com

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Only the front-month expiry
AAPL.OPT <- getOptionChain("AAPL")
# All expiries
AAPL.OPTS <- getOptionChain("AAPL", NULL)
# All 2015 and 2016 expiries
AAPL.2015 <- getOptionChain("AAPL", "2015/2016")

## End(Not run)


Search within the quantmod package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.