Class SabrSwaptionTradePricer
- java.lang.Object
-
- com.opengamma.strata.pricer.swaption.SabrSwaptionTradePricer
-
public class SabrSwaptionTradePricer extends Object
Pricer for swaption trade in the SABR model on the swap rate.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 volatilities from the provider are taken as such.
The present value and sensitivities of the premium, if in the future, are also taken into account.
-
-
Field Summary
Fields Modifier and Type Field Description static SabrSwaptionTradePricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description SabrSwaptionTradePricer(SabrSwaptionCashParYieldProductPricer cashParYieldPricer, SabrSwaptionPhysicalProductPricer physicalPricer, DiscountingPaymentPricer paymentPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiCurrencyAmount
currencyExposure(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Computes the currency exposure of the swaption trade.CurrencyAmount
currentCash(ResolvedSwaptionTrade trade, LocalDate valuationDate)
Calculates the current cash of the swaption trade.double
forwardRate(ResolvedSwaptionTrade swaptionTrade, RatesProvider ratesProvider)
Provides the forward rate.double
impliedVolatility(ResolvedSwaptionTrade swaptionTrade, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Computes the implied volatility of the swaption.CurrencyAmount
presentValue(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption trade.PointSensitivities
presentValueSensitivityModelParamsSabr(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the SABR model parameters of the swaption trade.PointSensitivities
presentValueSensitivityModelParamsVolatility(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the implied volatility of the swaption trade.PointSensitivities
presentValueSensitivityRatesStickyModel(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity of the swaption trade to the rate curves.PointSensitivities
presentValueSensitivityRatesStickyStrike(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity of the swaption trade to the rate curves.
-
-
-
Field Detail
-
DEFAULT
public static final SabrSwaptionTradePricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
SabrSwaptionTradePricer
public SabrSwaptionTradePricer(SabrSwaptionCashParYieldProductPricer cashParYieldPricer, SabrSwaptionPhysicalProductPricer physicalPricer, DiscountingPaymentPricer paymentPricer)
Creates an instance.- Parameters:
cashParYieldPricer
- the pricer for cash par yieldphysicalPricer
- the pricer for physicalpaymentPricer
- the pricer forPayment
-
-
Method Detail
-
presentValue
public CurrencyAmount presentValue(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption trade.The result is expressed using the currency of the swaption.
- Parameters:
trade
- the swaption traderatesProvider
- the rates providerswaptionVolatilities
- the volatilities- Returns:
- the present value
-
presentValueSensitivityRatesStickyStrike
public PointSensitivities presentValueSensitivityRatesStickyStrike(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity of the swaption trade to the rate curves.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.
- Parameters:
trade
- the swaption traderatesProvider
- the rates providerswaptionVolatilities
- the volatilities- Returns:
- the point sensitivity to the rate curves
-
presentValueSensitivityRatesStickyModel
public PointSensitivities presentValueSensitivityRatesStickyModel(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity of the swaption trade to the rate curves.The present value sensitivity is computed in a "sticky model parameter" style, i.e. the sensitivity to the curve nodes with the SABR model parameters unchanged. This sensitivity does not include a potential re-calibration of the model parameters to the raw market data.
- Parameters:
trade
- the swaption traderatesProvider
- the rates providerswaptionVolatilities
- the volatilities- Returns:
- the point sensitivity to the rate curves
-
presentValueSensitivityModelParamsVolatility
public PointSensitivities presentValueSensitivityModelParamsVolatility(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the implied volatility of the swaption trade.- Parameters:
trade
- the swaption traderatesProvider
- the rates providerswaptionVolatilities
- the volatilities- Returns:
- the point sensitivity to the implied volatility
-
presentValueSensitivityModelParamsSabr
public PointSensitivities presentValueSensitivityModelParamsSabr(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the SABR model parameters of the swaption trade.The sensitivity of the present value to the SABR model parameters, alpha, beta, rho and nu.
- Parameters:
trade
- the swaption traderatesProvider
- the rates providerswaptionVolatilities
- the volatilities- Returns:
- the point sensitivity to the SABR model parameters
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Computes the currency exposure of the swaption trade.- Parameters:
trade
- the swaption traderatesProvider
- the rates providerswaptionVolatilities
- the volatilities- Returns:
- the currency exposure
-
impliedVolatility
public double impliedVolatility(ResolvedSwaptionTrade swaptionTrade, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Computes the implied volatility of the swaption.- Parameters:
swaptionTrade
- the swaption traderatesProvider
- the rates providerswaptionVolatilities
- the volatilities- Returns:
- the implied volatility
-
forwardRate
public double forwardRate(ResolvedSwaptionTrade swaptionTrade, RatesProvider ratesProvider)
Provides the forward rate.This is the par rate for the forward starting swap that is the underlying of the swaption.
- Parameters:
swaptionTrade
- the swaption traderatesProvider
- the rates provider- Returns:
- the forward rate
-
currentCash
public CurrencyAmount currentCash(ResolvedSwaptionTrade trade, LocalDate valuationDate)
Calculates the current cash of the swaption trade.Only the premium is contributing to the current cash for non-cash settle swaptions.
- Parameters:
trade
- the swaption tradevaluationDate
- the valuation date- Returns:
- the current cash amount
-
-