CommodityOTCOptionsGroup#
-
class sigtech.framework.instruments.option_groups.CommodityOTCOptionsGroup
Baseclasses:
OTCOptionGroup
A class representing OTC commodity option groups.
-
available_maturity(maturity_date: date, reference_date: date = None, use_next: bool = True)
Standard option maturity date on or after the input maturity_date (or before, if
use_next
flag is False.- Parameters:
maturity_date – Reference date in regard to which maturity is thought
reference_date – Optional - date on which to check the option chain
use_next – Optional - flag to indicate whether to use next or previous available maturity
- Returns:
-
available_options(d: date) dict
Return a dict of underlying names for which options are available. If there are no options for the date provided in the database, the last available chain in the database will be searched for any alive options and these will be returned.
- Parameters:
d – Date to get available options for.
- Returns:
Dict of available options.
-
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.
-
get_option(option_type: str, strike: Union[float, str], start_date: date, maturity: Union[date, str], strike_type: str = 'Price', exercise_type='American', 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 or delta terms, or ATM offset, e.g.
'ATM+5%'
(if strike type is'Spot'
).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 such as
'3M'
.strike_type –
'Price'
,'Delta'
,'Spot'
or'Premium'
(defaults to price).exercise_type –
'European'
or'American'
(defaults to ‘American’).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_dependencies(start_date: date, maturity: Union[date, str], data_points: Optional[list[sigtech.framework.infra.data_adapter.common.DataPoint]] = None, **kwargs) list[sigtech.framework.internal.infra.mu.graph.registry.factory.Dependency]
Get Dependencies for the underlyings of an option with the given start and maturity dates
-
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
-
static spot_future_values(underlying)
Timeseries of an underlying.
- Parameters:
underlying – Underlying identifier.
- Returns:
pandas Series.
-
classmethod spot_series(underlying)
Timeseries of an underlying.
- Parameters:
underlying – Underlying identifier.
- Returns:
pandas Series.
-
spot_value(data_date, data_point=None)
Spot value at a point in time.
- Parameters:
data_date – Point in time.
data_point – Data point (optional).
- Returns:
Spot value.
-
strike_from_delta(option_type: str, delta_strike: float, quote_date: date, maturity_date: Union[date, str], **kwargs)
Get option strike that will imply input delta.
- Parameters:
option_type – Type of option (
'Call'
or'Put'
).delta_strike – Delta strike (0.5 means
delta
of50%
).quote_date – Quote date.
maturity_date – Maturity date or tenor (e.g.
dtm.date(2020,1,3)
or'3M'
.
- Returns:
Option strike.