Volatility-model calibration
Turning quotes into parameters without mistaking fit for identification
01Formulate premium- and volatility-space objectives.
02Choose weights consistent with liquidity and units.
03Diagnose identifiability and parameter instability.
04Build reproducible calibration governance.
Identify the state variables and the behavior they add.
Calibration chooses model parameters that reproduce selected market quotes under an objective function. A low scalar error can hide systematic residuals, unidentifiable parameters and unstable hedges.
The objective defines what good fit means.
Weights encode liquidity, units and desk priorities.
Stability through time is evidence alongside cross-sectional fit.
Ask which instruments can identify the dynamics.
Every surface model and stochastic process requires a repeatable path from cleaned quotes to parameters, diagnostics and fallback decisions.
vanilla calibration baskets
caps/floors
swaptions
exotic proxy instruments
State calibration instruments, timestamp, bid/offer, objective units, weights, parameter transforms and solver tolerances.
Write the dynamics before interpreting parameters.
Weighted least squares
Fit and regularization are explicit modelling choices.
Open in AnalyticsGauss–Newton step
The Jacobian reveals local parameter sensitivity and conditioning.
Open in AnalyticsFull derivation
From quote residuals to a parameter update
Linearize model quotes around the current parameter vector.
- 01
Define residuals
Choose premium, implied-volatility or normalized residuals and preserve their units.
- 02
Linearize the model
Approximate residuals for a small parameter update using the Jacobian.
- 03
Form the quadratic objective
Insert the linearization into weighted least squares and add damping or regularization.
- 04
Set the gradient to zero
The normal equations produce a local Gauss–Newton step.
- 05
Accept only validated steps
Reprice, enforce domains, inspect residual shape and compare parameters with previous snapshots.
A calibration result is a parameter vector plus residuals, conditioning, constraints, lineage and a decision on whether it is safe to use.
Inputs
θ: parameter vectorq_i: market quotem_i(θ): model quoteW: weight matrixλR(θ): regularizer
Assumptions and limits
- Non-convex objectives have local minima.
- Sparse quotes weakly identify parameters.
- Different units and weights produce different optima.
Conditioning
A large condition number signals weak local identification.
Open in AnalyticsCalibrate, compute, and challenge the dynamics.
Use bounded parameter transforms, deterministic multi-starts, analytical or validated sensitivities, and a documented fallback.
This lesson calibrates calibration itself: choose objective, weights, basket, regularization and stopping rules before fitting the production model.
Implementation with current QuantLib
Current QuantLib separates market structures, processes, instruments, engines and calibration helpers. Use those abstractions only after the lesson’s conventions, domains and numerical checks are explicit.
API authority: upstream QuantLib reference pinned in the source registry.06PYTHON IMPLEMENTATIONOpen the implementation and checks.
- Validate domains and units at the boundary.
- Keep the numerical kernel framework-free and deterministic.
- Return diagnostics with values.
- Test analytical limits and failure states.
Linear calibration diagnostic
Solve a weighted linearized fit and inspect conditioning.
from __future__ import annotations import numpy as np def gauss_newton_step(jacobian: np.ndarray, residual: np.ndarray, damping: float = 1e-6) -> tuple[np.ndarray, float]: if jacobian.shape[0] != residual.size or damping < 0: raise ValueError("invalid calibration dimensions") normal = jacobian.T @ jacobian + damping * np.eye(jacobian.shape[1]) step = np.linalg.solve(normal, -(jacobian.T @ residual)) return step, float(np.linalg.cond(normal)) j = np.array([[1.0, 0.1], [1.0, 0.4], [1.0, 0.9]])r = np.array([0.01, -0.005, 0.002])step, condition = gauss_newton_step(j, r)assert np.isfinite(step).all() and np.isfinite(condition)assert np.linalg.norm(j @ step + r) < np.linalg.norm(r)print(np.round(step, 6), round(condition, 2))Shock one parameter and trace the full response.
Calibration residual lab
Change weights, noise and initial parameters; watch optimizer path, residual heatmap and conditioning.
Well identified: Residuals decay with stable conditioning.
- weighted RMSE
- condition (scaled)
Use Left/Right or Up/Down arrows to inspect values; Home and End jump to the bounds.
Where the model meets the book.
“A perfect fit with unstable parameters is an expensive interpolation scheme.”
timestamped quotes
bid/offer
basket
weights
constraints
This lesson calibrates calibration itself: choose objective, weights, basket, regularization and stopping rules before fitting the production model.
RISKparameter jump
basis residual
solver risk
model selection
- freeze snapshot
- clean basket
- multi-start fit
- inspect residuals
- approve/fallback
Production failure modes
- unit mismatch
- silent constraint binding
- nondeterministic start
- missing diagnostics
09MACRO CONNECTIONOpen the transmission channel.
Regime shifts expose parameter identification
When the surface changes shape, parameters that were redundant in calm markets can move abruptly or hit bounds.
transmitschanges quote geometry
transmitsexposes sensitivities
transmitsmove or become unstable
outputaccepts, regularizes or falls back
10COMMON PITFALLSOpen the failure checklist.
Reporting only RMSE.
Mixing premium and vol residuals without normalization.
Using one starting point.
Ignoring day-over-day parameter stability.
11SOURCES / FURTHER READINGOpen sources and continue the track.
Volatility, Monte Carlo and stochastic-volatility lectures
Research map for the mathematical progression and numerical experiments; prose, examples and code are original.
- Source
- Computational Finance Course
- Author
- L. A. Grzelak
- Ref
- main
Current volatility structures, processes, calibration helpers and tests
Implementation reference for production abstractions and validation patterns.
- Source
- QuantLib upstream
- Author
- QuantLib contributors
- Ref
- v1.42.1