Function accumulated_fixed_leg_by_period
pub fn accumulated_fixed_leg_by_period(
currency: Currency,
effective: NaiveDate,
maturity: NaiveDate,
frequency: Period,
notional: f64,
fixed_rate: f64,
day_count: DayCountFraction,
compounding: AccrualCompounding,
direction: Direction,
) -> Result<Leg, ScheduleError>Expand description
accumulated_fixed_leg with its accrual measured period by period:
the day count’s year fraction over each unadjusted frequency period
from effective to maturity, summed. On 1/1 that counts one per
sub-period — FpML’s 1/1 per calculation period — so
an annual five-year leg compounds (1 + K)^5 where the one-accrual
reading compounds (1 + K)^1.
§Errors
ScheduleError when maturity is not after effective.