Skip to main content

calibrate_inflation

Function calibrate_inflation 

pub fn calibrate_inflation(
    reference: NaiveDate,
    discount: &Curve,
    rungs: &[Rung],
    fixings: &FixingStore,
    fx: &FxRates,
    tolerance: Tolerance,
    interp: LevelInterpolation,
    day_count: DayCountFraction,
) -> Result<CalibratedInflation, CalibrationError>
Expand description

Calibrates an inflation curve to a ladder of index-quoted instruments, discounted on a curve already known.

The pillar date is the observation date, and it is the caller’s. A zero-coupon inflation swap maturing in five years reads the index at its lagged observation, three months earlier; noding the curve at the maturity would put every rung’s own pillar beyond the level it actually reads, and the solve would be neither triangular nor, under a flat scheme, convergent. lagged_observation is what a caller computes the pillar with.

Each pillar is solved by the same damped Newton step a rate ladder uses — newton_on_pillar is one body — seeded on the index level rather than on a log discount factor. The discount curve is lifted passive, so the step is exactly the residual’s sensitivity through the index path and a rung the pillar cannot move reports CalibrationError::Insensitive rather than stepping on nothing.

§Errors

CalibrationError if the ladder is malformed, a pillar does not converge, a pillar has no effect on its own instrument, or a valuation fails.