public class VolatilitySwaptionProductPricer extends Object
The swap underlying the swaption must have a fixed leg on which the forward rate is computed. The underlying swap must be single currency.
The volatility parameters are not adjusted for the underlying swap convention.
The value of the swaption after expiry is 0.
For a swaption which has already expired, a negative number is returned by
SwaptionVolatilities.relativeTime(ZonedDateTime)
.
Modifier and Type | Field and Description |
---|---|
static VolatilitySwaptionProductPricer |
DEFAULT
Default implementation.
|
Constructor and Description |
---|
VolatilitySwaptionProductPricer(VolatilitySwaptionCashParYieldProductPricer cashParYieldPricer,
VolatilitySwaptionPhysicalProductPricer physicalPricer)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
MultiCurrencyAmount |
currencyExposure(ResolvedSwaption swaption,
RatesProvider ratesProvider,
SwaptionVolatilities swaptionVolatilities)
Computes the currency exposure of the swaption.
|
double |
impliedVolatility(ResolvedSwaption swaption,
RatesProvider ratesProvider,
SwaptionVolatilities swaptionVolatilities)
Computes the implied volatility of the swaption.
|
CurrencyAmount |
presentValue(ResolvedSwaption swaption,
RatesProvider ratesProvider,
SwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption.
|
CurrencyAmount |
presentValueDelta(ResolvedSwaption swaption,
RatesProvider ratesProvider,
SwaptionVolatilities swaptionVolatilities)
Calculates the present value delta of the swaption.
|
CurrencyAmount |
presentValueGamma(ResolvedSwaption swaption,
RatesProvider ratesProvider,
SwaptionVolatilities swaptionVolatilities)
Calculates the present value gamma of the swaption.
|
SwaptionSensitivity |
presentValueSensitivityModelParamsVolatility(ResolvedSwaption swaption,
RatesProvider ratesProvider,
SwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the implied volatility of the swaption.
|
PointSensitivityBuilder |
presentValueSensitivityRatesStickyStrike(ResolvedSwaption swaption,
RatesProvider ratesProvider,
SwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity of the swaption to the rate curves.
|
CurrencyAmount |
presentValueTheta(ResolvedSwaption swaption,
RatesProvider ratesProvider,
SwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption.
|
public static final VolatilitySwaptionProductPricer DEFAULT
public VolatilitySwaptionProductPricer(VolatilitySwaptionCashParYieldProductPricer cashParYieldPricer, VolatilitySwaptionPhysicalProductPricer physicalPricer)
cashParYieldPricer
- the pricer for cash par yieldphysicalPricer
- the pricer for physicalpublic CurrencyAmount presentValue(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
The result is expressed using the currency of the swaption.
swaption
- the swaptionratesProvider
- the rates providerswaptionVolatilities
- the volatilitiespublic MultiCurrencyAmount currencyExposure(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
This is equivalent to the present value of the swaption.
swaption
- the swaptionratesProvider
- the rates providerswaptionVolatilities
- the volatilitiespublic double impliedVolatility(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
swaption
- the swaptionratesProvider
- the rates providerswaptionVolatilities
- the volatilitiespublic CurrencyAmount presentValueDelta(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
The present value delta is given by pvbp * priceDelta
where priceDelta
is the first derivative of the price with respect to forward.
The derivative is computed in the formula underlying the volatility (Black or Normal).
It does not take into account the potential change of implied volatility induced by
the change of forward. The number computed by this method is closely related to the
presentValueSensitivityRatesStickyStrike(com.opengamma.strata.product.swaption.ResolvedSwaption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.swaption.SwaptionVolatilities)
method.
The result is expressed using the currency of the swaption.
swaption
- the swaptionratesProvider
- the rates providerswaptionVolatilities
- the volatilitiespublic CurrencyAmount presentValueGamma(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
The present value gamma is given by pvbp * priceGamma
where priceGamma
is the second derivative of the price with respect to forward.
The result is expressed using the currency of the swaption.
swaption
- the swaptionratesProvider
- the rates providerswaptionVolatilities
- the volatilitiespublic CurrencyAmount presentValueTheta(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
The present value theta is given by pvbp * priceTheta
where priceTheta
is the minus of the price sensitivity to timeToExpiry
.
The result is expressed using the currency of the swaption.
swaption
- the swaptionratesProvider
- the rates providerswaptionVolatilities
- the volatilitiespublic PointSensitivityBuilder presentValueSensitivityRatesStickyStrike(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
The present value sensitivity is computed in a "sticky strike" style, i.e. the sensitivity to the curve nodes with the volatility at the swaption strike unchanged. This sensitivity does not include a potential change of volatility due to the implicit change of forward rate or moneyness.
swaption
- the swaptionratesProvider
- the rates providerswaptionVolatilities
- the volatilitiespublic SwaptionSensitivity presentValueSensitivityModelParamsVolatility(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
The sensitivity to the implied volatility is also called vega.
swaption
- the swaptionratesProvider
- the rates providerswaptionVolatilities
- the volatilitiesCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.