OptionBase

OptionBase#

class sigtech.framework.instruments.options.OptionBase

Baseclasses: TradableInstrument

Subclasses: ExchangeTradedOption, OTCOption

Base class for option instruments. Not intended for direct usage.

Keyword arguments:

  • strike: Strike price of the option. Exactly one of strike price and strike delta must be set.

  • delta_strike: Strike delta of the option. Exactly one of strike price and strike delta must be set.

  • maturity_date: Maturity date of the option.

  • option_type: Type of the option, either 'Call' or 'Put'.

  • exercise_type: Exercise style of the option, either 'European' or 'American'.

  • underlying: Name of the underlying instrument.

  • option_group: Optional override for option group.

property expiry_date

date contract expires, or last date on which we can trade

property greek_fields

Additional fields used for risk management.

property holidays

List of holiday calendars for this instrument.

delta_strike: Optional[float]
exercise_type: Literal['European', 'American']
last_data_date_offset: Optional[str]
last_trading_date: Optional[date]
maturity_date: date
option_group: Optional[str]
option_type: Literal['Call', 'Put']
strike: Optional[float]
underlying: str
dollar_delta(data_point=None) deprecated

Dollar delta timeseries for this option instrument (deprecated).

dollar_gamma(data_point=None) deprecated

Dollar gamma timeseries for this option instrument. (Change in dollar delta per 1% underlying move.) (deprecated)

dollar_greeks(field, data_point=None, **kwargs) deprecated

Dollar timeseries for this option instrument (deprecated).

dollar_vega(data_point=None) deprecated

Dollar vega timeseries for this option instrument (deprecated).

exposure()

Return the option exposure at its currency.

greeks(field=None, data_point=None, intraday_datetime=None, dollar_greeks=False)

Timeseries or DataFrame of the greeks available for this option instrument.

Parameters:
  • field – Input greek (optional, all greeks returned by default).

  • data_point – Input data point (optional).

  • intraday_datetime – Input for intraday point to return (optional).

  • dollar_greeks – Provide dollar greeks, defaults to False.

Returns:

pandas Series for an individual greek, DataFrame otherwise.

pnl_explain(fields=None, data_point=None)

A breakdown of the actual pnl and greeks pnl over time for a list of fields.

Parameters:
  • fields – Input fields (optional).

  • data_point – Input data point (optional).

Returns:

pandas DataFrame.

risk_matrix(value_date: date, shift_type: str = 'spot', num_steps: int = 5, max_shift_bps: float = 500.0, delta_from_base: bool = False) DataFrame

Get risk matrix containing change in greeks for spot or implied vol shift.

Parameters:
  • value_date – Valuation date.

  • shift_type – (Optional) ‘spot’ or ‘vol’ shift, ‘spot’ by default.

  • num_steps – (Optional) number of scenarios to calculate for each positive and negative side, 5 by default.

  • max_shift_bps – (Optional) shift amount in bps for maximum scenario.

  • delta_from_base – (Optional) return metrics for new scenario (‘False’) or to return change from base case (‘True’).

Returns:

risk matrix DataFrame for value date.

risk_scenario(shift_bps: float, value_date: Optional[date] = None, shift_type: str = 'spot', delta_from_base: bool = False) DataFrame

Get time series of changes in greeks for spot or implied vol shift for specified shift.

Parameters:
  • shift_bps – Shift amount in bps for maximum scenario.

  • value_date – (Optional) valuation date.

  • shift_type – (Optional) ‘spot’ or ‘vol’ shift, ‘spot’ by default.

  • delta_from_base – (Optional) return metrics for new scenario (‘False’) or to return change from base case (‘True’).

Returns:

risk scenario DataFrame.

settlement_value()

Settlement value for the instrument.

trade_group()

Option group used for specifying type of traded options. For example, if OTC option groups are used for pricing, but traded strategy instruments are listed.

validate()

Perform validation checks on the instrument, e.g. check the strike has been set.

vega_transaction_market_impact(d, vega_amount=0)

Market impact cost of transaction due to vega.

Parameters:
  • d – Input date for retrieval of the implied volatility.

  • vega_amount – Value of vega.