DigitalOptionBase#
-
class sigtech.framework.instruments.digital_options.DigitalOptionBase
Baseclasses:
FrameworkObject
Subclasses:
FXOTCDigitalOption
,EquityIndexOTCDigitalOption
,VolatilityIndexOTCDigitalOption
,CommodityFutureOTCDigitalOption
A base class implementing digital options.
-
barrier_type: Optional[Literal['KI', 'KO', 'DI', 'DO', 'UI', 'UO', 'OT', 'NT']]
-
option_type: Optional[Literal['Call', 'Put']]
-
spread: Optional[float]
-
spread_direction: Optional[Literal['UP', 'MID', 'DOWN']]
-
spread_type: Optional[Literal['FIXED', 'RELATIVE']]
-
greeks(field=None, data_point=None, intraday_datetime=None, dollar_greeks=False) Series
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.
-
metrics(fields=None, data_dates=None, data_point=None, vol_override=None)
Get time series of standard option Greeks and/or NPV, determined by the fields parameter. All Greeks are the actual derivatives, computed analytically or numerically, depending on the option and pricer type.
- Parameters:
fields – Name of a Greek or ‘NPV’ to output. Can be a list, e.g. [‘NPV’,’Delta’,’Vega’]. If None is passed, all available metrics are returned. A list of Greeks for the_option can be obtained from the_option.greek_fields.
data_dates – (Optional) Date or list of dates for which the option metrics are needed. If
None
is passed, the full time series is returned.data_point – (Optional) Valuation data point.
vol_override – (Optional) fixed constant vol to be used over all dates instead of the market implied vols, or pd.Series of constant vols per date (forward filling the missing ones).
- Returns:
Time series of the requested metrics.