OISSwaptionGroup
OISSwaptionGroup#
-
class sigtech.framework.instruments.ois_swaption.OISSwaptionGroup
A class representing an OIS swaption group.
-
forecast_curves(data_dates, data_point=None)
Function solely for compatibility with IBOR swaption group - returns Nones, as the curves are not used anywhere. Shouldn’t be used apart from compatibility calls.
-
property available_data_points
Available data points
-
available_data_providers(entitled_only=True) Optional[List[str]]
Available data providers for this object. Bool to return entitled providers only
-
property cache_name: str
Cache name of this object.
-
property class_name
Class name of this object.
-
property class_short_name
Short name of the object class.
-
clear_cached_data()
Clear all the cached data of the object.
-
clone_object(params=None)
Return a clone of the object with amended parameters.
- Parameters
params – Optional dictionary of parameters to override.
- Returns
New object.
-
compute_dependencies(root_dependency: Optional[sigtech.framework.internal.infra.mu.graph.registry.factory.Dependency] = None)
Compute these dependencies - triggers MDS requests
-
static convert_dtypes(clz)
Class decorator to convert classes’ BaseType into variable annotations (PEP-526), and to generate __aliases__ based on BaseType.db_name when required.
-
data_dict()
Return the object attributes in a dict.
-
property data_source: str
Field used when retrieving history.
-
property default_data_point
Default data point
-
dependencies(input_dependency: Optional[sigtech.framework.internal.infra.mu.graph.registry.factory.Dependency] = None, valuation_currency: Optional[str] = None, use_start: bool = True) list[sigtech.framework.internal.infra.mu.graph.registry.factory.Dependency]
Returns a list of Dependency
- Parameters
input_dependency – A Dependency object representing the root of the dependency tree to be returned.
valuation_currency – If supplied, include the dependencies required to output the data in this currency.
use_start – If False, return only dependencies required to calculate an earliest start date - self.start_date will be None in this case.
- Returns
List of Dependency objects representing the current level in the dependency tree.
-
property dependency_type
Should return GraphNodeType. Return None to autodetect based on result of dependencies()
-
discount_curves(data_dates, data_point=None)
Discount curves for the instrument.
- Parameters
data_dates – Input date or list of dates for which the curves are needed.
data_point – Input data point (optional).
- Returns
pandas Series.
-
property env: sigtech.framework.config.config.ConfiguredEnvironment
Return the configured environment.
-
env_date_change(old_env_dt: datetime.datetime, new_env_dt: datetime.datetime, live_data_update=None)
Routine called after the environment date is changed.
- Parameters
old_env_dt – Old datetime (tz aware).
new_env_dt – New datetime (tz aware).
live_data_update – Live streaming data associated with the environment date change.
-
exchange() Any
Exchange object where options are traded.
-
finalize_for_comparison()
Method to call to ensure all data dict values are finalized prior to doing object comparisons.
-
classmethod from_currency(currency)
Return a group object from a currency ticker.
- Parameters
currency – Currency ticker.
- Returns
Group object.
-
classmethod from_dictionary(dct: dict[str, Any], cache: bool = True, identifier: Optional[sigtech.framework.infra.data_adapter.identifier.Identifier] = None, env: Optional[sigtech.framework.config.config.ConfiguredEnvironment] = None, **kwargs)
Factory method to create object using data dictionary
-
get_atm_vol(expiry: str, swap_tenor: str, start_date: datetime.date, end_date: Optional[datetime.date] = None, data_point=None)
Get rolling daily atm normal volatility for the expiry x swap_tenor swaptions.
- Parameters
expiry – Swaption expiry string, e.g.
'5Y'
or'1M'
.swap_tenor – Underlying swap tenor, e.g.
'5Y'
.start_date – Requested series start date
end_date – Requested series end date. asof_date used if omitted (optional).
data_point – Data point for the vol surface (optional).
- Returns
pd.Series of daily vols
-
classmethod get_group(currency: str)
Create on the fly SWAPTION GROUP for given currency
- Parameters
currency – e.g. ‘EUR’ or ‘USD’
- Returns
-
classmethod get_names(sort_by_group: Optional[bool] = False, include_db: Optional[bool] = True, include_local: Optional[bool] = True, include_children: Optional[bool] = False, ignore_unmapped: Optional[bool] = True) list[str]
Return an ordered list of object names associated with the class.
- Parameters
sort_by_group – If set, the list is first ordered by sector/group, if applies, e.g. commodity or index futures (default is False).
include_db – If set, include objects available from the database (default is True).
include_local – If set, include objects available in the local environment (default is True).
include_children – If set, include objects available from child classes (default is False).
ignore_unmapped – If set, ignore errors due to unmapped database objects (default is True).
- Returns
List of object names.
-
get_option_dependencies(start_date: datetime.date, maturity: Union[datetime.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]
Additional Dependencies at the Swaption level - there aren’t any
-
get_option_group_dependencies(t: datetime.time, tz: datetime.tzinfo, valuation_currency: str, start_dt: datetime.datetime, end_dt: datetime.datetime, greek_calculation_dependencies: bool = False) list[sigtech.framework.internal.infra.mu.graph.registry.factory.Dependency]
Dependencies at the option group level
-
get_swaption(option_type: str, strike: Optional[Union[float, str]], start_date: datetime.date, expiry: Union[datetime.date, str], swap_tenor: str, forward_premium: Optional[Union[float, bool]] = None, end_date: Optional[datetime.date] = None, history_start: Optional[datetime.date] = None)
Gets the swaption for a given type of option, strike and expity/tenor
- Parameters
option_type –
'Payer'
or'Receiver'
strike – Strike of swaption. See
Swaption
for format details.start_date – Start date of the history (also used for expiry offset if tenor given)
expiry – Maturity date of the option or expiry tenor (e.g.
'3M'
)swap_tenor – Tenor of the underlying swap (e.g.
'5Y'
)forward_premium – Optional - in case of forward (rather than spot) premium - either forward premium value, or
True
to imply it from the swaption value (i.e.start_date
0 npv)end_date – Date when the option position is closed (optional, used purely for calculation optimisation).
history_start – Optional - date on which history should start, in case it’s needed before the
start_date
(e.g. for strategy sizing, or valuing ifstart_date
is a non-business day).
- Returns
-
get_vol_surface()
Object referenced by the vol surface name of the group.
-
get_vol_surface_series(data_dates, data_point=None)
Vol surface timeseries.
- Parameters
data_dates – List of dates.
data_point – Data point (optional).
- Returns
Vol surface timeseries.
-
property holidays: str
List of holiday calendars for this instrument.
-
property identifier: sigtech.framework.infra.data_adapter.identifier.Identifier
Return the object identifier.
-
info() dict
Return a dictionary with useful object information.
-
property input_parameters
Values of initial input parameters entered when creating the instance.
-
property internal_id
Ticker - i.e. part of name determining content of the class. For types with saved reference data - ticker will be
self._ticker
. For software types - ticker should be calculated.
-
property is_unmapped
Check if the object is not mapped.
-
property live_supported: bool
Flag for live supported objects.
-
property name
Primary name by which the
FrameworkObject
is identified. If reference information (or e.g. corresponding time series) are stored in the DB, then this name will be used.
-
print_dependencies(root_dependency: Optional[sigtech.framework.internal.infra.mu.graph.registry.factory.Dependency] = None, resolve_future_dependencies: bool = True, fields: Optional[list] = None)
Pretty print dependency tree :param root_dependency: starting dependency of the tree. :param resolve_future_dependencies: resolve future dependencies before printing. If ‘false’ nothing get printed. :param fields: additional fields to extract from dependencies object. Default fields are
product_type
,currency
,frequency
anddata_source
. To get the list of available fields for an object you can use thedata_dict()
method.
-
property product_type
Return the
product_type
property of this object.
-
property publication_delay: str
Publication delay of data for this group.
-
query_instrument_names() list[str]
Generic doc store query to retrieve names of objects meeting filter criteria. :return: List of object names meeting filter criteria.
-
query_instruments() list[sigtech.framework.internal.infra.objects.core.framework_object.FrameworkObject]
Generic doc store query to retrieve objects meeting filter criteria. :return: List of objects meeting filter criteria
-
property sector
Sector used on BBG, or the class ID for SIG instruments.
-
session_data()
Returns the raw Copp-Clarke trading sessions data for this group
-
static sort_key_static(name)
Convert a name to the sort key as of Portfolio Presentation Guidelines for performance reasons.
- Parameters
name – Input name.
- Returns
Tuple (sort key, length of sort key, input name).
-
textual_representation()
Return a printable representation of this object.
-
validate()
Validation routine adding checks that will be run on object creation.
-
property valuation_time
Valuation time for the instrument group Included so we can supply this to TradingManager.data_point_from_time
-
property valuation_tzinfo
Valuation time zone for the instrument group Included so we can supply this to TradingManager.data_point_from_time
-
currency: str
-
exchange_code: Optional[str]
-
cash_settled: Optional[bool]
-
data_source_all: Optional[list[str]]
-
instrument_id: Optional[int]