Record Class SviSlice
- Record Components:
a- variance levelb- wing slope scale, ≥ 0rho- rotation, in (−1, 1)m- horizontal shift (log-moneyness)sigma- ATM curvature, > 0
w(k) = a + b ( ρ (k − m) + √((k − m)² + σ²) )
where w is total implied variance σ_BS²·T and k = ln(K/F)
is log-moneyness against the forward. The parameter set is admissible
when b ≥ 0, |ρ| < 1, σ > 0 and a + bσ√(1−ρ²) ≥ 0, which keeps
w non-negative everywhere (Gatheral-Jacquier, section 3.1).
Butterfly arbitrage. A slice is free of butterfly arbitrage if and only
if the density factor
g(k) = (1 − k w'/(2w))² − (w'²/4)(1/w + 1/4) + w''/2 is non-negative
(Gatheral-Jacquier 2014, lemma 2.2) and d₊ → −∞ in the right wing. The
Black density is g(k)/√(2πw)·exp(−d₋²/2); minDensityFactor(double, double, int)
checks g on a grid.
Calibration (calibrate(double[], double[], double[])) is Levenberg-Marquardt on weighted
total-variance residuals in a reparametrisation that keeps every
admissibility bound and Lee's (2004) wing bound b(1+|ρ|) ≤ 4, plus an
optional penalty residual on negative g over a grid that extends half a
unit of log-moneyness past the quotes. Weights are the caller's: vega
weights or the reciprocal of the bid-ask spread in variance terms are the
usual choices. The fit is multi-start (27 starts) because the SVI
objective has several local minima.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleWeight of the min(g, 0) penalty residuals incalibrate(double[], double[], double[]). -
Constructor Summary
ConstructorsConstructorDescriptionSviSlice(double a, double b, double rho, double m, double sigma) Creates an instance of aSviSlicerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublea()Returns the value of thearecord component.doubleb()Returns the value of thebrecord component.static SviSlicecalibrate(double[] k, double[] w, double[] weights) Calibrates a slice to total-variance quotes with the butterfly penalty on.static SviSlicecalibrate(double[] k, double[] w, double[] weights, boolean butterflyPenalty) Calibrates a slice;butterflyPenaltyadds residualsBUTTERFLY_PENALTY·min(g, 0) on a 121-point grid over [min k − 0.5, max k + 0.5].doublecurvature(double k) Second derivative d²w/dk².doubledensityFactor(double k) Gatheral-Jacquier density factor g(k); negative means butterfly arbitrage.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleimpliedVol(double k, double t) Implied volatility at log-moneynesskfor expirytyears.doublem()Returns the value of themrecord component.doubleminDensityFactor(double kMin, double kMax, int n) Minimum of g overnequally spaced points of [kMin, kMax].doublerho()Returns the value of therhorecord component.doublermse(double[] k, double[] w) Root-mean-square total-variance error against quotes (unweighted).doublesigma()Returns the value of thesigmarecord component.doubleslope(double k) First derivative dw/dk.final StringtoString()Returns a string representation of this record class.doubletotalVariance(double k) Total implied variance at log-moneynessk.
-
Field Details
-
BUTTERFLY_PENALTY
public static final double BUTTERFLY_PENALTYWeight of the min(g, 0) penalty residuals incalibrate(double[], double[], double[]).- See Also:
-
-
Constructor Details
-
SviSlice
public SviSlice(double a, double b, double rho, double m, double sigma) Creates an instance of aSviSlicerecord class.
-
-
Method Details
-
totalVariance
public double totalVariance(double k) Total implied variance at log-moneynessk. -
slope
public double slope(double k) First derivative dw/dk. -
curvature
public double curvature(double k) Second derivative d²w/dk². -
impliedVol
public double impliedVol(double k, double t) Implied volatility at log-moneynesskfor expirytyears. -
densityFactor
public double densityFactor(double k) Gatheral-Jacquier density factor g(k); negative means butterfly arbitrage. -
minDensityFactor
public double minDensityFactor(double kMin, double kMax, int n) Minimum of g overnequally spaced points of [kMin, kMax]. -
rmse
public double rmse(double[] k, double[] w) Root-mean-square total-variance error against quotes (unweighted). -
calibrate
Calibrates a slice to total-variance quotes with the butterfly penalty on.- Parameters:
k- log-moneyness ln(K/F) of each quotew- market total variance σ²T of each quoteweights- residual weights, or null for equal weights
-
calibrate
public static SviSlice calibrate(double[] k, double[] w, double[] weights, boolean butterflyPenalty) Calibrates a slice;butterflyPenaltyadds residualsBUTTERFLY_PENALTY·min(g, 0) on a 121-point grid over [min k − 0.5, max k + 0.5]. At least five quotes are required. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
a
-
b
-
rho
-
m
-
sigma
-