public final class SmileDeltaParameters extends Object implements ParameterizedData, org.joda.beans.ImmutableBean, Serializable
This contains the data for delta dependent smile from at-the-money, risk reversal and strangle. The delta used is the delta with respect to forward.
| Modifier and Type | Class and Description |
|---|---|
static class |
SmileDeltaParameters.Meta
The meta-bean for
SmileDeltaParameters. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
DoubleArray |
getDelta()
Gets the delta of the different data points.
|
double |
getExpiry()
Gets the time to expiry associated with the data.
|
Optional<Tenor> |
getExpiryTenor()
Gets the tenor associated with the time to expiry, optional.
|
double |
getParameter(int parameterIndex) |
int |
getParameterCount() |
ImmutableList<ParameterMetadata> |
getParameterMetadata()
Gets the associated metadata.
|
ParameterMetadata |
getParameterMetadata(int parameterIndex) |
DoubleArray |
getVolatility()
Gets the volatilities associated with the strikes.
|
int |
hashCode() |
DoubleArray |
impliedStrikesDerivativeToExpiry(double forward)
Calculates the derivatives of the implied strikes to expiry.
|
DoubleArray |
impliedStrikesDerivativeToSmileVols(double forward)
Calculates the derivatives of the implied strikes to volatility.
|
static SmileDeltaParameters.Meta |
meta()
The meta-bean for
SmileDeltaParameters. |
SmileDeltaParameters.Meta |
metaBean() |
static SmileDeltaParameters |
of(double expiry,
DoubleArray delta,
DoubleArray volatility)
Obtains an instance from volatility.
|
static SmileDeltaParameters |
of(double expiry,
DoubleArray delta,
DoubleArray volatility,
List<ParameterMetadata> parameterMetadata)
Obtains an instance from volatility.
|
static SmileDeltaParameters |
of(double expiry,
double atmVolatility,
DoubleArray delta,
DoubleArray riskReversal,
DoubleArray strangle)
Obtains an instance from market data at-the-money, delta, risk-reversal and strangle.
|
static SmileDeltaParameters |
of(double expiry,
double atmVolatility,
DoubleArray delta,
DoubleArray riskReversal,
DoubleArray strangle,
List<ParameterMetadata> parameterMetadata)
Obtains an instance from market data at-the-money, delta, risk-reversal and strangle.
|
static SmileDeltaParameters |
of(double expiry,
Tenor expiryTenor,
DoubleArray delta,
DoubleArray volatility)
Obtains an instance from volatility.
|
static SmileDeltaParameters |
of(double expiry,
Tenor expiryTenor,
double atmVolatility,
DoubleArray delta,
DoubleArray riskReversal,
DoubleArray strangle)
Obtains an instance from market data at-the-money, delta, risk-reversal and strangle.
|
DoubleArray |
strike(double forward)
Calculates the strikes in ascending order.
|
String |
toString() |
SmileDeltaParameters |
withParameter(int parameterIndex,
double newValue) |
SmileDeltaParameters |
withPerturbation(ParameterPerturbation perturbation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitfindParameterIndexpublic static SmileDeltaParameters of(double expiry, DoubleArray delta, DoubleArray volatility)
GenericVolatilitySurfaceYearFractionParameterMetadata is used for parameter metadata.
expiry - the time to expiry associated to the datadelta - the delta of the different data points, must be positive and sorted in ascending order,
the put will have as delta the opposite of the numbersvolatility - the volatilitiespublic static SmileDeltaParameters of(double expiry, Tenor expiryTenor, DoubleArray delta, DoubleArray volatility)
GenericVolatilitySurfaceYearFractionParameterMetadata is used for parameter metadata.
expiry - the time to expiry associated to the dataexpiryTenor - the tenor associated with the expirydelta - the delta of the different data points, must be positive and sorted in ascending order,
the put will have as delta the opposite of the numbersvolatility - the volatilitiespublic static SmileDeltaParameters of(double expiry, DoubleArray delta, DoubleArray volatility, List<ParameterMetadata> parameterMetadata)
expiry - the time to expiry associated to the datadelta - the delta of the different data points, must be positive and sorted in ascending order,
the put will have as delta the opposite of the numbersvolatility - the volatilitiesparameterMetadata - the parameter metadatapublic static SmileDeltaParameters of(double expiry, double atmVolatility, DoubleArray delta, DoubleArray riskReversal, DoubleArray strangle)
GenericVolatilitySurfaceYearFractionParameterMetadata is used for parameter metadata.
expiry - the time to expiry associated to the dataatmVolatility - the at-the-money volatilitydelta - the delta of the different data points, must be positive and sorted in ascending order,
the put will have as delta the opposite of the numbersriskReversal - the risk reversal volatility figures, in the same order as the deltastrangle - the strangle volatility figures, in the same order as the deltapublic static SmileDeltaParameters of(double expiry, Tenor expiryTenor, double atmVolatility, DoubleArray delta, DoubleArray riskReversal, DoubleArray strangle)
This factory allows the tenor to be included in the parameter metadata.
expiry - the time to expiry associated to the dataexpiryTenor - the tenor associated with the expiryatmVolatility - the at-the-money volatilitydelta - the delta of the different data points, must be positive and sorted in ascending order,
the put will have as delta the opposite of the numbersriskReversal - the risk reversal volatility figures, in the same order as the deltastrangle - the strangle volatility figures, in the same order as the deltapublic static SmileDeltaParameters of(double expiry, double atmVolatility, DoubleArray delta, DoubleArray riskReversal, DoubleArray strangle, List<ParameterMetadata> parameterMetadata)
expiry - the time to expiry associated to the dataatmVolatility - the at-the-money volatilitydelta - the delta of the different data points, must be positive and sorted in ascending order,
the put will have as delta the opposite of the numbersriskReversal - the risk reversal volatility figures, in the same order as the deltastrangle - the strangle volatility figures, in the same order as the deltaparameterMetadata - the parameter metadatapublic int getParameterCount()
getParameterCount in interface ParameterizedDatapublic double getParameter(int parameterIndex)
getParameter in interface ParameterizedDatapublic ParameterMetadata getParameterMetadata(int parameterIndex)
getParameterMetadata in interface ParameterizedDatapublic SmileDeltaParameters withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDatapublic SmileDeltaParameters withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatapublic DoubleArray strike(double forward)
The result has twice the number of values plus one as the delta/volatility. The put with lower delta (in absolute value) first, at-the-money and call with larger delta first.
forward - the forwardpublic DoubleArray impliedStrikesDerivativeToExpiry(double forward)
forward - the forwardpublic DoubleArray impliedStrikesDerivativeToSmileVols(double forward)
forward - the forwardpublic Optional<Tenor> getExpiryTenor()
public static SmileDeltaParameters.Meta meta()
SmileDeltaParameters.public SmileDeltaParameters.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic double getExpiry()
public DoubleArray getDelta()
[0.1, 0.25]. The at-the-money value of 0.5 is not included.public DoubleArray getVolatility()
(delta.size() * 2) + 1 with the put with lower delta (in absolute value) first,
at-the-money and call with larger delta first.public ImmutableList<ParameterMetadata> getParameterMetadata()
(delta.size() * 2) + 1 with the put with lower delta (in absolute value) first,
at-the-money and call with larger delta first.Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.