Class DiscountingFixedCouponBondPaymentPeriodPricer


  • public class DiscountingFixedCouponBondPaymentPeriodPricer
    extends Object
    Pricer implementation for bond payment periods based on a fixed coupon.

    This pricer performs discounting of the fixed coupon payment.

    • Constructor Detail

      • DiscountingFixedCouponBondPaymentPeriodPricer

        public DiscountingFixedCouponBondPaymentPeriodPricer()
        Creates an instance.
    • Method Detail

      • presentValue

        public double presentValue​(FixedCouponBondPaymentPeriod period,
                                   IssuerCurveDiscountFactors discountFactors)
        Calculates the present value of a single fixed coupon payment period.

        The amount is expressed in the currency of the period. This returns the value of the period with discounting.

        The payment date of the period should not be in the past. The result of this method for payment dates in the past is undefined.

        Parameters:
        period - the period to price
        discountFactors - the discount factor provider
        Returns:
        the present value of the period
      • presentValueWithSpread

        public double presentValueWithSpread​(FixedCouponBondPaymentPeriod period,
                                             IssuerCurveDiscountFactors discountFactors,
                                             double zSpread,
                                             CompoundedRateType compoundedRateType,
                                             int periodsPerYear)
        Calculates the present value of a single fixed coupon payment period with z-spread.

        The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the discounting curve.

        The amount is expressed in the currency of the period. This returns the value of the period with discounting.

        The payment date of the period should not be in the past. The result of this method for payment dates in the past is undefined.

        Parameters:
        period - the period to price
        discountFactors - the discount factor provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodsPerYear - the number of periods per year
        Returns:
        the present value of the period
      • forecastValue

        public double forecastValue​(FixedCouponBondPaymentPeriod period,
                                    IssuerCurveDiscountFactors discountFactors)
        Calculates the forecast value of a single fixed coupon payment period.

        The amount is expressed in the currency of the period. This returns the value of the period with discounting.

        The payment date of the period should not be in the past. The result of this method for payment dates in the past is undefined.

        The forecast value is z-spread independent.

        Parameters:
        period - the period to price
        discountFactors - the discount factor provider
        Returns:
        the present value of the period
      • presentValueSensitivity

        public PointSensitivityBuilder presentValueSensitivity​(FixedCouponBondPaymentPeriod period,
                                                               IssuerCurveDiscountFactors discountFactors)
        Calculates the present value sensitivity of a single fixed coupon payment period.

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

        Parameters:
        period - the period to price
        discountFactors - the discount factor provider
        Returns:
        the present value curve sensitivity of the period
      • presentValueSensitivityWithSpread

        public PointSensitivityBuilder presentValueSensitivityWithSpread​(FixedCouponBondPaymentPeriod period,
                                                                         IssuerCurveDiscountFactors discountFactors,
                                                                         double zSpread,
                                                                         CompoundedRateType compoundedRateType,
                                                                         int periodsPerYear)
        Calculates the present value sensitivity of a single fixed coupon payment period with z-spread.

        The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the discounting curve.

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

        Parameters:
        period - the period to price
        discountFactors - the discount factor provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodsPerYear - the number of periods per year
        Returns:
        the present value curve sensitivity of the period
      • forecastValueSensitivity

        public PointSensitivityBuilder forecastValueSensitivity​(FixedCouponBondPaymentPeriod period,
                                                                IssuerCurveDiscountFactors discountFactors)
        Calculates the forecast value sensitivity of a single fixed coupon payment period.

        The forecast value sensitivity of the period is the sensitivity of the forecast value to the underlying curves.

        The forecast value sensitivity is zero and z-spread independent for the fixed payment.

        Parameters:
        period - the period to price
        discountFactors - the discount factor provider
        Returns:
        the forecast value curve sensitivity of the period
      • explainPresentValue

        public void explainPresentValue​(FixedCouponBondPaymentPeriod period,
                                        IssuerCurveDiscountFactors discountFactors,
                                        ExplainMapBuilder builder)
        Explains the present value of a single fixed coupon payment period.

        This adds information to the ExplainMapBuilder to aid understanding of the calculation.

        Parameters:
        period - the period to price
        discountFactors - the discount factor provider
        builder - the builder to populate
      • explainPresentValueWithSpread

        public void explainPresentValueWithSpread​(FixedCouponBondPaymentPeriod period,
                                                  IssuerCurveDiscountFactors discountFactors,
                                                  ExplainMapBuilder builder,
                                                  double zSpread,
                                                  CompoundedRateType compoundedRateType,
                                                  int periodsPerYear)
        Explains the present value of a single fixed coupon payment period with z-spread.

        This adds information to the ExplainMapBuilder to aid understanding of the calculation.

        The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the discounting curve.

        Parameters:
        period - the period to price
        discountFactors - the discount factor provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodsPerYear - the number of periods per year
        builder - the builder to populate