public final class ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities extends Object implements BlackIborCapletFloorletVolatilities, org.joda.beans.ImmutableBean, Serializable
The volatility is represented by a surface on the expiry and strike dimensions. The shift parameter is represented by a curve defined by expiry.
Although this implementation is able to handle zero shift, it is recommended to use
BlackIborCapletFloorletExpiryStrikeVolatilities instead.
| Modifier and Type | Class and Description |
|---|---|
static class |
ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities.Meta
The meta-bean for
ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
<T> Optional<T> |
findData(MarketDataName<T> name) |
OptionalInt |
findParameterIndex(ParameterMetadata metadata) |
IborIndex |
getIndex()
Gets the Ibor index.
|
IborCapletFloorletVolatilitiesName |
getName()
Gets the name of these volatilities.
|
double |
getParameter(int parameterIndex) |
int |
getParameterCount() |
ParameterMetadata |
getParameterMetadata(int parameterIndex) |
Curve |
getShiftCurve()
Gets the shift parameter of shifted Black model.
|
Surface |
getSurface()
Gets the Black volatility surface.
|
ZonedDateTime |
getValuationDateTime()
Gets the valuation date-time.
|
int |
hashCode() |
static ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities.Meta |
meta()
The meta-bean for
ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities. |
ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities.Meta |
metaBean() |
static ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities |
of(IborIndex index,
ZonedDateTime valuationDateTime,
Surface surface,
Curve shiftCurve)
Obtains an instance from the implied volatility surface and the date-time for which it is valid.
|
CurrencyParameterSensitivities |
parameterSensitivity(PointSensitivities pointSensitivities)
Calculates the parameter sensitivity.
|
double |
price(double expiry,
PutCall putCall,
double strike,
double forward,
double volatility)
Calculates the price.
|
double |
priceDelta(double expiry,
PutCall putCall,
double strike,
double forward,
double volatility)
Calculates the price delta.
|
double |
priceGamma(double expiry,
PutCall putCall,
double strike,
double forward,
double volatility)
Calculates the price gamma.
|
double |
priceTheta(double expiry,
PutCall putCall,
double strike,
double forward,
double volatility)
Calculates the price theta.
|
double |
priceVega(double expiry,
PutCall putCall,
double strike,
double forward,
double volatility)
Calculates the price vega.
|
double |
relativeTime(ZonedDateTime dateTime)
Converts a time and date to a relative year fraction.
|
String |
toString() |
double |
volatility(double expiry,
double strike,
double forward)
Calculates the volatility at the specified expiry.
|
ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities |
withParameter(int parameterIndex,
double newValue) |
ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities |
withPerturbation(ParameterPerturbation perturbation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetVolatilityTypegetValuationDate, parameterSensitivity, volatilitypublic static ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities of(IborIndex index, ZonedDateTime valuationDateTime, Surface surface, Curve shiftCurve)
The surface is specified by an instance of Surface, such as InterpolatedNodalSurface.
The surface must contain the correct metadata:
ValueType.YEAR_FRACTION
ValueType.STRIKE
ValueType.BLACK_VOLATILITY
SurfaceInfoType.DAY_COUNT
Surfaces.blackVolatilityByExpiryStrike(String, DayCount).index - the Ibor index for which the data is validvaluationDateTime - the valuation date-timesurface - the implied volatility surfaceshiftCurve - the shift surfacepublic IborCapletFloorletVolatilitiesName getName()
IborCapletFloorletVolatilitiesgetName in interface IborCapletFloorletVolatilitiespublic <T> Optional<T> findData(MarketDataName<T> name)
findData in interface MarketDataViewpublic int getParameterCount()
getParameterCount in interface ParameterizedDatapublic double getParameter(int parameterIndex)
getParameter in interface ParameterizedDatapublic ParameterMetadata getParameterMetadata(int parameterIndex)
getParameterMetadata in interface ParameterizedDatapublic OptionalInt findParameterIndex(ParameterMetadata metadata)
findParameterIndex in interface ParameterizedDatapublic ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDatawithParameter in interface BlackIborCapletFloorletVolatilitieswithParameter in interface IborCapletFloorletVolatilitiespublic ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatawithPerturbation in interface BlackIborCapletFloorletVolatilitieswithPerturbation in interface IborCapletFloorletVolatilitiespublic double volatility(double expiry,
double strike,
double forward)
IborCapletFloorletVolatilities
This relies on expiry supplied by IborCapletFloorletVolatilities.relativeTime(ZonedDateTime).
volatility in interface IborCapletFloorletVolatilitiesexpiry - the time to expiry as a year fractionstrike - the option strike rateforward - the forward ratepublic CurrencyParameterSensitivities parameterSensitivity(PointSensitivities pointSensitivities)
IborCapletFloorletVolatilities
This computes the CurrencyParameterSensitivities associated with the PointSensitivities.
This corresponds to the projection of the point sensitivity to the internal parameters representation.
parameterSensitivity in interface IborCapletFloorletVolatilitiespointSensitivities - the point sensitivitiespublic double price(double expiry,
PutCall putCall,
double strike,
double forward,
double volatility)
IborCapletFloorletVolatilities
This relies on expiry supplied by IborCapletFloorletVolatilities.relativeTime(ZonedDateTime).
This relies on volatility supplied by IborCapletFloorletVolatilities.volatility(double, double, double).
price in interface IborCapletFloorletVolatilitiesexpiry - the time to expiry as a year fractionputCall - whether the option is put or callstrike - the option strike rateforward - the forward ratevolatility - the volatilitypublic double priceDelta(double expiry,
PutCall putCall,
double strike,
double forward,
double volatility)
IborCapletFloorletVolatilitiesThis is the first order sensitivity of the option price to the forward.
This relies on expiry supplied by IborCapletFloorletVolatilities.relativeTime(ZonedDateTime).
This relies on volatility supplied by IborCapletFloorletVolatilities.volatility(double, double, double).
priceDelta in interface IborCapletFloorletVolatilitiesexpiry - the time to expiry as a year fractionputCall - whether the option is put or callstrike - the option strike rateforward - the forward ratevolatility - the volatilitypublic double priceGamma(double expiry,
PutCall putCall,
double strike,
double forward,
double volatility)
IborCapletFloorletVolatilitiesThis is the second order sensitivity of the option price to the forward.
This relies on expiry supplied by IborCapletFloorletVolatilities.relativeTime(ZonedDateTime).
This relies on volatility supplied by IborCapletFloorletVolatilities.volatility(double, double, double).
priceGamma in interface IborCapletFloorletVolatilitiesexpiry - the time to expiry as a year fractionputCall - whether the option is put or callstrike - the option strike rateforward - the forward ratevolatility - the volatilitypublic double priceTheta(double expiry,
PutCall putCall,
double strike,
double forward,
double volatility)
IborCapletFloorletVolatilitiesThis is the driftless sensitivity of the option price to a change in time to maturity.
This relies on expiry supplied by IborCapletFloorletVolatilities.relativeTime(ZonedDateTime).
This relies on volatility supplied by IborCapletFloorletVolatilities.volatility(double, double, double).
priceTheta in interface IborCapletFloorletVolatilitiesexpiry - the time to expiry as a year fractionputCall - whether the option is put or callstrike - the option strike rateforward - the forward ratevolatility - the volatilitypublic double priceVega(double expiry,
PutCall putCall,
double strike,
double forward,
double volatility)
IborCapletFloorletVolatilitiesThis is the sensitivity of the option price to the implied volatility.
This relies on expiry supplied by IborCapletFloorletVolatilities.relativeTime(ZonedDateTime).
This relies on volatility supplied by IborCapletFloorletVolatilities.volatility(double, double, double).
priceVega in interface IborCapletFloorletVolatilitiesexpiry - the time to expiry as a year fractionputCall - whether the option is put or callstrike - the option strike rateforward - the forward ratevolatility - the volatilitypublic double relativeTime(ZonedDateTime dateTime)
IborCapletFloorletVolatilitiesWhen the date is after the valuation date (and potentially time), the returned number is negative.
relativeTime in interface IborCapletFloorletVolatilitiesdateTime - the date-time to find the relative year fraction ofpublic static ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities.Meta meta()
ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities.public ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic IborIndex getIndex()
The data must valid in terms of this Ibor index.
getIndex in interface IborCapletFloorletVolatilitiespublic ZonedDateTime getValuationDateTime()
The volatilities are calibrated for this date-time.
getValuationDateTime in interface IborCapletFloorletVolatilitiespublic Surface getSurface()
The x-value of the surface is the expiry, as a year fraction. The y-value of the surface is the strike.
public Curve getShiftCurve()
The x value of the curve is the expiry.
Use BlackIborCapletFloorletExpiryStrikeVolatilities for zero shift.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.