public final class NormalBondYieldExpiryDurationVolatilities extends Object implements BondYieldVolatilities, org.joda.beans.ImmutableBean, Serializable
The volatility is represented by a surface on the expiry and bond duration dimensions.
| Modifier and Type | Class and Description |
|---|---|
static class |
NormalBondYieldExpiryDurationVolatilities.Meta
The meta-bean for
NormalBondYieldExpiryDurationVolatilities. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
<T> Optional<T> |
findData(MarketDataName<T> name) |
OptionalInt |
findParameterIndex(ParameterMetadata metadata) |
Currency |
getCurrency()
Gets the currency.
|
BondVolatilitiesName |
getName()
Gets the name of these volatilities.
|
double |
getParameter(int parameterIndex) |
int |
getParameterCount() |
ParameterMetadata |
getParameterMetadata(int parameterIndex) |
Surface |
getSurface()
Gets the normal volatility surface.
|
ZonedDateTime |
getValuationDateTime()
Gets the valuation date-time.
|
ValueType |
getVolatilityType()
Gets the type of volatility returned by the
BondYieldVolatilities.volatility(double, double, double, double) method. |
int |
hashCode() |
static NormalBondYieldExpiryDurationVolatilities.Meta |
meta()
The meta-bean for
NormalBondYieldExpiryDurationVolatilities. |
NormalBondYieldExpiryDurationVolatilities.Meta |
metaBean() |
static NormalBondYieldExpiryDurationVolatilities |
of(Currency currency,
ZonedDateTime valuationDateTime,
Surface surface)
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 |
relativeTime(ZonedDateTime dateTime)
Converts a time and date to a relative year fraction.
|
String |
toString() |
double |
volatility(double expiry,
double duration,
double strike,
double forwardRate)
Calculates the volatility at the specified expiry.
|
NormalBondYieldExpiryDurationVolatilities |
withParameter(int parameterIndex,
double newValue) |
NormalBondYieldExpiryDurationVolatilities |
withPerturbation(ParameterPerturbation perturbation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetValuationDate, parameterSensitivity, priceVolatilityEquivalent, priceVolatilityEquivalent, priceVolatilityEquivalent, priceVolatilityEquivalentAd, priceVolatilityEquivalentAd, priceVolatilityEquivalentAd, volatilitypublic static NormalBondYieldExpiryDurationVolatilities of(Currency currency, ZonedDateTime valuationDateTime, Surface surface)
The surface is specified by an instance of Surface, such as InterpolatedNodalSurface.
The surface must contain the correct metadata:
ValueType.YEAR_FRACTION
ValueType.YEAR_FRACTION
ValueType.NORMAL_VOLATILITY
SurfaceInfoType.DAY_COUNT
Surfaces.normalVolatilityByExpiryTenor(String, DayCount).currency - the currencyvaluationDateTime - the valuation date-timesurface - the implied volatility surfacepublic ValueType getVolatilityType()
BondYieldVolatilitiesBondYieldVolatilities.volatility(double, double, double, double) method.getVolatilityType in interface BondYieldVolatilitiespublic BondVolatilitiesName getName()
BondYieldVolatilitiesgetName in interface BondYieldVolatilitiespublic <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 NormalBondYieldExpiryDurationVolatilities withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDatawithParameter in interface BondYieldVolatilitiespublic NormalBondYieldExpiryDurationVolatilities withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatawithPerturbation in interface BondYieldVolatilitiespublic double volatility(double expiry,
double duration,
double strike,
double forwardRate)
BondYieldVolatilities
This relies on expiry supplied by BondYieldVolatilities.relativeTime(ZonedDateTime).
volatility in interface BondYieldVolatilitiesexpiry - the time to expiry as a year fractionduration - the modified duration of the instrument as a year fractionstrike - the strike yieldforwardRate - the forward yield of the underlying bondpublic CurrencyParameterSensitivities parameterSensitivity(PointSensitivities pointSensitivities)
BondYieldVolatilities
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 BondYieldVolatilitiespointSensitivities - the point sensitivitiespublic double relativeTime(ZonedDateTime dateTime)
BondYieldVolatilitiesWhen the date is after the valuation date (and potentially time), the returned number is negative.
relativeTime in interface BondYieldVolatilitiesdateTime - the date-time to find the relative year fraction ofpublic static NormalBondYieldExpiryDurationVolatilities.Meta meta()
NormalBondYieldExpiryDurationVolatilities.public NormalBondYieldExpiryDurationVolatilities.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic Currency getCurrency()
getCurrency in interface BondYieldVolatilitiespublic ZonedDateTime getValuationDateTime()
The volatilities are calibrated for this date-time.
getValuationDateTime in interface BondYieldVolatilitiespublic Surface getSurface()
The x-value of the surface is the expiry, as a year fraction. The y-value of the surface is the duration, as a year fraction.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.