define option_series with IB...

Description

define option_series with IB

Usage

1
2
define_options.IB(underlying_id, strike, expires, right = c("C", "P"),
  currency = "USD", multiplier = 100, include_expired = "1", ...)

Arguments

underlying_id

vector of underlying_ids

strike

vector of strike prices

expires

vector of expiration dates of format YYYYMM

right

"C", "P", or c("C","P")

currency

name of currency

multiplier

contract multiplier (usually 100 for equity options)

include_expired

“0” if you do not want to define expired contracts

...

other arguments to pass through to twsInstrument

Details

define option_series instruments using IBrokers

a wrapper for twsInstrument to define multiple options contracts.

Value

called for side-effect

Note

the date in the primary_id will correspond to Expiration Saturday, however, the Date in the $expires slot (and in $IB$expiry) will correspond to the Friday prior, which is the last day trading occurs.

Author(s)

Garrett See

See Also

define_options, option_series.yahoo

Examples

1
2
3
4
5
6
## Not run: 
define_options.IB('SPY',stike=125)
define_options.IB(c("SPY","DIA"),strike=seq(120,130,5))
define_options('GOOG',600,c('201109','201112'),'C',src='IB')

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.