public final class SsviVolatilityFunction extends VolatilityFunctionProvider<SsviFormulaData> implements org.joda.beans.ImmutableBean, Serializable
Reference: Gatheral, Jim and Jacquier, Antoine. Arbitrage-free SVI volatility surfaces. arXiv:1204.0646v4, 2013. Section 4.
| Modifier and Type | Field and Description |
|---|---|
static SsviVolatilityFunction |
DEFAULT
Default implementation.
|
static double |
MIN_TIME_TO_EXPIRY
SSVI volatility description diverge for theta -> 0.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
static org.joda.beans.TypedMetaBean<SsviVolatilityFunction> |
meta()
The meta-bean for
SsviVolatilityFunction. |
org.joda.beans.TypedMetaBean<SsviVolatilityFunction> |
metaBean() |
String |
toString() |
double |
volatility(double forward,
double strike,
double timeToExpiry,
SsviFormulaData data)
Calculates the volatility.
|
ValueDerivatives |
volatilityAdjoint(double forward,
double strike,
double timeToExpiry,
SsviFormulaData data)
Computes the implied volatility in the SSVI formula and its derivatives.
|
double |
volatilityAdjoint2(double forward,
double strike,
double timeToExpiry,
SsviFormulaData data,
double[] volatilityD,
double[][] volatilityD2)
Computes the first and second order derivatives of the volatility.
|
public static final SsviVolatilityFunction DEFAULT
public static final double MIN_TIME_TO_EXPIRY
public double volatility(double forward,
double strike,
double timeToExpiry,
SsviFormulaData data)
VolatilityFunctionProvidervolatility in class VolatilityFunctionProvider<SsviFormulaData>forward - the forward value of the underlyingstrike - the strike value of the optiontimeToExpiry - the time to expiry of the optiondata - the model datapublic ValueDerivatives volatilityAdjoint(double forward, double strike, double timeToExpiry, SsviFormulaData data)
The derivatives are stored in an array with:
volatilityAdjoint in class VolatilityFunctionProvider<SsviFormulaData>forward - the forward value of the underlyingstrike - the strike value of the optiontimeToExpiry - the time to expiry of the optiondata - the SSVI datapublic double volatilityAdjoint2(double forward,
double strike,
double timeToExpiry,
SsviFormulaData data,
double[] volatilityD,
double[][] volatilityD2)
VolatilityFunctionProvider
The first derivative values will be stored in the input array volatilityD
The array contains, [0] Derivative w.r.t the forward, [1] the derivative w.r.t the strike, then followed by model
parameters.
Thus the length of the array should be 2 + (number of model parameters).
The second derivative values will be stored in the input array volatilityD2.
Only the second order derivative with respect to the forward and strike must be implemented.
The array contains [0][0] forward-forward; [0][1] forward-strike; [1][1] strike-strike.
Thus the size should be 2 x 2.
volatilityAdjoint2 in class VolatilityFunctionProvider<SsviFormulaData>forward - the forward value of the underlyingstrike - the strike value of the optiontimeToExpiry - the time to expiry of the optiondata - the model datavolatilityD - the array used to return the first order derivativevolatilityD2 - the array of array used to return the second order derivativepublic static org.joda.beans.TypedMetaBean<SsviVolatilityFunction> meta()
SsviVolatilityFunction.public org.joda.beans.TypedMetaBean<SsviVolatilityFunction> metaBean()
metaBean in interface org.joda.beans.BeanCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.