Skip to main content

calibrate_sabr_with_atm

Function calibrate_sabr_with_atm 

pub fn calibrate_sabr_with_atm(
    atm: &RateVolSurface,
    atm_forwards: &[Vec<f64>],
    cube: &RateVolSurface,
    cube_forwards: &[Vec<f64>],
    spec: &SabrSpec,
) -> Result<SabrFit, SabrCalibrationError>
Expand description

Fits SABR on a dense ATM matrix with a sparse smile cube. σ_ATM comes from atm at every one of its nodes; ρ and ν are fitted at the cube’s nodes with σ_ATM held at the matrix’s quote there, and read onto the matrix’s nodes bilinearly, flat beyond the cube’s edges — the surface’s own read rule. The surface lives on the matrix’s nodes; its fit record maps each node onto the matrix quotes and the cube quotes its parameters depend on.

Every cube node must be a matrix node, so σ_ATM at a cube node is a quote rather than an interpolation of quotes.

§Errors

SabrCalibrationError::Grid for a matrix carrying a smile, a cube node the matrix does not quote, or forwards not shaped like their grid; otherwise as calibrate_sabr.