Skip to main content

residuals_and_jacobian

Function residuals_and_jacobian 

fn residuals_and_jacobian(
    shape: &Curve,
    quotes: &[(FixedRateBond, f64)],
    params: &[f64],
    scale: &[f64],
    reference: NaiveDate,
) -> Result<(Vec<f64>, Vec<Vec<f64>>), CurveError>
Expand description

The weighted residual vector and its Jacobian at one parameter point.

One seeded pass per lane block, so a form no wider than LANES costs one valuation per bond and nothing is differenced. A wider form blocks, and every parameter gets a column — a Jacobian silently missing one converges to the wrong place.