public interface SwaptionVolatilities extends MarketDataView, ParameterizedData
This provides access to the volatilities for various pricing models, such as normal, Black and SABR. The price and derivatives are also made available.
| Modifier and Type | Method and Description |
|---|---|
FixedFloatSwapConvention |
getConvention()
Gets the convention of the swap for which the data is valid.
|
SwaptionVolatilitiesName |
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(java.time.ZonedDateTime, double, double, double) method. |
CurrencyParameterSensitivities |
parameterSensitivity(PointSensitivities pointSensitivities)
Calculates the parameter sensitivity.
|
default CurrencyParameterSensitivities |
parameterSensitivity(PointSensitivity... pointSensitivities)
Calculates the parameter sensitivity.
|
double |
price(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
Calculates the price.
|
double |
priceDelta(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
Calculates the price delta.
|
double |
priceGamma(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
Calculates the price gamma.
|
double |
priceTheta(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
Calculates the price theta.
|
double |
priceVega(double expiry,
double tenor,
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.
|
double |
tenor(LocalDate startDate,
LocalDate endDate)
Calculates the tenor of the swap based on its start date and end date.
|
double |
volatility(double expiry,
double tenor,
double strike,
double forward)
Calculates the volatility at the specified expiry.
|
default double |
volatility(ZonedDateTime expiryDateTime,
double tenor,
double strike,
double forward)
Calculates the volatility at the specified expiry.
|
SwaptionVolatilities |
withParameter(int parameterIndex,
double newValue) |
SwaptionVolatilities |
withPerturbation(ParameterPerturbation perturbation) |
findDatafindParameterIndex, getParameter, getParameterCount, getParameterMetadataSwaptionVolatilitiesName getName()
FixedFloatSwapConvention getConvention()
ValueType getVolatilityType()
volatility(java.time.ZonedDateTime, double, double, double) method.default LocalDate getValuationDate()
The volatilities are calibrated for this date.
getValuationDate in interface MarketDataViewZonedDateTime getValuationDateTime()
The volatilities are calibrated for this date-time.
SwaptionVolatilities withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDataSwaptionVolatilities withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatadefault double volatility(ZonedDateTime expiryDateTime, double tenor, double strike, double forward)
This relies on tenor supplied by tenor(LocalDate, LocalDate).
expiryDateTime - the option expirytenor - the tenor of the instrument as a year fractionstrike - the option strike rateforward - the forward rate of the underlying swapRuntimeException - if the value cannot be obtaineddouble volatility(double expiry,
double tenor,
double strike,
double forward)
This relies on expiry supplied by relativeTime(ZonedDateTime).
This relies on tenor supplied by tenor(LocalDate, LocalDate).
expiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionstrike - the option strike rateforward - the forward rate of the underlying swapRuntimeException - if the value cannot be obtaineddefault 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 price(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
This relies on expiry supplied by relativeTime(ZonedDateTime).
This relies on tenor supplied by tenor(LocalDate, LocalDate).
This relies on volatility supplied by volatility(double, double, double, double).
expiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionputCall - whether the option is put or callstrike - the option strike rateforward - the forward rate of the underlying swapvolatility - the volatilityRuntimeException - if the value cannot be obtaineddouble priceDelta(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
This is the forward driftless delta.
This relies on expiry supplied by relativeTime(ZonedDateTime).
This relies on tenor supplied by tenor(LocalDate, LocalDate).
This relies on volatility supplied by volatility(double, double, double, double).
expiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionputCall - whether the option is put or callstrike - the option strike rateforward - the forward rate of the underlying swapvolatility - the volatilityRuntimeException - if the value cannot be obtaineddouble priceGamma(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
This is the second order sensitivity of the forward option value to the forward.
This relies on expiry supplied by relativeTime(ZonedDateTime).
This relies on tenor supplied by tenor(LocalDate, LocalDate).
This relies on volatility supplied by volatility(double, double, double, double).
expiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionputCall - whether the option is put or callstrike - the option strike rateforward - the forward rate of the underlying swapvolatility - the volatilityRuntimeException - if the value cannot be obtaineddouble priceTheta(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
This is the driftless sensitivity of the present value to a change in time to maturity.
This relies on expiry supplied by relativeTime(ZonedDateTime).
This relies on tenor supplied by tenor(LocalDate, LocalDate).
This relies on volatility supplied by volatility(double, double, double, double).
expiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionputCall - whether the option is put or callstrike - the option strike rateforward - the forward rate of the underlying swapvolatility - the volatilityRuntimeException - if the value cannot be obtaineddouble priceVega(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
This is the sensitivity of the option forward price to the implied volatility.
This relies on expiry supplied by relativeTime(ZonedDateTime).
This relies on tenor supplied by tenor(LocalDate, LocalDate).
This relies on volatility supplied by volatility(double, double, double, double).
expiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionputCall - whether the option is put or callstrike - the option strike rateforward - the forward rate of the underlying swapvolatility - the volatilityRuntimeException - if the value cannot be obtaineddouble 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.