Class DiscountingTermDepositProductPricer


  • public class DiscountingTermDepositProductPricer
    extends Object
    The methods associated to the pricing of term deposit by discounting.

    This provides the ability to price ResolvedTermDeposit.

    • Constructor Detail

      • DiscountingTermDepositProductPricer

        public DiscountingTermDepositProductPricer()
        Creates an instance.
    • Method Detail

      • presentValue

        public CurrencyAmount presentValue​(ResolvedTermDeposit deposit,
                                           RatesProvider provider)
        Calculates the present value by discounting the final cash flow (nominal + interest) and the initial payment (initial amount).

        The present value of the product is the value on the valuation date.

        Parameters:
        deposit - the product
        provider - the rates provider
        Returns:
        the present value of the product
      • presentValueSensitivity

        public PointSensitivities presentValueSensitivity​(ResolvedTermDeposit deposit,
                                                          RatesProvider provider)
        Calculates the present value sensitivity by discounting the final cash flow (nominal + interest) and the initial payment (initial amount).
        Parameters:
        deposit - the product
        provider - the rates provider
        Returns:
        the point sensitivity of the present value
      • parRate

        public double parRate​(ResolvedTermDeposit deposit,
                              RatesProvider provider)
        Calculates the deposit fair rate given the start and end time and the accrual factor.

        When the deposit has already started the number may not be meaningful as the remaining period is not in line with the accrual factor.

        Parameters:
        deposit - the product
        provider - the rates provider
        Returns:
        the par rate
      • parRateSensitivity

        public PointSensitivities parRateSensitivity​(ResolvedTermDeposit deposit,
                                                     RatesProvider provider)
        Calculates the par rate curve sensitivity.

        The calculation is based on both of initial and final payments. Thus the number resulting may not be meaningful when deposit has already started and only the final payment remains (no initial payment).

        Parameters:
        deposit - the product
        provider - the rates provider
        Returns:
        the par rate curve sensitivity
      • parSpread

        public double parSpread​(ResolvedTermDeposit deposit,
                                RatesProvider provider)
        Calculates the spread to be added to the deposit rate to have a zero present value.

        The calculation is based on both the initial and final payments. Thus the resulting number may not be meaningful when deposit has already started and only the final payment remains (no initial payment).

        Parameters:
        deposit - the product
        provider - the rates provider
        Returns:
        the par spread
      • parSpreadSensitivity

        public PointSensitivities parSpreadSensitivity​(ResolvedTermDeposit deposit,
                                                       RatesProvider provider)
        Calculates the par spread curve sensitivity.

        The calculation is based on both of initial and final payments. Thus the number resulting may not be meaningful when deposit has already started and only the final payment remains (no initial payment).

        Parameters:
        deposit - the product
        provider - the rates provider
        Returns:
        the par spread curve sensitivity