Expand description
Dupire local volatility calibrated from an implied vol surface.
Uses Gatheral’s formulation of the Dupire equation in total variance
w(y, t) = sigma_imp(K, t)^2 * t, y = ln(K / F(t)):
sigma_loc^2(K, t) = (dw/dt) /
[ 1 - (y/w) w_y + 1/4 (-1/4 - 1/w + y^2/w^2) w_y^2 + 1/2 w_yy ]Derivatives are taken numerically on the implied surface: the time
derivative at fixed moneyness y, the strike derivatives at fixed t.
The “calibration” is therefore non-parametric — the local vol function
is the exact transformation of whatever implied surface it is given.
Guards: at very short times the implied vol is returned directly; where
interpolation noise makes the denominator or numerator non-positive
(butterfly / calendar violations in the inputs) the implied vol is used
as a fallback; the result is clamped to [1%, 300%].
Structs§
- Local
Vol - Local volatility function
sigma_loc(level, t), frozen at construction from an implied surface, a discount curve (for forwards) and a dividend yield.