public final class NormalIborCapletFloorletExpiryFlatVolatilities extends Object implements NormalIborCapletFloorletVolatilities, org.joda.beans.ImmutableBean, Serializable
The volatility is represented by a curve on the expiry dimension.
| Modifier and Type | Class and Description |
|---|---|
static class |
NormalIborCapletFloorletExpiryFlatVolatilities.Meta
The meta-bean for
NormalIborCapletFloorletExpiryFlatVolatilities. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
<T> Optional<T> |
findData(MarketDataName<T> name) |
OptionalInt |
findParameterIndex(ParameterMetadata metadata) |
Curve |
getCurve()
Gets the normal volatility curve.
|
IborIndex |
getIndex()
Gets the Ibor index.
|
IborCapletFloorletVolatilitiesName |
getName()
Gets the name of these volatilities.
|
double |
getParameter(int parameterIndex) |
int |
getParameterCount() |
ParameterMetadata |
getParameterMetadata(int parameterIndex) |
ZonedDateTime |
getValuationDateTime()
Gets the valuation date-time.
|
int |
hashCode() |
static NormalIborCapletFloorletExpiryFlatVolatilities.Meta |
meta()
The meta-bean for
NormalIborCapletFloorletExpiryFlatVolatilities. |
NormalIborCapletFloorletExpiryFlatVolatilities.Meta |
metaBean() |
static NormalIborCapletFloorletExpiryFlatVolatilities |
of(IborIndex index,
ZonedDateTime valuationDateTime,
Curve curve)
Obtains an instance from the implied volatility curve 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.
|
NormalIborCapletFloorletExpiryFlatVolatilities |
withParameter(int parameterIndex,
double newValue) |
NormalIborCapletFloorletExpiryFlatVolatilities |
withPerturbation(ParameterPerturbation perturbation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetVolatilityTypegetValuationDate, parameterSensitivity, volatilitypublic static NormalIborCapletFloorletExpiryFlatVolatilities of(IborIndex index, ZonedDateTime valuationDateTime, Curve curve)
The curve is specified by an instance of Curve, such as InterpolatedNodalCurve.
The curve must contain the correct metadata:
ValueType.YEAR_FRACTION
ValueType.NORMAL_VOLATILITY
CurveInfoType.DAY_COUNT
index - the Ibor index for which the data is validvaluationDateTime - the valuation date-timecurve - the implied volatility curvepublic 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 NormalIborCapletFloorletExpiryFlatVolatilities withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDatawithParameter in interface IborCapletFloorletVolatilitieswithParameter in interface NormalIborCapletFloorletVolatilitiespublic NormalIborCapletFloorletExpiryFlatVolatilities withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatawithPerturbation in interface IborCapletFloorletVolatilitieswithPerturbation in interface NormalIborCapletFloorletVolatilitiespublic 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 NormalIborCapletFloorletExpiryFlatVolatilities.Meta meta()
NormalIborCapletFloorletExpiryFlatVolatilities.public NormalIborCapletFloorletExpiryFlatVolatilities.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 Curve getCurve()
ValueType.YEAR_FRACTION
ValueType.NORMAL_VOLATILITYCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.