FerroRisk

Surface calibration

Calibrate an implied-volatility smile and carry fit diagnostics forward.

Surface calibration produces both parameters and diagnostics. Consumers should carry the fit quality, residuals, and no-arbitrage checks alongside the surface, because downstream spread and risk engines depend on that provenance.

use ferro_risk::surface::{
    calibrate_svi_surface, SurfaceCalibrationInput, SurfaceMarketContext,
    SviCalibrationPolicy,
};
 
let market = SurfaceMarketContext::new("SPY", 500.0, None, 0.045, 0.012, None)?;
 
// In production this vector normally comes from
// `normalize_chain_for_surface` or
// `prepare_calibration_input_with_quality_policy`.
let normalized_quotes = load_normalized_surface_quotes()?;
 
let input = SurfaceCalibrationInput::new(market, normalized_quotes)?;
let outcome = calibrate_svi_surface(&input, &SviCalibrationPolicy::new())?;
 
assert!(outcome.report().summary().weighted_rmse_implied_volatility().is_finite());
# Ok::<(), ferro_risk::FerroRiskError>(())

Use the API reference for the current calibration structs and model-specific parameter types.