Skip to main content

solve_flat_spread

Function solve_flat_spread 

pub(crate) fn solve_flat_spread(
    terms: &[(f64, f64)],
    target: f64,
) -> Result<f64, SpreadSolveError>
Expand description

The flat continuous spread s for which Σ pvᵢ·exp(−s·τᵢ) equals target, over terms of (τ, amount·DF) snapshotted before the search — the one body the bond’s and the structured note’s z-spreads solve through.

§Errors

As z_spread_on_curve, less the curve queries the caller already made.