Skip to main content

sabr_vol

Function sabr_vol 

pub fn sabr_vol<R: Scalar>(
    formula: SabrFormula,
    forward: R,
    strike: R,
    expiry_years: f64,
    p: &SabrParams<R>,
) -> Result<R, SabrError>
Expand description

The SABR implied vol of strike at forward and expiry_years under formula.

§Errors

SabrError::Parameter for α ≤ 0, ν < 0, |ρ| ≥ RHO_BOUND or β outside [0, 1]; SabrError::Domain for a shifted forward or strike ≤ 0 under the shifted formulas; SabrError::NonPositiveVol where the expansion’s correction takes the vol to zero or below.