public interface BondYieldVolatilities extends MarketDataView, ParameterizedData
The volatilities are stored as bond yield equivalent volatilities but are converted to bond price volatilities through the formula "price volatility = duration * yield * yield volatility".
| Modifier and Type | Method and Description |
|---|---|
Currency |
getCurrency()
Gets the currency for which the data is valid.
|
BondVolatilitiesName |
getName()
Gets the name of these volatilities.
|
default LocalDate |
getValuationDate()
Gets the valuation date.
|
ZonedDateTime |
getValuationDateTime()
Gets the valuation date-time.
|
ValueType |
getVolatilityType()
Gets the type of volatility returned by the
volatility(double, double, double, double) method. |
CurrencyParameterSensitivities |
parameterSensitivity(PointSensitivities pointSensitivities)
Calculates the parameter sensitivity.
|
default CurrencyParameterSensitivities |
parameterSensitivity(PointSensitivity... pointSensitivities)
Calculates the parameter sensitivity.
|
default double |
priceVolatilityEquivalent(double duration,
double yieldVolatility)
Calculates the price volatility equivalent to the yield volatility.
|
default double |
priceVolatilityEquivalent(double expiry,
double duration,
double strike,
double forward)
Calculates the price volatility equivalent to the yield volatility.
|
default double |
priceVolatilityEquivalent(ZonedDateTime expiryDateTime,
double duration,
double strike,
double forward)
Calculates the price volatility equivalent to the yield volatility.
|
default ValueDerivatives |
priceVolatilityEquivalentAd(double duration,
double yieldVolatility)
Calculates the price volatility equivalent to the yield volatility and its derivatives.
|
default ValueDerivatives |
priceVolatilityEquivalentAd(double expiry,
double duration,
double strike,
double forward)
Calculates the price volatility equivalent to the yield volatility and its derivatives.
|
default ValueDerivatives |
priceVolatilityEquivalentAd(ZonedDateTime expiryDateTime,
double duration,
double strike,
double forward)
Calculates the price volatility equivalent to the yield volatility and its derivatives.
|
double |
relativeTime(ZonedDateTime dateTime)
Converts a time and date to a relative year fraction.
|
double |
volatility(double expiry,
double duration,
double strike,
double forward)
Calculates the volatility at the specified expiry.
|
default double |
volatility(ZonedDateTime expiryDateTime,
double duration,
double strike,
double forward)
Calculates the volatility at the specified expiry.
|
BondYieldVolatilities |
withParameter(int parameterIndex,
double newValue) |
BondYieldVolatilities |
withPerturbation(ParameterPerturbation perturbation) |
findDatafindParameterIndex, getParameter, getParameterCount, getParameterMetadataCurrency getCurrency()
BondVolatilitiesName getName()
ValueType getVolatilityType()
volatility(double, double, double, double) method.ZonedDateTime getValuationDateTime()
The volatilities are calibrated for this date-time.
default LocalDate getValuationDate()
The volatilities are calibrated for this date.
getValuationDate in interface MarketDataViewBondYieldVolatilities withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDataBondYieldVolatilities withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatadouble volatility(double expiry,
double duration,
double strike,
double forward)
This relies on expiry supplied by relativeTime(ZonedDateTime).
expiry - the time to expiry as a year fractionduration - the modified duration of the instrument as a year fractionstrike - the strike yieldforward - the forward yield of the underlying bondRuntimeException - if the value cannot be obtaineddefault double volatility(ZonedDateTime expiryDateTime, double duration, double strike, double forward)
expiryDateTime - the option expiryduration - the modified duration of the instrument as a year fractionstrike - the strike yieldforward - the forward yield of the underlying bondRuntimeException - if the value cannot be obtaineddefault double priceVolatilityEquivalent(double expiry,
double duration,
double strike,
double forward)
expiry - the time to expiry as a year fractionduration - the modified duration of the instrument as a year fractionstrike - the strike yieldforward - the forward yield of the underlying bonddefault ValueDerivatives priceVolatilityEquivalentAd(double expiry, double duration, double strike, double forward)
The derivatives are in the following order:
expiry - the time to expiry as a year fractionduration - the modified duration of the instrument as a year fractionstrike - the strike yieldforward - the forward yield of the underlying bonddefault double priceVolatilityEquivalent(ZonedDateTime expiryDateTime, double duration, double strike, double forward)
expiryDateTime - the option expiryduration - the modified duration of the instrument as a year fractionstrike - the strike yieldforward - the forward yield of the underlying bonddefault ValueDerivatives priceVolatilityEquivalentAd(ZonedDateTime expiryDateTime, double duration, double strike, double forward)
The derivatives are in the following order:
expiryDateTime - the option expiryduration - the modified duration of the instrument as a year fractionstrike - the strike yieldforward - the forward yield of the underlying bonddefault double priceVolatilityEquivalent(double duration,
double yieldVolatility)
duration - the modified durationyieldVolatility - the yield volatilitydefault ValueDerivatives priceVolatilityEquivalentAd(double duration, double yieldVolatility)
The derivatives are in the following order:
duration - the modified durationyieldVolatility - the yield volatilitydefault CurrencyParameterSensitivities parameterSensitivity(PointSensitivity... pointSensitivities)
This computes the CurrencyParameterSensitivities associated with the PointSensitivities.
This corresponds to the projection of the point sensitivity to the internal parameters representation.
pointSensitivities - the point sensitivitiesCurrencyParameterSensitivities parameterSensitivity(PointSensitivities pointSensitivities)
This computes the CurrencyParameterSensitivities associated with the PointSensitivities.
This corresponds to the projection of the point sensitivity to the internal parameters representation.
pointSensitivities - the point sensitivitiesdouble relativeTime(ZonedDateTime dateTime)
When the date is after the valuation date (and potentially time), the returned number is negative.
dateTime - the date-time to find the relative year fraction ofCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.