TQBTHEQUANTBATEMAN
TQB/ learn/ volatility/ calibrationEN · DARK
volatility · front-office

Volatility-model calibration

Turning quotes into parameters without mistaking fit for identification

BY THE END, YOU CAN

01Formulate premium- and volatility-space objectives.

02Choose weights consistent with liquidity and units.

03Diagnose identifiability and parameter instability.

04Build reproducible calibration governance.

01
INTUITION

Build the state before the equation.

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.

01

The objective defines what good fit means.

02

Weights encode liquidity, units and desk priorities.

03

Stability through time is evidence alongside cross-sectional fit.

02
WHY MARKETS CARE

The product exists before the model.

Every surface model and stochastic process requires a repeatable path from cleaned quotes to parameters, diagnostics and fallback decisions.

INSTRUMENTS

vanilla calibration baskets

caps/floors

swaptions

exotic proxy instruments

QUOTE CONVENTION

State calibration instruments, timestamp, bid/offer, objective units, weights, parameter transforms and solver tolerances.

03
MATHEMATICS

Notation, units and exact claims.

θ: parameter vectorq_i: market quotem_i(θ): model quoteW: weight matrixλR(θ): regularizer
QUANT NOTESYNTHETIC · EDUCATIONAL

Weighted least squares

Fit and regularization are explicit modelling choices.

θ^=argminθiwi(mi(θ)qi)2+λR(θ)\widehat\theta=\arg\min_\theta\sum_i w_i\left(m_i(\theta)-q_i\right)^2+\lambda R(\theta)
Read the equation together with its financial domain and convention.
QUANT NOTESYNTHETIC · EDUCATIONAL

Gauss–Newton step

The Jacobian reveals local parameter sensitivity and conditioning.

(JTWJ+λI)Δθ=JTWr(J^TWJ+\lambda I)\Delta\theta=-J^TWr
Read the equation together with its financial domain and convention.
QUANT NOTESYNTHETIC · EDUCATIONAL

Conditioning

A large condition number signals weak local identification.

κ(JTWJ)=λmaxλmin\kappa(J^TWJ)=\frac{\lambda_{max}}{\lambda_{min}}
Read the equation together with its financial domain and convention.
04
DERIVATION

Do not jump to the final expression.

DERIVATION

From quote residuals to a parameter update

Linearize model quotes around the current parameter vector.

  1. 01

    Define residuals

    Choose premium, implied-volatility or normalized residuals and preserve their units.

    ri(θ)=mi(θ)qir_i(\theta)=m_i(\theta)-q_i
  2. 02

    Linearize the model

    Approximate residuals for a small parameter update using the Jacobian.

    r(θ+Δ)r(θ)+JΔr(\theta+\Delta)\approx r(\theta)+J\Delta
  3. 03

    Form the quadratic objective

    Insert the linearization into weighted least squares and add damping or regularization.

  4. 04

    Set the gradient to zero

    The normal equations produce a local Gauss–Newton step.

    (JTWJ+λI)Δ=JTWr(J^TWJ+\lambda I)\Delta=-J^TWr
  5. 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.

05
MODEL / PRICING

Fit, compute, then challenge the assumptions.

METHOD

Use bounded parameter transforms, deterministic multi-starts, analytical or validated sensitivities, and a documented fallback.

CALIBRATION

This lesson calibrates calibration itself: choose objective, weights, basket, regularization and stopping rules before fitting the production model.

LIMITATIONS

Non-convex objectives have local minima.

Sparse quotes weakly identify parameters.

Different units and weights produce different optima.

MODEL COMPARISON

Static fit is not dynamics.

QuestionBlack–ScholesLocal volatilityHeston
Volatility stateOne constant σσ(S,t) deterministicvₜ stochastic
Fits today’s surfaceNoExactly, in ideal theoryApproximately by calibration
Forward dynamicsFlat smileSpot-drivenVariance + correlation driven
Primary strengthTransparent baselineVanilla-consistent diffusionRicher smile dynamics
Primary failureNo smileOften unrealistic forward skewParameter and calibration instability
ComputeLowMedium: PDE/MCMedium–high: Fourier/PDE/MC
Hedge implicationGreeks at one σState-localized vol hedgeVariance and vol-of-vol risk
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.
06
PYTHON LAB

Theory → implementation → checks.

PYTHON 3 · NUMPY / SCIPY

Linear calibration diagnostic

Solve a weighted linearized fit and inspect conditioning.

REUSABLE EXAMPLE
01from __future__ import annotations
02
03import numpy as np
04
05def gauss_newton_step(jacobian: np.ndarray, residual: np.ndarray, damping: float = 1e-6) -> tuple[np.ndarray, float]:
06 if jacobian.shape[0] != residual.size or damping < 0:
07 raise ValueError("invalid calibration dimensions")
08 normal = jacobian.T @ jacobian + damping * np.eye(jacobian.shape[1])
09 step = np.linalg.solve(normal, -(jacobian.T @ residual))
10 return step, float(np.linalg.cond(normal))
11
12j = np.array([[1.0, 0.1], [1.0, 0.4], [1.0, 0.9]])
13r = np.array([0.01, -0.005, 0.002])
14step, condition = gauss_newton_step(j, r)
15assert np.isfinite(step).all() and np.isfinite(condition)
16assert np.linalg.norm(j @ step + r) < np.linalg.norm(r)
17print(np.round(step, 6), round(condition, 2))
EXPECTED OUTPUTA residual-reducing step and finite condition number.
SANITY CHECKS

Dimensions are validated.

Damping is non-negative.

The linearized residual decreases.

07
INTERACTIVE LAB

Move the state. Challenge the equation.

OPTIMIZER PATH AND RESIDUAL GEOMETRY

Calibration residual lab

Change weights, noise and initial parameters; watch optimizer path, residual heatmap and conditioning.

SYNTHETIC · CONTROLLED SCENARIOS
Final RMSE0.0016
Condition stateWell identified
Iterations30
ACTIVE STATE

Well identifiedResiduals decay with stable conditioning. Move the intensity control and inspect every series with pointer or touch.

08
FRONT OFFICE

Where the model meets the book.

ON THE DESK
A perfect fit with unstable parameters is an expensive interpolation scheme.
VISIBLE INPUTS

timestamped quotes

bid/offer

basket

weights

constraints

CALIBRATION

This lesson calibrates calibration itself: choose objective, weights, basket, regularization and stopping rules before fitting the production model.

RISK

parameter jump

basis residual

solver risk

model selection

DAILY WORKFLOW
  1. freeze snapshot
  2. clean basket
  3. multi-start fit
  4. inspect residuals
  5. approve/fallback
Production failure modes
  • unit mismatch
  • silent constraint binding
  • nondeterministic start
  • missing diagnostics
09
MACRO CONNECTION

Map the transmission channel.

MACRO CONNECTION

Regime shifts expose parameter identification

When the surface changes shape, parameters that were redundant in calm markets can move abruptly or hit bounds.

Regime shift

changes quote geometry

Calibration basket

exposes sensitivities

Parameters

move or become unstable

Model governance

accepts, regularizes or falls back

10
COMMON PITFALLS

Most failures begin outside the formula.

01

Reporting only RMSE.

02

Mixing premium and vol residuals without normalization.

03

Using one starting point.

04

Ignoring day-over-day parameter stability.

11
SOURCES / FURTHER READING

Attribution with implementation authority.

researchBSD-3-Clause

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
OPEN ORIGINAL SOURCE ↗LICENSE ↗
implementation referenceQuantLib permissive license

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
OPEN ORIGINAL SOURCE ↗LICENSE ↗