Skip to main content

ibor_coupon

Function ibor_coupon 

pub(crate) fn ibor_coupon(
    currency: &str,
    accrual_start: NaiveDate,
    accrual_end: NaiveDate,
    payment_date: NaiveDate,
    notional: f64,
    index: &str,
    day_count: Named<DayCountFraction>,
    gearing: f64,
    spread: f64,
    fixing_date: Option<NaiveDate>,
    fixing_window: Option<WindowArg>,
) -> PyResult<PyAnyCoupon>
Expand description

An IBOR-style coupon: one fixing of index per period, geared and spread.

fixing_date of None leaves the period always projected. The coupon holds which index it references and when it resets — never what the index printed, which is a market observation with its own risk axis.

fixing_window is the (start, end) the index’s own rate spans, where that is not the accrual period: a coupon whose accrual boundary is a holiday on the index’s calendar fixes on the index’s value dates, not on the boundary. The forward is read between those dates over the registered index’s own day count, and the amount still accrues over the accrual period. None projects over the accrual period. "value_dates" takes the window from the index: its value date for each boundary, the fixing two index business days back carried two forward. "index_tenor" spans the index’s own tenor instead: from the accrual start’s value date to that date’s maturity. A window needs a registered IBOR index, because only one says what day count its rate is quoted on.