Skip to main content

curve_weights

Function curve_weights 

fn curve_weights(curve: &Curve, parallel: bool) -> Vec<f64>
Expand description

∂p/∂q for every free parameter a curve owns, in the order the lift reads them — the walk [Family::parameter_labels] makes, weighted per leaf.

The space a family stores is the family’s own business and not its role in the market: a repo curve is often a piecewise discount curve, whose parameters are log discount factors, and of the three credit families two store hazards while PiecewiseSurvival stores ln S. The matches below are exhaustive, so a family added to either closed set stops compiling here until its space is stated.

parallel asks for the move a unit parallel zero-rate shift makes: on a Nelson-Siegel or Svensson curve that is the level β0 alone, the zero rate being β0 plus terms that vanish under a parallel move.