Class DiscountingCmsLegPricer


  • public class DiscountingCmsLegPricer
    extends Object
    Pricer for CMS legs by simple forward estimation.

    This is an overly simplistic approach to CMS coupon pricer. It is provided only for testing and comparison purposes. It is not recommended to use this for valuation or risk management purposes.

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

    • Constructor Detail

      • DiscountingCmsLegPricer

        public DiscountingCmsLegPricer​(DiscountingCmsPeriodPricer cmsPeriodPricer)
        Creates an instance.
        Parameters:
        cmsPeriodPricer - the pricer for CmsPeriod
    • Method Detail

      • presentValue

        public CurrencyAmount presentValue​(ResolvedCmsLeg cmsLeg,
                                           RatesProvider ratesProvider)
        Computes the present value of CMS leg by simple forward rate estimation.

        The result is returned using the payment currency of the leg.

        Parameters:
        cmsLeg - the CMS leg
        ratesProvider - the rates provider
        Returns:
        the present value
      • presentValueSensitivity

        public PointSensitivityBuilder presentValueSensitivity​(ResolvedCmsLeg cmsLeg,
                                                               RatesProvider ratesProvider)
        Calculates the present value curve sensitivity of the CMS leg by simple forward rate estimation.

        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
        Returns:
        the present value sensitivity
      • currentCash

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