Skip to main content

discount_quotes_in

Function discount_quotes_in 

fn discount_quotes_in<R: Scalar>(
    curve: &Curve,
    rungs: &[Rung],
    fixings: &FixingStore,
    fx: &FxRates,
    form: Form<'_>,
    run: impl FnOnce(&mut dyn FnMut(&[R]) -> Result<Vec<R>, CalibrationError>) -> Result<(Vec<f64>, Vec<Vec<f64>>, JacobianEngine), CalibrationError>,
) -> Result<(Vec<f64>, Vec<Vec<f64>>, JacobianEngine), CalibrationError>
Expand description

The discount form’s pass in mode R: the stores lifted once, then run handed the closure that values every rung on the curve seeded describes.

The Jacobian runs in its own mode, so it lifts its own stores: the solve’s are Jet1 and cannot be reused at another width. Lifting once per quote block rather than once per valuation is the point — a store that does not move should not be re-lifted for every rung.