Skip to main content

rate_future

Function rate_future 

fn rate_future(
    name: &str,
    index_code: &str,
    calendar_center: &str,
    period_months: i32,
    day_count: DayCountFraction,
    business_day_convention: BusinessDayConvention,
    contract_notional: f64,
    contract_accrual: f64,
    reference: FutureReference,
    accumulation: Option<AccrualCompounding>,
    last_trading: LastTrading,
    tick: TickRule,
) -> FutureTemplate
Expand description

Builder for a rate-future template. name doubles as the registry code; the underlying index is resolved from the index registry by index_code, so index_name carries the projection-curve key the contract’s forwards belong to (the join key projection-side futures pillars validate against); the contract accrual length is period_months months. contract_notional and contract_accrual are the published contract specification, and contract_accrual is the exchange’s fixed period fraction — not the accrual of day_count over the real contract dates. See FutureTemplate::contract_accrual for why conflating the two misprices the contract’s bp value by 1.1%–2.2%. averaged says the contract settles on the average of its daily prints; see [FutureTemplate::averaged].