Class NormalSwaptionTradePricer


  • public class NormalSwaptionTradePricer
    extends Object
    Pricer for swaption trade in the normal 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,
                                           NormalSwaptionVolatilities 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,
                                                                           NormalSwaptionVolatilities 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
      • presentValueSensitivityModelParamsVolatility

        public PointSensitivities presentValueSensitivityModelParamsVolatility​(ResolvedSwaptionTrade trade,
                                                                               RatesProvider ratesProvider,
                                                                               NormalSwaptionVolatilities swaptionVolatilities)
        Calculates the present value sensitivity to the implied volatility of the swaption trade.

        The sensitivity to the normal volatility is also called normal vega.

        Parameters:
        trade - the swaption trade
        ratesProvider - the rates provider
        swaptionVolatilities - the volatilities
        Returns:
        the point sensitivity to the normal volatility
      • 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