Interface SabrSwaptionVolatilities
-
- All Superinterfaces:
MarketDataView
,ParameterizedData
,SwaptionVolatilities
- All Known Implementing Classes:
SabrParametersSwaptionVolatilities
public interface SabrSwaptionVolatilities extends SwaptionVolatilities
Volatility for swaptions in SABR model.The volatility is represented in terms of SABR model parameters.
The prices are calculated using the SABR implied volatility with respect to the Black formula.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description double
alpha(double expiry, double tenor)
Calculates the alpha parameter for a pair of time to expiry and instrument tenor.double
beta(double expiry, double tenor)
Calculates the beta parameter for a pair of time to expiry and instrument tenor.default PointSensitivityBuilder
convertSwaptionSensitivity(SwaptionSensitivity swptSensi)
Convert aSwaptionSensitivity
for a expiry, tenor and strike in the associated SABR parameter sensitivities.default ValueType
getVolatilityType()
Gets the type of volatility returned by theSwaptionVolatilities.volatility(java.time.ZonedDateTime, double, double, double)
method.double
nu(double expiry, double tenor)
Calculates the nu parameter for a pair of time to expiry and instrument tenor.double
rho(double expiry, double tenor)
Calculates the rho parameter for a pair of time to expiry and instrument tenor.double
shift(double expiry, double tenor)
Calculates the shift parameter for the specified time to expiry and instrument tenor.ValueDerivatives
volatilityAdjoint(double expiry, double tenor, double strike, double forward)
Calculates the volatility and associated sensitivities.SabrSwaptionVolatilities
withParameter(int parameterIndex, double newValue)
Returns a copy of the data with the value at the specified index altered.SabrSwaptionVolatilities
withPerturbation(ParameterPerturbation perturbation)
Returns a perturbed copy of the data.-
Methods inherited from interface com.opengamma.strata.market.MarketDataView
findData
-
Methods inherited from interface com.opengamma.strata.market.param.ParameterizedData
findParameterIndex, getParameter, getParameterCount, getParameterMetadata
-
Methods inherited from interface com.opengamma.strata.pricer.swaption.SwaptionVolatilities
getConvention, getName, getValuationDate, getValuationDateTime, parameterSensitivity, parameterSensitivity, price, priceDelta, priceGamma, priceTheta, priceVega, relativeTime, tenor, volatility, volatility
-
-
-
-
Method Detail
-
getVolatilityType
default ValueType getVolatilityType()
Description copied from interface:SwaptionVolatilities
Gets the type of volatility returned by theSwaptionVolatilities.volatility(java.time.ZonedDateTime, double, double, double)
method.- Specified by:
getVolatilityType
in interfaceSwaptionVolatilities
- Returns:
- the type
-
withParameter
SabrSwaptionVolatilities withParameter(int parameterIndex, double newValue)
Description copied from interface:ParameterizedData
Returns a copy of the data with the value at the specified index altered.This instance is immutable and unaffected by this method call.
- Specified by:
withParameter
in interfaceParameterizedData
- Specified by:
withParameter
in interfaceSwaptionVolatilities
- Parameters:
parameterIndex
- the zero-based index of the parameter to getnewValue
- the new value for the specified parameter- Returns:
- a parameterized data instance based on this with the specified parameter altered
-
withPerturbation
SabrSwaptionVolatilities withPerturbation(ParameterPerturbation perturbation)
Description copied from interface:ParameterizedData
Returns a perturbed copy of the data.The perturbation instance will be invoked once for each parameter in this instance, returning the perturbed value for that parameter. The result of this method is a new instance that is based on those perturbed values.
This instance is immutable and unaffected by this method call.
- Specified by:
withPerturbation
in interfaceParameterizedData
- Specified by:
withPerturbation
in interfaceSwaptionVolatilities
- Parameters:
perturbation
- the perturbation to apply- Returns:
- a parameterized data instance based on this with the specified perturbation applied
-
alpha
double alpha(double expiry, double tenor)
Calculates the alpha parameter for a pair of time to expiry and instrument tenor.- Parameters:
expiry
- the time to expiry as a year fractiontenor
- the tenor of the instrument as a year fraction- Returns:
- the alpha parameter
-
beta
double beta(double expiry, double tenor)
Calculates the beta parameter for a pair of time to expiry and instrument tenor.- Parameters:
expiry
- the time to expiry as a year fractiontenor
- the tenor of the instrument as a year fraction- Returns:
- the beta parameter
-
rho
double rho(double expiry, double tenor)
Calculates the rho parameter for a pair of time to expiry and instrument tenor.- Parameters:
expiry
- the time to expiry as a year fractiontenor
- the tenor of the instrument as a year fraction- Returns:
- the rho parameter
-
nu
double nu(double expiry, double tenor)
Calculates the nu parameter for a pair of time to expiry and instrument tenor.- Parameters:
expiry
- the time to expiry as a year fractiontenor
- the tenor of the instrument as a year fraction- Returns:
- the nu parameter
-
shift
double shift(double expiry, double tenor)
Calculates the shift parameter for the specified time to expiry and instrument tenor.- Parameters:
expiry
- the time to expiry as a year fractiontenor
- the tenor of the instrument as a year fraction- Returns:
- the shift parameter
-
volatilityAdjoint
ValueDerivatives volatilityAdjoint(double expiry, double tenor, double strike, double forward)
Calculates the volatility and associated sensitivities.The derivatives are stored in an array with:
- [0] derivative with respect to the forward
- [1] derivative with respect to the forward strike
- [2] derivative with respect to the alpha
- [3] derivative with respect to the beta
- [4] derivative with respect to the rho
- [5] derivative with respect to the nu
- Parameters:
expiry
- the time to expiry as a year fractiontenor
- the tenor of the instrument as a year fractionstrike
- the strikeforward
- the forward- Returns:
- the volatility and associated sensitivities
-
convertSwaptionSensitivity
default PointSensitivityBuilder convertSwaptionSensitivity(SwaptionSensitivity swptSensi)
Convert aSwaptionSensitivity
for a expiry, tenor and strike in the associated SABR parameter sensitivities.- Parameters:
swptSensi
- the swaption volatility sensitivity at a given strike- Returns:
- the swaption SABR parameter sensitivities
-
-