public final class NormalSwaptionExpiryStrikeVolatilities extends Object implements NormalSwaptionVolatilities, org.joda.beans.ImmutableBean, Serializable
The volatility is represented by a surface on the expiry and strike dimensions.
| Modifier and Type | Class and Description |
|---|---|
static class |
NormalSwaptionExpiryStrikeVolatilities.Meta
The meta-bean for
NormalSwaptionExpiryStrikeVolatilities. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
<T> Optional<T> |
findData(MarketDataName<T> name) |
OptionalInt |
findParameterIndex(ParameterMetadata metadata) |
FixedFloatSwapConvention |
getConvention()
Gets the swap convention that the volatilities are to be used for.
|
SwaptionVolatilitiesName |
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.
|
int |
hashCode() |
static NormalSwaptionExpiryStrikeVolatilities.Meta |
meta()
The meta-bean for
NormalSwaptionExpiryStrikeVolatilities. |
NormalSwaptionExpiryStrikeVolatilities.Meta |
metaBean() |
static NormalSwaptionExpiryStrikeVolatilities |
of(FixedFloatSwapConvention convention,
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 |
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.
|
String |
toString() |
double |
volatility(double expiry,
double tenor,
double strike,
double forwardRate)
Calculates the volatility at the specified expiry.
|
NormalSwaptionExpiryStrikeVolatilities |
withParameter(int parameterIndex,
double newValue) |
NormalSwaptionExpiryStrikeVolatilities |
withPerturbation(ParameterPerturbation perturbation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetVolatilityTypegetValuationDate, parameterSensitivity, volatilitypublic static NormalSwaptionExpiryStrikeVolatilities of(FixedFloatSwapConvention convention, 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.STRIKE
ValueType.NORMAL_VOLATILITY
SurfaceInfoType.DAY_COUNT
Surfaces.normalVolatilityByExpiryStrike(String, DayCount).convention - the swap convention that the volatilities are to be used forvaluationDateTime - the valuation date-timesurface - the implied volatility surfacepublic SwaptionVolatilitiesName getName()
SwaptionVolatilitiesgetName in interface SwaptionVolatilitiespublic <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 NormalSwaptionExpiryStrikeVolatilities withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDatawithParameter in interface NormalSwaptionVolatilitieswithParameter in interface SwaptionVolatilitiespublic NormalSwaptionExpiryStrikeVolatilities withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatawithPerturbation in interface NormalSwaptionVolatilitieswithPerturbation 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 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 NormalSwaptionExpiryStrikeVolatilities.Meta meta()
NormalSwaptionExpiryStrikeVolatilities.public NormalSwaptionExpiryStrikeVolatilities.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic FixedFloatSwapConvention getConvention()
getConvention in interface SwaptionVolatilitiespublic ZonedDateTime getValuationDateTime()
The volatilities are calibrated for this date-time.
getValuationDateTime in interface SwaptionVolatilitiespublic Surface getSurface()
The x-value of the surface is the expiry, as a year fraction. The y-value of the surface is the strike, as a rate.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.