Class DiscountingCmsPeriodPricer


  • public class DiscountingCmsPeriodPricer
    extends Object
    Computes the price of a CMS coupon 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.

    • Method Detail

      • presentValue

        public CurrencyAmount presentValue​(CmsPeriod cmsPeriod,
                                           RatesProvider provider)
        Computes the present value of CMS coupon by simple forward rate estimation.
        Parameters:
        cmsPeriod - the CMS
        provider - the rates provider
        Returns:
        the present value
      • forwardRate

        public double forwardRate​(CmsPeriod cmsPeriod,
                                  RatesProvider provider)
        Computes the forward rate associated to the swap underlying the CMS period.

        Returns a value only if the period has not fixed yet. If the fixing date is on or before the valuation date, an IllegalArgumentException is thrown.

        Parameters:
        cmsPeriod - the CMS
        provider - the rates provider
        Returns:
        the forward rate
      • presentValueSensitivity

        public PointSensitivityBuilder presentValueSensitivity​(CmsPeriod cmsPeriod,
                                                               RatesProvider provider)
        Computes the present value curve sensitivity by simple forward rate estimation.
        Parameters:
        cmsPeriod - the CMS
        provider - the rates provider
        Returns:
        the present value sensitivity