Skip to main content

overnight_coupon

Function overnight_coupon 

pub(crate) fn overnight_coupon(
    currency: &str,
    accrual_start: NaiveDate,
    accrual_end: NaiveDate,
    payment_date: NaiveDate,
    notional: f64,
    index: &str,
    day_count: Named<DayCountFraction>,
    calendar: &str,
    index_day_count: Named<DayCountFraction>,
    accrual_compounding: Named<AccrualCompounding>,
    gearing: f64,
    spread: f64,
) -> PyResult<PyAnyCoupon>
Expand description

A compounded overnight coupon on index, observed over calendar.

The daily strip is built by the same function an overnight leg builds its own with — one observation per business day, each spanning to the next and capped at the accrual end — so a coupon composed here observes exactly what the same period inside a swap observes. accrual_compounding is the core’s own vocabulary: "Compounded" is the SOFR and ESTR convention, "Simple" (or "averaged") the Fed Funds one, and "Continuous" is refused by the core, because no market accrues an overnight leg that way.