Class 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.

    • 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 trade
        ratesProvider - the rates provider
        swaptionVolatilities - 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 trade
        ratesProvider - the rates provider
        swaptionVolatilities - 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 trade
        ratesProvider - the rates provider
        swaptionVolatilities - 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 trade
        ratesProvider - the rates provider
        swaptionVolatilities - 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 trade
        ratesProvider - the rates provider
        swaptionVolatilities - the volatilities
        Returns:
        the point sensitivity to the SABR model parameters
      • impliedVolatility

        public double impliedVolatility​(ResolvedSwaptionTrade swaptionTrade,
                                        RatesProvider ratesProvider,
                                        SwaptionVolatilities swaptionVolatilities)
        Computes the implied volatility of the swaption.
        Parameters:
        swaptionTrade - the swaption trade
        ratesProvider - the rates provider
        swaptionVolatilities - 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 trade
        ratesProvider - 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 trade
        valuationDate - the valuation date
        Returns:
        the current cash amount