BondGroup#
-
class sigtech.framework.instruments.bonds.BondGroup
Baseclasses:
ContractGroup
A class representing a bond group.
-
calc_type: Optional[int]
-
contract_sector: str
-
contract_ticker: str
-
country: str
-
description: Optional[str]
-
due_time: time
-
exchange_code: Optional[str]
-
property first_contract
Returns the contract that has the earliest
history_start_date
.
-
fixing_source: Optional[str]
-
history_fields: list[str]
-
holidays: str
-
item_product_type: str
-
prime_history_field: str
-
tax_withholding: Optional[float]
-
timezone: str
-
valuation_time: time
-
classmethod from_contract(fixing_source: str, env: Optional[ConfiguredEnvironment] = None) Self
Create a BondGroup from a fixing source.
- Parameters:
fixing_source – String fixing source.
env – Configured environment (optional).
- Returns:
Instance of
BondGroup
.
-
get_bond_yield_curve(currency=None)
- Return on-the-run bonds yield curve object for bonds from this group, assuming they are all in the input
currency
. (currency
is determined from group defaults if omitted and it can be done)
- Parameters:
currency – Currency of typical bond in the group (optional)
- Returns:
BondYieldCurve
-
get_usual_bond_currency()
Currency of typical bond in this group.
- Returns:
string
-
classmethod name_from_contract(fixing_source)
Create a BondGroup name from contract code.
- Parameters:
fixing_source – Fixing source.
- Returns:
Default name of instance of
BondGroup
-
otr_series(tenor, start=None, end=None, shift=0, clean=False)
Return the On-The-Run series for the group.
- Parameters:
tenor – Tenor string in
'[xx]Y'
format, e.g.'10Y'
or'5Y'
.start – Start date of the series.
end – End date of the series.
shift – Parameter to move to off the run series (default is 0, i.e. on the run).
clean – If True, cleans the series by truncating from the latest gap (default False).
-
otr_series_tenors(with_start_dates=False)
Return tenors of available On-The-Run tables for the group. if
with_start_date
is set toTrue
, the starting dates of corresponding On-The-Run tables are returned as well.- Parameters:
with_start_dates – Return or ignore the tables start dates (False by default)
- Returns:
list of available tenors, or dictionary of tenor-start_date mappings.