option_series.yahoo: constructor for series of options using yahoo data

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Defines a chain or several chains of options by looking up necessary info from yahoo.

Usage

1
2
option_series.yahoo(symbol, Exp, currency = "USD", multiplier = 100,
  first_traded = NULL, tick_size = NULL, overwrite = TRUE)

Arguments

symbol

character vector of ticker symbols of the underlying instruments (Currently, should only be stock tickers)

Exp

Expiration date or dates to be passed to getOptionChain

currency

currency of underlying and options

multiplier

contract multiplier. Usually 100 for stock options

first_traded

first date that contracts are tradeable. Probably not applicable if defining several chains.

tick_size

minimum price change of options.

overwrite

if an instrument already exists, should it be overwritten?

Details

If Exp is missing it will define only the nearby options. If Exp is NULL it will define all options

If first_traded and/or tick_size should not be the same for all options being defined, they should be left NULL and defined outside of this function.

Value

Called for side-effect. The instrument that is created and stored will inherit option_series, option, and instrument classes.

Note

Has only been tested with stock options. The options' currency should be the same as the underlying's.

Author(s)

Garrett See

References

Yahoo https://finance.yahoo.com

See Also

option_series, option, instrument, getOptionChain

Examples

1
2
3
4
5
6
## Not run: 
option_series.yahoo('SPY') #only nearby calls and puts
option_series.yahoo('DIA', Exp=NULL) #all chains
ls_instruments()

## End(Not run)

FinancialInstrument documentation built on May 2, 2019, 3:41 a.m.