Function calibrate_curve_helpers
pub fn calibrate_curve_helpers(
market: &MarketContext,
rungs: &[Rung],
options: &CalibrationOptions,
) -> Result<(MarketContext, Vec<HelperSolve>), CalibrationError>Expand description
Calibrates the curves a list of helpers solves and pins them into a copy
of market.
A helper is a Rung: a real instrument with its quote declared, built
from its template by deposit_rung,
future_rung,
fra_rung,
par_rungs,
tenor_basis_rung or
cross_currency_rungs. The
rungs are grouped by the curve each solves, read off its instrument’s
declared risk factors under the family topology the par-curve verb
applies: an overnight index’s rungs pin discount(ccy) and
projection(index) as one curve; a term index’s rungs pin its projection
over the held discount(ccy); a deposit’s rungs pin discount(ccy); a
tenor basis rung pins its spread leg’s projection over the held discount
and base projection; a cross-currency basis rung pins the quoted leg’s
collateral discount under the held pay discount and both projections.
Groups that read nothing another group solves are solved in turn, each
pinned before the next so a later group reads it; groups that read each
other are solved together through calibrate_jointly_on and pinned with
no ladder of their own. Two rungs noding one date are refused by name
before any solve. A swap template’s par rungs solve to the curve
calibrate produces on them, pinned under the roles above.
§Errors
CalibrationError::OverlappingPillars for two rungs on one pillar;
CalibrationError::Pricing carrying the market’s missing-curve refusal
for a held curve the market lacks; and whatever the ladder solves refuse.