public final class InterpolatedStrikeSmileDeltaTermStructure extends Object implements SmileDeltaTermStructure, ParameterizedData, org.joda.beans.ImmutableBean, Serializable
The term structure defined here is composed of smile descriptions at different times.
The data of each smile contains delta and volatility in SmileDeltaParameters.
The delta values must be common to all of the smiles.
Time interpolation and extrapolation are used to obtain a smile for the objective time. Strike interpolation and extrapolation are used in the expiry-strike space where the delta values are converted to strikes using the Black formula.
The default for the time direction is time squire interpolation with flat extrapolation. The default for the strike direction is linear interpolation with flat extrapolation.
| Modifier and Type | Class and Description |
|---|---|
static class |
InterpolatedStrikeSmileDeltaTermStructure.Meta
The meta-bean for
InterpolatedStrikeSmileDeltaTermStructure. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
DayCount |
getDayCount()
Gets the day count convention used for the expiry.
|
DoubleArray |
getExpiries()
Gets the expiries associated with the volatility term.
|
List<Optional<Tenor>> |
getExpiryTenors()
Gets the tenor associated with each expiry in the volatility term.
|
double |
getParameter(int parameterIndex) |
int |
getParameterCount() |
ParameterMetadata |
getParameterMetadata(int parameterIndex) |
CurveExtrapolator |
getStrikeExtrapolatorLeft()
Gets the left extrapolator used in the strike dimension.
|
CurveExtrapolator |
getStrikeExtrapolatorRight()
Gets the right extrapolator used in the strike dimension.
|
CurveInterpolator |
getStrikeInterpolator()
Gets the interpolator used in the strike dimension.
|
CurveExtrapolator |
getTimeExtrapolatorLeft()
Gets the left extrapolator used in the time dimension.
|
CurveExtrapolator |
getTimeExtrapolatorRight()
Gets the right extrapolator used in the time dimension.
|
CurveInterpolator |
getTimeInterpolator()
Gets the interpolator used in the time dimension.
|
ImmutableList<SmileDeltaParameters> |
getVolatilityTerm()
Gets the smile description at the different time to expiry.
|
int |
hashCode() |
static InterpolatedStrikeSmileDeltaTermStructure.Meta |
meta()
The meta-bean for
InterpolatedStrikeSmileDeltaTermStructure. |
InterpolatedStrikeSmileDeltaTermStructure.Meta |
metaBean() |
static InterpolatedStrikeSmileDeltaTermStructure |
of(DoubleArray expiries,
DoubleArray delta,
DoubleArray atm,
DoubleMatrix riskReversal,
DoubleMatrix strangle,
DayCount dayCount)
Obtains volatility term structure from expiry times, delta values, ATM volatilities, risk reversal figures and
strangle figures.
|
static InterpolatedStrikeSmileDeltaTermStructure |
of(DoubleArray expiries,
DoubleArray delta,
DoubleArray atm,
DoubleMatrix riskReversal,
DoubleMatrix strangle,
DayCount dayCount,
CurveInterpolator strikeInterpolator,
CurveExtrapolator strikeExtrapolatorLeft,
CurveExtrapolator strikeExtrapolatorRight)
Obtains volatility term structure from expiry times, delta values, ATM volatilities, risk reversal figures and
strangle figures with strike interpolator and extrapolators specified.
|
static InterpolatedStrikeSmileDeltaTermStructure |
of(DoubleArray expiries,
DoubleArray delta,
DoubleArray atm,
DoubleMatrix riskReversal,
DoubleMatrix strangle,
DayCount dayCount,
CurveInterpolator timeInterpolator,
CurveExtrapolator timeExtrapolatorLeft,
CurveExtrapolator timeExtrapolatorRight,
CurveInterpolator strikeInterpolator,
CurveExtrapolator strikeExtrapolatorLeft,
CurveExtrapolator strikeExtrapolatorRight)
Obtains volatility term structure from expiry times, delta values, ATM volatilities, risk reversal figures and
strangle figures with interpolator and extrapolators fully specified.
|
static InterpolatedStrikeSmileDeltaTermStructure |
of(DoubleArray expiries,
DoubleArray delta,
DoubleMatrix volatility,
DayCount dayCount)
Obtains volatility term structure from expiry times, delta values and volatilities.
|
static InterpolatedStrikeSmileDeltaTermStructure |
of(DoubleArray expiries,
DoubleArray delta,
DoubleMatrix volatility,
DayCount dayCount,
CurveInterpolator strikeInterpolator,
CurveExtrapolator strikeExtrapolatorLeft,
CurveExtrapolator strikeExtrapolatorRight)
Obtains volatility term structure from expiry times, delta values and volatilities
with strike interpolator and extrapolators specified.
|
static InterpolatedStrikeSmileDeltaTermStructure |
of(DoubleArray expiries,
DoubleArray delta,
DoubleMatrix volatility,
DayCount dayCount,
CurveInterpolator timeInterpolator,
CurveExtrapolator timeExtrapolatorLeft,
CurveExtrapolator timeExtrapolatorRight,
CurveInterpolator strikeInterpolator,
CurveExtrapolator strikeExtrapolatorLeft,
CurveExtrapolator strikeExtrapolatorRight)
Obtains volatility term structure from expiry times, delta values and volatilities
with interpolator and extrapolators fully specified.
|
static InterpolatedStrikeSmileDeltaTermStructure |
of(List<SmileDeltaParameters> volatilityTerm,
DayCount dayCount)
Obtains volatility term structure from a set of smile descriptions.
|
static InterpolatedStrikeSmileDeltaTermStructure |
of(List<SmileDeltaParameters> volatilityTerm,
DayCount dayCount,
CurveExtrapolator timeExtrapolatorLeft,
CurveInterpolator timeInterpolator,
CurveExtrapolator timeExtrapolatorRight,
CurveExtrapolator strikeExtrapolatorLeft,
CurveInterpolator strikeInterpolator,
CurveExtrapolator strikeExtrapolatorRight)
Deprecated.
Use variant with correct interpolator/extrapolator order
|
static InterpolatedStrikeSmileDeltaTermStructure |
of(List<SmileDeltaParameters> volatilityTerm,
DayCount dayCount,
CurveInterpolator strikeInterpolator,
CurveExtrapolator strikeExtrapolatorLeft,
CurveExtrapolator strikeExtrapolatorRight)
Obtains volatility term structure from a set of smile descriptions
with strike interpolator and extrapolators specified.
|
static InterpolatedStrikeSmileDeltaTermStructure |
of(List<SmileDeltaParameters> volatilityTerm,
DayCount dayCount,
CurveInterpolator timeInterpolator,
CurveExtrapolator timeExtrapolatorLeft,
CurveExtrapolator timeExtrapolatorRight,
CurveInterpolator strikeInterpolator,
CurveExtrapolator strikeExtrapolatorLeft,
CurveExtrapolator strikeExtrapolatorRight)
Obtains volatility term structure from a set of smile descriptions
with interpolator and extrapolators fully specified.
|
ValueDerivatives |
partialFirstDerivatives(double expiry,
double strike,
double forward)
Computes the partial derivatives of the volatilities.
|
SmileAndBucketedSensitivities |
smileAndSensitivitiesForExpiry(double expiry,
DoubleArray volatilityAtTimeSensitivity)
Calculates the smile at a given time and the sensitivities with respect to the volatility data points.
|
SmileDeltaParameters |
smileForExpiry(double expiry)
Calculates the smile at a given time.
|
String |
toString() |
double |
volatility(double time,
double strike,
double forward)
Calculates the volatility at a given time/strike/forward from the term structure.
|
VolatilityAndBucketedSensitivities |
volatilityAndSensitivities(double time,
double strike,
double forward)
Calculates the volatility and the volatility sensitivity with respect to the volatility data points.
|
InterpolatedStrikeSmileDeltaTermStructure |
withParameter(int parameterIndex,
double newValue) |
InterpolatedStrikeSmileDeltaTermStructure |
withPerturbation(ParameterPerturbation perturbation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDelta, getDeltaFull, getSmileCount, getStrikeCountfindParameterIndexpublic static InterpolatedStrikeSmileDeltaTermStructure of(List<SmileDeltaParameters> volatilityTerm, DayCount dayCount)
The time dimension will use 'TimeSquare' interpolation with flat extrapolation. The strike dimension will use 'Linear' interpolation with flat extrapolation.
volatilityTerm - the volatility descriptionsdayCount - the day count used for the expiry year-fractionpublic static InterpolatedStrikeSmileDeltaTermStructure of(List<SmileDeltaParameters> volatilityTerm, DayCount dayCount, CurveInterpolator strikeInterpolator, CurveExtrapolator strikeExtrapolatorLeft, CurveExtrapolator strikeExtrapolatorRight)
The time dimension will use 'TimeSquare' interpolation with flat extrapolation.
volatilityTerm - the volatility descriptionsdayCount - the day count used for the expiry year-fractionstrikeInterpolator - interpolator used in the strike dimensionstrikeExtrapolatorLeft - left extrapolator used in the strike dimensionstrikeExtrapolatorRight - right extrapolator used in the strike dimension@Deprecated public static InterpolatedStrikeSmileDeltaTermStructure of(List<SmileDeltaParameters> volatilityTerm, DayCount dayCount, CurveExtrapolator timeExtrapolatorLeft, CurveInterpolator timeInterpolator, CurveExtrapolator timeExtrapolatorRight, CurveExtrapolator strikeExtrapolatorLeft, CurveInterpolator strikeInterpolator, CurveExtrapolator strikeExtrapolatorRight)
volatilityTerm - the volatility descriptionsdayCount - the day count used for the expiry year-fractiontimeExtrapolatorLeft - left extrapolator used in the time dimensiontimeInterpolator - interpolator used in the time dimensiontimeExtrapolatorRight - right extrapolator used in the time dimensionstrikeExtrapolatorLeft - left extrapolator used in the strike dimensionstrikeInterpolator - interpolator used in the strike dimensionstrikeExtrapolatorRight - right extrapolator used in the strike dimensionpublic static InterpolatedStrikeSmileDeltaTermStructure of(List<SmileDeltaParameters> volatilityTerm, DayCount dayCount, CurveInterpolator timeInterpolator, CurveExtrapolator timeExtrapolatorLeft, CurveExtrapolator timeExtrapolatorRight, CurveInterpolator strikeInterpolator, CurveExtrapolator strikeExtrapolatorLeft, CurveExtrapolator strikeExtrapolatorRight)
volatilityTerm - the volatility descriptionsdayCount - the day count used for the expiry year-fractiontimeInterpolator - interpolator used in the time dimensiontimeExtrapolatorLeft - left extrapolator used in the time dimensiontimeExtrapolatorRight - right extrapolator used in the time dimensionstrikeInterpolator - interpolator used in the strike dimensionstrikeExtrapolatorLeft - left extrapolator used in the strike dimensionstrikeExtrapolatorRight - right extrapolator used in the strike dimensionpublic static InterpolatedStrikeSmileDeltaTermStructure of(DoubleArray expiries, DoubleArray delta, DoubleMatrix volatility, DayCount dayCount)
The market date consists of time to expiry, delta and volatility. The delta must be positive and sorted in ascending order. The range of delta is common to all time to expiry.
volatility should be n * (2 * m + 1), where n is the length of expiry
and m is the length of delta.
The time dimension will use 'TimeSquare' interpolation with flat extrapolation. The strike dimension will use 'Linear' interpolation with flat extrapolation.
expiries - the expiry times of individual volatility smilesdelta - the delta valuesvolatility - the volatilitiesdayCount - the day count used for the expiry year-fractionpublic static InterpolatedStrikeSmileDeltaTermStructure of(DoubleArray expiries, DoubleArray delta, DoubleMatrix volatility, DayCount dayCount, CurveInterpolator strikeInterpolator, CurveExtrapolator strikeExtrapolatorLeft, CurveExtrapolator strikeExtrapolatorRight)
The market date consists of time to expiry, delta and volatility. The delta must be positive and sorted in ascending order. The range of delta is common to all time to expiry.
volatility should be n * (2 * m + 1), where n is the length of expiry
and m is the length of delta.
The time dimension will use 'TimeSquare' interpolation with flat extrapolation.
expiries - the expiry times of individual volatility smilesdelta - the delta valuesvolatility - the volatilitiesdayCount - the day count used for the expiry year-fractionstrikeInterpolator - interpolator used in the strike dimensionstrikeExtrapolatorLeft - left extrapolator used in the strike dimensionstrikeExtrapolatorRight - right extrapolator used in the strike dimensionpublic static InterpolatedStrikeSmileDeltaTermStructure of(DoubleArray expiries, DoubleArray delta, DoubleMatrix volatility, DayCount dayCount, CurveInterpolator timeInterpolator, CurveExtrapolator timeExtrapolatorLeft, CurveExtrapolator timeExtrapolatorRight, CurveInterpolator strikeInterpolator, CurveExtrapolator strikeExtrapolatorLeft, CurveExtrapolator strikeExtrapolatorRight)
The market date consists of time to expiry, delta and volatility. The delta must be positive and sorted in ascending order. The range of delta is common to all time to expiry.
volatility should be n * (2 * m + 1), where n is the length of expiry
and m is the length of delta.
expiries - the expiry times of individual volatility smilesdelta - the delta valuesvolatility - the volatilitiesdayCount - the day count used for the expiry year-fractiontimeInterpolator - interpolator used in the time dimensiontimeExtrapolatorLeft - left extrapolator used in the time dimensiontimeExtrapolatorRight - right extrapolator used in the time dimensionstrikeInterpolator - interpolator used in the strike dimensionstrikeExtrapolatorLeft - left extrapolator used in the strike dimensionstrikeExtrapolatorRight - right extrapolator used in the strike dimensionpublic static InterpolatedStrikeSmileDeltaTermStructure of(DoubleArray expiries, DoubleArray delta, DoubleArray atm, DoubleMatrix riskReversal, DoubleMatrix strangle, DayCount dayCount)
The range of delta is common to all time to expiry.
riskReversal and strangle should be n * m, and the length of atm should n,
where n is the length of expiry and m is the length of delta.
The time dimension will use 'TimeSquare' interpolation with flat extrapolation. The strike dimension will use 'Linear' interpolation with flat extrapolation.
expiries - the expiry times of individual volatility smilesdelta - the delta valuesatm - the ATM volatilitiesriskReversal - the risk reversal figuresstrangle - the strangle figuresdayCount - the day count used for the expiry year-fractionpublic static InterpolatedStrikeSmileDeltaTermStructure of(DoubleArray expiries, DoubleArray delta, DoubleArray atm, DoubleMatrix riskReversal, DoubleMatrix strangle, DayCount dayCount, CurveInterpolator strikeInterpolator, CurveExtrapolator strikeExtrapolatorLeft, CurveExtrapolator strikeExtrapolatorRight)
The range of delta is common to all time to expiry.
riskReversal and strangle should be n * m, and the length of atm should n,
where n is the length of expiry and m is the length of delta.
The time dimension will use 'TimeSquare' interpolation with flat extrapolation.
expiries - the expiry times of individual volatility smilesdelta - the delta valuesatm - the ATM volatilitiesriskReversal - the risk reversal figuresstrangle - the strangle figuresdayCount - the day count used for the expiry year-fractionstrikeInterpolator - interpolator used in the strike dimensionstrikeExtrapolatorLeft - left extrapolator used in the strike dimensionstrikeExtrapolatorRight - right extrapolator used in the strike dimensionpublic static InterpolatedStrikeSmileDeltaTermStructure of(DoubleArray expiries, DoubleArray delta, DoubleArray atm, DoubleMatrix riskReversal, DoubleMatrix strangle, DayCount dayCount, CurveInterpolator timeInterpolator, CurveExtrapolator timeExtrapolatorLeft, CurveExtrapolator timeExtrapolatorRight, CurveInterpolator strikeInterpolator, CurveExtrapolator strikeExtrapolatorLeft, CurveExtrapolator strikeExtrapolatorRight)
The range of delta is common to all time to expiry.
riskReversal and strangle should be n * m, and the length of atm should n,
where n is the length of expiry and m is the length of delta.
expiries - the expiry times of individual volatility smilesdelta - the delta valuesatm - the ATM volatilitiesriskReversal - the risk reversal figuresstrangle - the strangle figuresdayCount - the day count used for the expiry year-fractiontimeInterpolator - interpolator used in the time dimensiontimeExtrapolatorLeft - left extrapolator used in the time dimensiontimeExtrapolatorRight - right extrapolator used in the time dimensionstrikeInterpolator - interpolator used in the strike dimensionstrikeExtrapolatorLeft - left extrapolator used in the strike dimensionstrikeExtrapolatorRight - right extrapolator used in the strike dimensionpublic int getParameterCount()
getParameterCount in interface ParameterizedDatapublic double getParameter(int parameterIndex)
getParameter in interface ParameterizedDatapublic ParameterMetadata getParameterMetadata(int parameterIndex)
getParameterMetadata in interface ParameterizedDatapublic InterpolatedStrikeSmileDeltaTermStructure withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDatawithParameter in interface SmileDeltaTermStructurepublic InterpolatedStrikeSmileDeltaTermStructure withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatawithPerturbation in interface SmileDeltaTermStructurepublic DoubleArray getExpiries()
SmileDeltaTermStructuregetExpiries in interface SmileDeltaTermStructurepublic List<Optional<Tenor>> getExpiryTenors()
SmileDeltaTermStructuregetExpiryTenors in interface SmileDeltaTermStructurepublic double volatility(double time,
double strike,
double forward)
SmileDeltaTermStructurevolatility in interface SmileDeltaTermStructuretime - the time to expirystrike - the strikeforward - the forwardpublic VolatilityAndBucketedSensitivities volatilityAndSensitivities(double time, double strike, double forward)
SmileDeltaTermStructurevolatilityAndSensitivities in interface SmileDeltaTermStructuretime - the time to expirystrike - the strikeforward - the forwardpublic ValueDerivatives partialFirstDerivatives(double expiry, double strike, double forward)
SmileDeltaTermStructure
The first derivatives are dVol/dExpiry and dVol/dStrike.
The derivatives are in the following order:
partialFirstDerivatives in interface SmileDeltaTermStructureexpiry - the expiry at which the partial derivative is takenstrike - the strike at which the partial derivative is takenforward - the forward ratepublic SmileDeltaParameters smileForExpiry(double expiry)
SmileDeltaTermStructuresmileForExpiry in interface SmileDeltaTermStructureexpiry - the time to expirypublic SmileAndBucketedSensitivities smileAndSensitivitiesForExpiry(double expiry, DoubleArray volatilityAtTimeSensitivity)
SmileDeltaTermStructuresmileAndSensitivitiesForExpiry in interface SmileDeltaTermStructureexpiry - the time to expiryvolatilityAtTimeSensitivity - the sensitivity to the volatilities of the smile at the given timepublic static InterpolatedStrikeSmileDeltaTermStructure.Meta meta()
InterpolatedStrikeSmileDeltaTermStructure.public InterpolatedStrikeSmileDeltaTermStructure.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic ImmutableList<SmileDeltaParameters> getVolatilityTerm()
getVolatilityTerm in interface SmileDeltaTermStructurepublic DayCount getDayCount()
getDayCount in interface SmileDeltaTermStructurepublic CurveInterpolator getTimeInterpolator()
public CurveExtrapolator getTimeExtrapolatorLeft()
public CurveExtrapolator getTimeExtrapolatorRight()
public CurveInterpolator getStrikeInterpolator()
public CurveExtrapolator getStrikeExtrapolatorLeft()
public CurveExtrapolator getStrikeExtrapolatorRight()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.