Function fit_bond_curve
pub fn fit_bond_curve(
reference: NaiveDate,
quotes: &[(FixedRateBond, f64)],
form: FittedForm,
weights: FitWeights,
) -> Result<FittedBondCurve, FitError>Expand description
Fit a parametric discount curve to quotes — (bond, clean price) pairs —
as of reference.
A smoother: it will not reprice its inputs, and the rows it returns say
by how much it misses. Reach for calibrate when
exactness matters.
§Errors
FitError for an underdetermined universe, a solve that did not converge,
a curve or yield query that failed, or — for the exponential-splines form
only — a fitted curve that is not a discount curve across the horizon.