Class DupireLocalVol
σ_loc²(T, y) = ∂_T w / [ 1 − (y/w) ∂_y w + ¼(−¼ − 1/w + y²/w²)(∂_y w)² + ½ ∂_yy w ]
with w = w(T, y) total implied variance and y = ln(K/F(T)). The
denominator is the Gatheral-Jacquier density factor g(y), so it is
positive exactly where the surface has no butterfly arbitrage and the
numerator is non-negative exactly where it has no calendar arbitrage.
Derivatives are central differences (step 1e-4 in y and
min(1e-4, t/4) in T) on the surface, so any TotalVarianceSurface
works; at a pillar of a piecewise-linear θ_t the T-difference averages the
two one-sided slopes.
Local vol is a function of calendar time t and spot S, with
y = ln(S/F(t)). Times below MIN_TIME are evaluated at
MIN_TIME, since the short-expiry limit of a parametric surface is
not identified by the quotes. A non-positive numerator or denominator is
an arbitrage in the input surface and raises an exception rather than
returning NaN.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleFloor on t (years) when evaluating the surface derivatives. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublelocalVol(double t, double s) Local volatility at calendar timet(years) and spots.doublelocalVolAtMoneyness(double t, double y) Local volatility at timet> 0 and log-moneyness y = ln(S/F(t)).surface()
-
Field Details
-
MIN_TIME
public static final double MIN_TIMEFloor on t (years) when evaluating the surface derivatives.- See Also:
-
-
Constructor Details
-
DupireLocalVol
-
-
Method Details
-
surface
-
localVol
public double localVol(double t, double s) Local volatility at calendar timet(years) and spots. -
localVolAtMoneyness
public double localVolAtMoneyness(double t, double y) Local volatility at timet> 0 and log-moneyness y = ln(S/F(t)).
-