Function accumulated_fixed_leg
pub(crate) fn accumulated_fixed_leg(
currency: &str,
effective: NaiveDate,
maturity: NaiveDate,
notional: f64,
fixed_rate: f64,
day_count: Named<DayCountFraction>,
accrual_compounding: Named<AccrualCompounding>,
direction: Named<Direction>,
discount: &str,
frequency: Option<Named<Period>>,
) -> PyResult<PyLeg>Expand description
The fixed side of a zero-coupon swap: one coupon carrying fixed_rate
over [effective, maturity], accruing under accrual_compounding into a single
payment at maturity.
It is a leg of one coupon because what makes it zero-coupon is how the leg
accumulates, not what the coupon is. accrual_compounding is the core’s own
vocabulary: "Compounded" gives (1 + K)^τ, "Simple" gives 1 + K·τ,
and the two are different money. With frequency, τ is measured period
by period on that frequency and summed, so "1/1" counts one per
sub-period (FpML’s 1/1 per calculation period).