FXOTCOptionsGroup#
-
class sigtech.framework.instruments.option_groups.FXOTCOptionsGroup
Baseclasses:
OTCOptionGroup
A class representing OTC FX option groups.
over-under convention: - number of ‘over’ units needed to buy/per 1 ‘under’ unit.
-
delta_forward_type: str
-
delta_spot_type: str
-
over: str
-
under: str
-
atm_from_type(option_type, quote_dt, maturity_date, atm_type)
ATM strike value from option parameters.
- Parameters:
option_type – Type of option.
quote_dt – Quote date.
maturity_date – Maturity date.
atm_type – ATM quote type (e.g.
'SPOT'
or'FWD'
).
- Returns:
Strike value.
-
convert_delta(option_type, delta, quote_date, maturity_date, vol, to_delta_type, from_delta_type=None, to_option_type=None, data_point=None)
Delta conversion.
- Parameters:
option_type – Type of option.
delta – Input delta.
quote_date – Quote date.
maturity_date – Maturity date.
vol – Annualised volatility.
to_delta_type – Target type of delta.
from_delta_type – Source type of delta (optional).
to_option_type – Target option type (optional).
data_point – Data point (optional).
- Returns:
Converted delta.
-
convert_maturity_tenor_to_delivery_date(reference_date, maturity_tenor)
Convert a maturity tenor identifier to a delivery date.
- Parameters:
reference_date – Reference dats.
maturity_tenor – Maturity tenor identifier.
- Returns:
datetime date.
-
static curves_series(currency, data_point=None, data_dates=None)
Curve series at points in time.
- Parameters:
currency – Currency identifier.
data_dates – Input dates.
data_point – Data point (optional).
- Returns:
Curve series.
-
delta_vol_from_strike(option_type, strike, quote_date, maturity_date, vol=None, data_based=False, delta_type=None, data_point=None, vol_handle=None)
Given strike, find option delta such that when the volatility interpolated on the delta axis is used in Black formula, if gives delta within given tolerance (fixed at 0.01), and bounded by 0.99 (as the maximal delta stored in the surface is 0.95 anyway). If data_based is set to True, strike interpolation is used to get volatility.
-
discount_curve(data_date, data_point=None)
Discount curve used for the options discounting.
- Parameters:
data_date – Input date.
data_point – Input data point (optional).
- Returns:
Discount curve.
-
discount_curves(data_dates, data_point=None)
Discount curves used for the options discounting.
- Parameters:
data_dates – List of dates.
data_point – Input data point (optional).
- Returns:
Discount curves.
-
forward_prices(data_dates, maturity, **kwargs)
Maturity-corresponding future (or more generally next future at or after maturity) quote as seen on
data_dates
.- Parameters:
data_dates – List of input dates.
maturity – Input maturity.
- Returns:
List of future quotes.
-
static get_group(pair: str) FXOTCOptionsGroup
Creates an FX OTC OPTION GROUP on-the-fly for a given currency pair. Method is agnostic to convention, i.e.
AUDUSD
andUSDAUD
will return the same group.- Parameters:
pair – Convention-agnostic currency pair to generate OTC option group for.
- Returns:
OTC option group created on-the-fly for given FX pair.
-
get_option(option_type: str, strike: Union[float, str], start_date: date, maturity: Union[date, str], strike_type: str = 'Price', exercise_type='European', target_maturity_weekday: Optional[str] = None, is_imm_maturity: Optional[bool] = None, strike_date: Optional[Union[date, datetime]] = None, **kwargs)
The nearest option available for a given type of option, strike and start+maturity date.
- Parameters:
option_type –
'Call'
or'Put'
.strike – Strike of option in either price, delta terms, premium or ATM offset, e.g.
'ATM+5%'
start_date – Strike date of the option, unless
strike_date
is passed. Start of the history.maturity – Maturity date of the option or maturity tenor key such as
'3M'
.strike_type –
'Price'
,'Delta'
or'Premium'
(defaults to price). Could also be ATM type - one of'SPOT'
,'FWD'
, or'DN'
exercise_type –
'European'
or'American'
(defaults to ‘European’).target_maturity_weekday – Weekday used for target maturity (optional).
is_imm_maturity – Flag for usage of IMM dates (optional).
strike_date – Strike date of the option. If
None
(default),start_date
is used (optional).
- Returns:
The nearest option available given the inputs.
-
get_option_group_dependencies(t: time, tz: tzinfo, valuation_currency: str, start_dt: datetime, end_dt: datetime, greek_calculation_dependencies: bool = False) list[sigtech.framework.internal.infra.mu.graph.registry.factory.Dependency]
Dependencies at the option group level
-
is_foreign_premium()
Returns true if the option premium is paid in ‘under’ currency, i.e. option quote currency is different from the pair quote currency. In this case the delta is premium adjusted.
-
spot_values(data_dates, data_point=None)
Spot values at points in time.
- Parameters:
data_dates – Input dates.
data_point – Data point (optional).
- Returns:
List of spot values.
-
strike_from_delta(option_type, delta_strike, quote_date, maturity_date, data_based=False, delta_type=None, data_point=None, vol_handle=None)
Option strike from delta.
- Parameters:
option_type – Type of option.
delta_strike – Delta strike.
quote_date – Quote date.
maturity_date – Maturity date.
data_based – Compute strike from data (optional, default to False).
delta_type – Type of delta (optional).
data_point – Data point (optional).
vol_handle – Vol surface series (optional).
- Returns:
Option strike.
-
vol_from_strike(option_type, strike, quote_date, maturity_date, interpolation_mode='Delta', mode='mid', data_point=None, vol_handle=None)
Compute volatility from strike.
- Parameters:
option_type – Type of option.
strike – Quote strike.
quote_date – Quote date.
maturity_date – Maturity date.
interpolation_mode – Interpolation mode (optional, default is
'Delta'
).mode – Mode (optional, default is
'mid'
).data_point – Data point (optional).
vol_handle – Volatility timeseries (optional).
- Returns:
Volatility value.