pub enum RateShift {
ParallelAbsolute(f64),
ParallelRelative(f64),
KeyRateAbsolute {
tenors: Vec<f64>,
shifts: Vec<f64>,
},
}Expand description
A shift applied to a curve by YieldCurve::bumped. Shifts act on the
continuously compounded zero rates (the curve’s discount factors
are re-derived exactly), independent of the curve’s quoting convention.
Variants§
ParallelAbsolute(f64)
Add d to every continuous zero rate (e.g. 0.0001 = +1bp).
ParallelRelative(f64)
Scale every continuous zero rate by 1 + r.
KeyRateAbsolute
Key-rate bump: add shifts[i] to the continuous zero rate at pillar
tenors[i] (year fractions, strictly increasing). Each tenor reuses
the nearest existing pillar within KEY_RATE_TENOR_TOLERANCE;
otherwise a pillar is inserted on the base curve first, so the bump
is represented exactly. Off-pillar shape follows the curve’s own
interpolation — no separate shift interpolation exists — which makes
node bumps exactly additive: single-tenor bumps over the full pillar
set sum to the parallel bump to machine precision.