Class SabrExtrapolationReplicationCmsPeriodPricer


  • public final class SabrExtrapolationReplicationCmsPeriodPricer
    extends Object
    Computes the price of a CMS coupon/caplet/floorlet by swaption replication on a shifted SABR formula with extrapolation.

    The extrapolation is done on call prices above a certain strike. See SabrExtrapolationRightFunction for more details on the extrapolation method.

    The replication requires numerical integration. This is completed by RungeKuttaIntegrator1D.

    The consistency between RatesProvider and SabrParametersSwaptionVolatilities is not checked in this class, but validated only once in SabrExtrapolationReplicationCmsLegPricer.

    Reference: Hagan, P. S. (2003). Convexity conundrums: Pricing CMS swaps, caps, and floors. Wilmott Magazine, March, pages 38--44. OpenGamma implementation note: Replication pricing for linear and TEC format CMS, Version 1.2, March 2011. OpenGamma implementation note for the extrapolation: Smile extrapolation, version 1.2, May 2011.

    • Method Detail

      • of

        public static SabrExtrapolationReplicationCmsPeriodPricer of​(double cutOffStrike,
                                                                     double mu)
        Obtains the pricer with default swap pricer.
        Parameters:
        cutOffStrike - the cut-off strike value
        mu - the tail thickness
        Returns:
        the pricer
      • getMu

        public double getMu()
        Returns the tail thickness parameter.
        Returns:
        the parameter
      • getCutOffStrike

        public double getCutOffStrike()
        Returns the cut-off strike.
        Returns:
        the strike
      • presentValue

        public CurrencyAmount presentValue​(CmsPeriod cmsPeriod,
                                           RatesProvider provider,
                                           SabrSwaptionVolatilities swaptionVolatilities)
        Computes the present value by replication in SABR framework with extrapolation on the right.
        Parameters:
        cmsPeriod - the CMS
        provider - the rates provider
        swaptionVolatilities - the swaption volatilities
        Returns:
        the present value
      • adjustedForwardRate

        public double adjustedForwardRate​(CmsPeriod cmsPeriod,
                                          RatesProvider provider,
                                          SabrSwaptionVolatilities swaptionVolatilities)
        Computes the adjusted forward rate for a CMS coupon.

        The adjusted forward rate, is the number such that, multiplied by the notional, the year fraction and the payment date discount factor, it produces the present value. In other terms, it is the number which used in the same formula used for Ibor coupon pricing will provide the correct present value.

        For period already fixed, this number will be equal to the swap index fixing.

        For cap or floor the result is the adjusted forward rate for the coupon equivalent to the cap/floor, i.e. the coupon with the same dates and index but with no cap or floor strike.

        Parameters:
        cmsPeriod - the CMS period, which should be of the type CmsPeriodType.COUPON
        provider - the rates provider
        swaptionVolatilities - the swaption volatilities
        Returns:
        the adjusted forward rate
      • adjustmentToForwardRate

        public double adjustmentToForwardRate​(CmsPeriod cmsPeriod,
                                              RatesProvider provider,
                                              SabrSwaptionVolatilities swaptionVolatilities)
        Computes the adjustment to the forward rate for a CMS coupon.

        The adjustment to the forward rate, is the quantity that need to be added to the forward rate to obtain the adjusted forward rate. The adjusted forward rate is the number which used in the same formula used for Ibor coupon pricing (forward * notional * accrual factor * discount factor) will provide the correct present value.

        For cap or floor the result is the adjustment to the forward rate for the coupon equivalent to the cap/floor, i.e. the coupon with the same dates and index but with no cap or floor strike.

        Parameters:
        cmsPeriod - the CMS period, which should be of the type CmsPeriodType.COUPON
        provider - the rates provider
        swaptionVolatilities - the swaption volatilities
        Returns:
        the adjusted forward rate
      • presentValueSensitivityRates

        public PointSensitivityBuilder presentValueSensitivityRates​(CmsPeriod cmsPeriod,
                                                                    RatesProvider provider,
                                                                    SabrSwaptionVolatilities swaptionVolatilities)
        Computes the present value curve sensitivity by replication in SABR framework with extrapolation on the right.
        Parameters:
        cmsPeriod - the CMS
        provider - the rates provider
        swaptionVolatilities - the swaption volatilities
        Returns:
        the present value sensitivity
      • presentValueSensitivityModelParamsSabr

        public PointSensitivityBuilder presentValueSensitivityModelParamsSabr​(CmsPeriod cmsPeriod,
                                                                              RatesProvider provider,
                                                                              SabrSwaptionVolatilities swaptionVolatilities)
        Computes the present value sensitivity to SABR parameters by replication in SABR framework with extrapolation on the right.
        Parameters:
        cmsPeriod - the CMS
        provider - the rates provider
        swaptionVolatilities - the swaption volatilities
        Returns:
        the present value sensitivity
      • presentValueSensitivityStrike

        public double presentValueSensitivityStrike​(CmsPeriod cmsPeriod,
                                                    RatesProvider provider,
                                                    SabrSwaptionVolatilities swaptionVolatilities)
        Computes the present value sensitivity to strike by replication in SABR framework with extrapolation on the right.
        Parameters:
        cmsPeriod - the CMS
        provider - the rates provider
        swaptionVolatilities - the swaption volatilities
        Returns:
        the present value sensitivity
      • explainPresentValue

        public void explainPresentValue​(CmsPeriod period,
                                        RatesProvider ratesProvider,
                                        SabrSwaptionVolatilities swaptionVolatilities,
                                        ExplainMapBuilder builder)
        Explains the present value of the CMS period.

        This returns explanatory information about the calculation.

        Parameters:
        period - the product
        ratesProvider - the rates provider
        swaptionVolatilities - the volatilities
        builder - the builder to populate