Class SabrExtrapolationReplicationCmsLegPricer


  • public class SabrExtrapolationReplicationCmsLegPricer
    extends Object
    Pricer for CMS legs by swaption replication on a SABR formula with extrapolation.

    This function provides the ability to price ResolvedCmsLeg. One must apply resolved() in order to price CmsLeg.

    • Method Detail

      • presentValue

        public CurrencyAmount presentValue​(ResolvedCmsLeg cmsLeg,
                                           RatesProvider ratesProvider,
                                           SabrSwaptionVolatilities swaptionVolatilities)
        Calculates the present value of the CMS leg.

        The present value of the leg is the value on the valuation date. The result is returned using the payment currency of the leg.

        Parameters:
        cmsLeg - the CMS leg
        ratesProvider - the rates provider
        swaptionVolatilities - the swaption volatilities
        Returns:
        the present value
      • explainPresentValue

        public ExplainMap explainPresentValue​(ResolvedCmsLeg cmsLeg,
                                              RatesProvider provider,
                                              SabrSwaptionVolatilities volatilities)
        Explains the present value of a CMS leg.

        This returns explanatory information about the calculation.

        Parameters:
        cmsLeg - the CMS leg
        provider - the rates provider
        volatilities - the swaption volatilities
        Returns:
        the explanatory information
      • presentValueSensitivityRates

        public PointSensitivityBuilder presentValueSensitivityRates​(ResolvedCmsLeg cmsLeg,
                                                                    RatesProvider ratesProvider,
                                                                    SabrSwaptionVolatilities swaptionVolatilities)
        Calculates the present value curve sensitivity of the CMS leg.

        The present value sensitivity of the leg is the sensitivity of the present value to the underlying curves.

        Parameters:
        cmsLeg - the CMS leg
        ratesProvider - the rates provider
        swaptionVolatilities - the swaption volatilities
        Returns:
        the present value sensitivity
      • presentValueSensitivityModelParamsSabr

        public PointSensitivityBuilder presentValueSensitivityModelParamsSabr​(ResolvedCmsLeg cmsLeg,
                                                                              RatesProvider ratesProvider,
                                                                              SabrSwaptionVolatilities swaptionVolatilities)
        Calculates the present value sensitivity to the SABR model parameters.

        The present value sensitivity of the leg is the sensitivity of the present value to the SABR model parameters, alpha, beta, rho and nu.

        Parameters:
        cmsLeg - the CMS leg
        ratesProvider - the rates provider
        swaptionVolatilities - the swaption volatilities
        Returns:
        the present value sensitivity
      • presentValueSensitivityStrike

        public double presentValueSensitivityStrike​(ResolvedCmsLeg cmsLeg,
                                                    RatesProvider ratesProvider,
                                                    SabrSwaptionVolatilities swaptionVolatilities)
        Calculates the present value sensitivity to the strike value.

        The present value sensitivity of the leg is the sensitivity of the present value to the strike value. This is not relevant for CMS coupons and an exception is thrown in the underlying pricer.

        Parameters:
        cmsLeg - the CMS leg
        ratesProvider - the rates provider
        swaptionVolatilities - the swaption volatilities
        Returns:
        the present value sensitivity
      • currentCash

        public CurrencyAmount currentCash​(ResolvedCmsLeg cmsLeg,
                                          RatesProvider ratesProvider,
                                          SabrSwaptionVolatilities swaptionVolatilities)
        Calculates the current cash of the leg.
        Parameters:
        cmsLeg - the CMS leg
        ratesProvider - the rates provider
        swaptionVolatilities - the swaption volatilities
        Returns:
        the current cash