Class VolatilitySwaptionProductPricer


  • public class VolatilitySwaptionProductPricer
    extends Object
    Pricer for swaptions handling physical and cash par yield settlement based on volatilities.

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

    • Method Detail

      • presentValue

        public CurrencyAmount presentValue​(ResolvedSwaption swaption,
                                           RatesProvider ratesProvider,
                                           SwaptionVolatilities swaptionVolatilities)
        Calculates the present value of the swaption.

        The result is expressed using the currency of the swaption.

        Parameters:
        swaption - the swaption
        ratesProvider - the rates provider
        swaptionVolatilities - the volatilities
        Returns:
        the present value
      • currencyExposure

        public MultiCurrencyAmount currencyExposure​(ResolvedSwaption swaption,
                                                    RatesProvider ratesProvider,
                                                    SwaptionVolatilities swaptionVolatilities)
        Computes the currency exposure of the swaption.

        This is equivalent to the present value of the swaption.

        Parameters:
        swaption - the swaption
        ratesProvider - the rates provider
        swaptionVolatilities - the volatilities
        Returns:
        the currency exposure
      • impliedVolatility

        public double impliedVolatility​(ResolvedSwaption swaption,
                                        RatesProvider ratesProvider,
                                        SwaptionVolatilities swaptionVolatilities)
        Computes the implied volatility of the swaption.
        Parameters:
        swaption - the swaption
        ratesProvider - the rates provider
        swaptionVolatilities - the volatilities
        Returns:
        the implied volatility
      • forwardRate

        public double forwardRate​(ResolvedSwaption swaption,
                                  RatesProvider ratesProvider)
        Provides the forward rate.

        This is the par rate for the forward starting swap that is the underlying of the swaption.

        Parameters:
        swaption - the swaption
        ratesProvider - the rates provider
        Returns:
        the forward rate
      • presentValueGamma

        public CurrencyAmount presentValueGamma​(ResolvedSwaption swaption,
                                                RatesProvider ratesProvider,
                                                SwaptionVolatilities swaptionVolatilities)
        Calculates the present value gamma of the swaption.

        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.

        Parameters:
        swaption - the swaption
        ratesProvider - the rates provider
        swaptionVolatilities - the volatilities
        Returns:
        the present value gamma
      • presentValueTheta

        public CurrencyAmount presentValueTheta​(ResolvedSwaption swaption,
                                                RatesProvider ratesProvider,
                                                SwaptionVolatilities swaptionVolatilities)
        Calculates the present value of the swaption.

        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.

        Parameters:
        swaption - the swaption
        ratesProvider - the rates provider
        swaptionVolatilities - the volatilities
        Returns:
        the present value theta
      • presentValueSensitivityRatesStickyStrike

        public PointSensitivityBuilder presentValueSensitivityRatesStickyStrike​(ResolvedSwaption swaption,
                                                                                RatesProvider ratesProvider,
                                                                                SwaptionVolatilities swaptionVolatilities)
        Calculates the present value sensitivity of the swaption 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:
        swaption - the swaption
        ratesProvider - the rates provider
        swaptionVolatilities - the volatilities
        Returns:
        the point sensitivity to the rate curves
      • presentValueSensitivityModelParamsVolatility

        public SwaptionSensitivity presentValueSensitivityModelParamsVolatility​(ResolvedSwaption swaption,
                                                                                RatesProvider ratesProvider,
                                                                                SwaptionVolatilities swaptionVolatilities)
        Calculates the present value sensitivity to the implied volatility of the swaption.

        The sensitivity to the implied volatility is also called vega.

        Parameters:
        swaption - the swaption
        ratesProvider - the rates provider
        swaptionVolatilities - the volatilities
        Returns:
        the point sensitivity to the implied volatility