Function calibrate_hull_white_to_strip
pub fn calibrate_hull_white_to_strip(
market: &MarketContext,
currency: Currency,
collateral: &CollateralSpec,
strip: &[StripPoint],
mean_reversion: f64,
shape: SigmaShape,
) -> Result<CalibratedSigma, CalibrationError>Expand description
Fits σ in shape to an explicit swaption strip, against market’s
discount curve under collateral and its pinned normal-vol quotes, with
mean_reversion exogenous.
Each point is an ATM payer swaption on currency’s surface, its quote
read from the label swaption_normal_vol_label gives it. The callable
entry point wraps this with the strip the bond implies; here the strip is
the caller’s, so a calibration can be driven by a chosen set of swaptions
rather than by an instrument that happens to imply them.
§Errors
CalibrationError::EmptyStrip for an empty strip;
CalibrationError::MissingQuote naming the first unpinned label;
CalibrationError::StripNoConvergence and
CalibrationError::SigmaAtBracketEdge from the solve; for the piecewise
shape CalibrationError::DuplicateStripExpiry and
CalibrationError::InfeasibleTerm; pricing and curve errors otherwise.