OTCOption#
-
class sigtech.framework.instruments.options.OTCOption
Baseclasses:
OptionBase
,OTCVolBasedBase
Subclasses:
FXOTCOption
,EquityIndexOTCOption
,CommodityFutureOTCOption
A class implementing OTC option instruments. Not intended for direct usage.
Keyword arguments (in addition to those of
OptionBase
):start_date
: Option start date.end_date
: Date when the option position is closed (optional, used purely for calculation optimisation).model_method
: Defines the model that is passed on to the pricing library (optional, only'BS'
is supported in the default implementation).strike_rounding
: Defines if the strikes are rounded,True
by default. Currently actual rounding is only done for equity options.barrier_type
: Type of barrier contract (optional, only relevant for barrier options, i.e. ifbarrier
is set). Values:'KI'
: knock-in'KO'
: knock-out'DI'
: down-and-in'DO'
: down-and-out'UI'
: up-and-in'UO'
: up-and-out
barrier
: Value of the barrier (optional, only relevant for barrier options,barrier_type
must be specified in this case).
-
property available_data_points
Data points available for this instrument.
-
barrier: Optional[float]
-
barrier_type: Optional[Literal['KI', 'KO', 'DI', 'DO', 'UI', 'UO']]
-
property default_data_point
Default data points for this instrument.
-
property dependency_type
Dependency type
-
end_date: Optional[date]
-
execution_datetime: Optional[datetime]
-
property greek_fields
Additional fields used for risk management.
-
model_method: Optional[str]
-
pricing_overrides: Optional[dict]
-
start_date: date
-
strike_rounding: Optional[bool]
-
use_generic_pricing_engine: Optional[bool]
-
use_quick_approximation: Optional[bool]
-
vol_surface_from_db: Optional[bool]
-
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.
-
implied_vol()
Time series of vol surface implied volatility for the expiry and strike matching the underlying option.
-
metrics(fields=None, data_dates=None, data_point=None, vol_override=None, spot_override=None, forward_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.ImpliedVolatility is the absolute volatility used by Black-Scholes vanilla pricer if it is used, or the interpolated volatility from the surface, corresponding to the option strike and expiry.
Vega is the sensitivity to parallel shift of the whole surface if more than one point is used for pricing, e.g. if vol surface is shifted up by 1%, we expect the option price to go up by Vega * 1%.
If called for an FX OTC option, FX market convention is followed to define the premium payment currency. If the option premium is paid in ‘under’ currency, then the delta is premium adjusted and an additional column
'PA Delta'
is shown. For more information, please use the propertydelta_forward_type
or the functionis_foreign_premium()
on the corresponding option group.- 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 propertygreek_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).
spot_override – (Optional) spot override to use.
forward_override – (Optional) forward override to use.
- Returns:
Time series of the requested metrics.
-
option_info() deprecated
A dict of instrument information including strike, maturity date and underlying ticker (deprecated).
-
option_metrics(fields=None, data_dates=None, data_point=None, vol_override=None) deprecated
Deprecated method to get time series of standard option Greeks and/or NPV.
-
settlement_value()
Settlement value for the instrument.
-
underlying_forward_prices(data_dates=None, data_point=None)
Maturity-corresponding future quotes.
- Parameters:
data_dates – List of input dates.
data_point – Input data point.
- Returns:
List of future quotes.
-
underlying_history(data_point=None, data_dates=None)
History of the underlying.
- Parameters:
data_point – Input data point (optional).
data_dates – Dates/datetimes to return in series (optional)
- Returns:
pandas series.
-
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.