public final class SabrParametersSwaptionVolatilities extends Object implements BlackSabrSwaptionVolatilities, org.joda.beans.ImmutableBean, Serializable
The volatility is represented in terms of SABR model parameters.
The parameterSensitivity(), priceGamma() and priceTheta() methods are not implemented.
| Modifier and Type | Class and Description |
|---|---|
static class |
SabrParametersSwaptionVolatilities.Builder
The bean-builder for
SabrParametersSwaptionVolatilities. |
static class |
SabrParametersSwaptionVolatilities.Meta
The meta-bean for
SabrParametersSwaptionVolatilities. |
| Modifier and Type | Method and 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.
|
static SabrParametersSwaptionVolatilities.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
findData(MarketDataName<T> name) |
FixedFloatSwapConvention |
getConvention()
Gets the swap convention that the volatilities are to be used for.
|
Optional<ImmutableList<DoubleArray>> |
getDataSensitivityAlpha()
Gets the sensitivity of the Alpha parameters to the raw data used for calibration.
|
Optional<ImmutableList<DoubleArray>> |
getDataSensitivityBeta()
Gets the sensitivity of the Beta parameters to the raw data used for calibration.
|
Optional<ImmutableList<DoubleArray>> |
getDataSensitivityNu()
Gets the sensitivity of the Nu parameters to the raw data used for calibration.
|
Optional<ImmutableList<DoubleArray>> |
getDataSensitivityRho()
Gets the sensitivity of the Rho parameters to the raw data used for calibration.
|
DayCount |
getDayCount()
Gets the day count used to calculate the expiry year fraction.
|
SwaptionVolatilitiesName |
getName()
Gets the name.
|
double |
getParameter(int parameterIndex) |
int |
getParameterCount() |
ParameterMetadata |
getParameterMetadata(int parameterIndex) |
SabrInterestRateParameters |
getParameters()
Gets the SABR model parameters.
|
ZonedDateTime |
getValuationDateTime()
Gets the valuation date-time.
|
int |
hashCode() |
static SabrParametersSwaptionVolatilities.Meta |
meta()
The meta-bean for
SabrParametersSwaptionVolatilities. |
SabrParametersSwaptionVolatilities.Meta |
metaBean() |
double |
nu(double expiry,
double tenor)
Calculates the nu parameter for a pair of time to expiry and instrument tenor.
|
static SabrParametersSwaptionVolatilities |
of(SwaptionVolatilitiesName name,
FixedFloatSwapConvention convention,
ZonedDateTime valuationDateTime,
SabrInterestRateParameters parameters)
Obtains an instance from the SABR model parameters and the date-time for which it is valid.
|
CurrencyParameterSensitivities |
parameterSensitivity(PointSensitivities 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 |
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.
|
double |
tenor(LocalDate startDate,
LocalDate endDate)
Calculates the tenor of the swap based on its start date and end date.
|
SabrParametersSwaptionVolatilities.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
double |
volatility(double expiry,
double tenor,
double strike,
double forwardRate)
Calculates the volatility at the specified expiry.
|
ValueDerivatives |
volatilityAdjoint(double expiry,
double tenor,
double strike,
double forward)
Calculates the volatility and associated sensitivities.
|
SabrParametersSwaptionVolatilities |
withParameter(int parameterIndex,
double newValue) |
SabrParametersSwaptionVolatilities |
withPerturbation(ParameterPerturbation perturbation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetVolatilityTypeconvertSwaptionSensitivitygetValuationDate, parameterSensitivity, volatilityfindParameterIndexpublic static SabrParametersSwaptionVolatilities of(SwaptionVolatilitiesName name, FixedFloatSwapConvention convention, ZonedDateTime valuationDateTime, SabrInterestRateParameters parameters)
name - the nameconvention - the swap convention that the volatilities are to be used forvaluationDateTime - the valuation date-timeparameters - the SABR model parameterspublic DayCount getDayCount()
public <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 SabrParametersSwaptionVolatilities withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDatawithParameter in interface SabrSwaptionVolatilitieswithParameter in interface SwaptionVolatilitiespublic SabrParametersSwaptionVolatilities withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatawithPerturbation in interface SabrSwaptionVolatilitieswithPerturbation in interface SwaptionVolatilitiespublic double volatility(double expiry,
double tenor,
double strike,
double forwardRate)
SwaptionVolatilities
This relies on expiry supplied by SwaptionVolatilities.relativeTime(ZonedDateTime).
This relies on tenor supplied by SwaptionVolatilities.tenor(LocalDate, LocalDate).
volatility in interface SwaptionVolatilitiesexpiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionstrike - the option strike rateforwardRate - the forward rate of the underlying swappublic ValueDerivatives volatilityAdjoint(double expiry, double tenor, double strike, double forward)
SabrSwaptionVolatilitiesThe derivatives are stored in an array with:
volatilityAdjoint in interface SabrSwaptionVolatilitiesexpiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionstrike - the strikeforward - the forwardpublic double alpha(double expiry,
double tenor)
SabrSwaptionVolatilitiesalpha in interface SabrSwaptionVolatilitiesexpiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionpublic double beta(double expiry,
double tenor)
SabrSwaptionVolatilitiesbeta in interface SabrSwaptionVolatilitiesexpiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionpublic double rho(double expiry,
double tenor)
SabrSwaptionVolatilitiesrho in interface SabrSwaptionVolatilitiesexpiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionpublic double nu(double expiry,
double tenor)
SabrSwaptionVolatilitiesnu in interface SabrSwaptionVolatilitiesexpiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionpublic double shift(double expiry,
double tenor)
SabrSwaptionVolatilitiesshift in interface SabrSwaptionVolatilitiesexpiry - the time to expiry as a year fractiontenor - the tenor of the instrument as a year fractionpublic CurrencyParameterSensitivities parameterSensitivity(PointSensitivities pointSensitivities)
SwaptionVolatilities
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 SwaptionVolatilitiespointSensitivities - the point sensitivitiespublic double price(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
SwaptionVolatilities
This relies on expiry supplied by SwaptionVolatilities.relativeTime(ZonedDateTime).
This relies on tenor supplied by SwaptionVolatilities.tenor(LocalDate, LocalDate).
This relies on volatility supplied by SwaptionVolatilities.volatility(double, double, double, double).
price in interface SwaptionVolatilitiesexpiry - 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 volatilitypublic double priceDelta(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
SwaptionVolatilitiesThis is the forward driftless delta.
This relies on expiry supplied by SwaptionVolatilities.relativeTime(ZonedDateTime).
This relies on tenor supplied by SwaptionVolatilities.tenor(LocalDate, LocalDate).
This relies on volatility supplied by SwaptionVolatilities.volatility(double, double, double, double).
priceDelta in interface SwaptionVolatilitiesexpiry - 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 volatilitypublic double priceGamma(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
SwaptionVolatilitiesThis is the second order sensitivity of the forward option value to the forward.
This relies on expiry supplied by SwaptionVolatilities.relativeTime(ZonedDateTime).
This relies on tenor supplied by SwaptionVolatilities.tenor(LocalDate, LocalDate).
This relies on volatility supplied by SwaptionVolatilities.volatility(double, double, double, double).
priceGamma in interface SwaptionVolatilitiesexpiry - 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 volatilitypublic double priceTheta(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
SwaptionVolatilitiesThis is the driftless sensitivity of the present value to a change in time to maturity.
This relies on expiry supplied by SwaptionVolatilities.relativeTime(ZonedDateTime).
This relies on tenor supplied by SwaptionVolatilities.tenor(LocalDate, LocalDate).
This relies on volatility supplied by SwaptionVolatilities.volatility(double, double, double, double).
priceTheta in interface SwaptionVolatilitiesexpiry - 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 volatilitypublic double priceVega(double expiry,
double tenor,
PutCall putCall,
double strike,
double forward,
double volatility)
SwaptionVolatilitiesThis is the sensitivity of the option forward price to the implied volatility.
This relies on expiry supplied by SwaptionVolatilities.relativeTime(ZonedDateTime).
This relies on tenor supplied by SwaptionVolatilities.tenor(LocalDate, LocalDate).
This relies on volatility supplied by SwaptionVolatilities.volatility(double, double, double, double).
priceVega in interface SwaptionVolatilitiesexpiry - 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 volatilitypublic double relativeTime(ZonedDateTime dateTime)
SwaptionVolatilitiesWhen the date is after the valuation date (and potentially time), the returned number is negative.
relativeTime in interface SwaptionVolatilitiesdateTime - the date-time to find the relative year fraction ofpublic double tenor(LocalDate startDate, LocalDate endDate)
SwaptionVolatilitiestenor in interface SwaptionVolatilitiesstartDate - the start dateendDate - the end datepublic static SabrParametersSwaptionVolatilities.Meta meta()
SabrParametersSwaptionVolatilities.public static SabrParametersSwaptionVolatilities.Builder builder()
public SabrParametersSwaptionVolatilities.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic SwaptionVolatilitiesName getName()
getName in interface SwaptionVolatilitiespublic FixedFloatSwapConvention getConvention()
getConvention in interface SwaptionVolatilitiespublic ZonedDateTime getValuationDateTime()
The volatilities are calibrated for this date-time.
getValuationDateTime in interface SwaptionVolatilitiespublic SabrInterestRateParameters getParameters()
Each model parameter of SABR model is a surface. The x-value of the surface is the expiry, as a year fraction. The y-value of the surface is the swap tenor, as a year fraction rounded to the month.
public Optional<ImmutableList<DoubleArray>> getDataSensitivityAlpha()
The order of the sensitivities have to be coherent with the surface parameter metadata.
public Optional<ImmutableList<DoubleArray>> getDataSensitivityBeta()
The order of the sensitivities have to be coherent with the surface parameter metadata.
public Optional<ImmutableList<DoubleArray>> getDataSensitivityRho()
The order of the sensitivities have to be coherent with the surface parameter metadata.
public Optional<ImmutableList<DoubleArray>> getDataSensitivityNu()
The order of the sensitivities have to be coherent with the surface parameter metadata.
public SabrParametersSwaptionVolatilities.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.