BondFuture

BondFuture#

class sigtech.framework.instruments.futures.BondFuture

Baseclasses: Future

Class representing bond future instrument.

Example object creation:

from sigtech.framework.instruments.futures import BondFuture

future = BondFuture(
    contract_code='TY',
    contract_size=100000,
    currency='USD',
    ticker='TYZ18',
    exchange_code='CBOTFCF(T) EXCHANGE GROUP',
    expiry_date_stored='2018-12-19',
    first_delivery_date='2018-12-03',
    first_delivery_notice_date='2018-11-30',
    futvalpt_raw='1000.00',
    last_delivery_date='2018-12-31'
)
convertible_fields = ['LastPrice', 'HighPrice', 'LowPrice', 'OpenPrice']
ctd_allowed_fields = ['ISIN', 'CF', 'TICKER']
ctd_default_field = 'TICKER'
property ctd_series

Raw CTD data

fixed_fut_val_pt = {'IR': 1000.0, 'XM': 1000.0, 'YM': 1000.0}
yield_quoted_bond_coupon = {'IR': None, 'XM': 6.0, 'YM': 6.0}
yield_quoted_bond_maturity = {'IR': 0.25, 'XM': 10, 'YM': 3}
static batch_load_ctd(bond_futures: list[str])

Bulk load the ctd data for the given BondFuture

ctd(d: date, field: Optional[str] = None) Any
Parameters:
  • d – Reference date d

  • field – Defines return type, i.e. field needs to be in ['ISIN', 'CF', 'TICKER']

Returns:

Cheapest to deliver information at given input date d

ctd_data(index: Optional[DatetimeIndex] = None)

Gets CTD data for this contract. If an index is supplied, the data is re-indexed.

fut_val_pt(d: date) float
Parameters:

d – Reference date

Returns:

Adjusted value change by price factor for 1.0 point move in the future price

fwd_dv01(d: date) float
Parameters:

d – Reference date d

Returns:

DV01 given reference date d using forward yield-to-maturity

fwd_yield(d: date) float
Parameters:

d – Reference date d

Returns:

Forward yield-to-maturity given reference date d, futures price and conversion factor

spot_dv01(d: Union[date, DatetimeIndex], ffill: Optional[bool] = True) Union[float, Series]

Calculates the DV01 of an bond future contract at a particular date. This is defined as the price move of a futures contract for a 1 basis point change in yield.

Parameters:

d – Reference date d

Returns:

DV01 given reference date d adjusted by conversion factor

spot_dv01_dependencies(d: DatetimeIndex)

Return a list of dependencies for the spot_dv01 calculation.

yield_to_price(quoted_yield_price: float, coupon: Optional[float] = None) float
Parameters:
  • quoted_yield_price – Input yield price

  • coupon – Coupons rate

Returns:

Calculated price from yield quoted price