Class DiscountingTermDepositTradePricer


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

    This provides the ability to price ResolvedTermDeposit.

    • Method Detail

      • presentValue

        public CurrencyAmount presentValue​(ResolvedTermDepositTrade trade,
                                           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 trade is the value on the valuation date.

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

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

        public double parRate​(ResolvedTermDepositTrade trade,
                              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:
        trade - the trade
        provider - the rates provider
        Returns:
        the par rate
      • parRateSensitivity

        public PointSensitivities parRateSensitivity​(ResolvedTermDepositTrade trade,
                                                     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:
        trade - the trade
        provider - the rates provider
        Returns:
        the par rate curve sensitivity
      • parSpread

        public double parSpread​(ResolvedTermDepositTrade trade,
                                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:
        trade - the trade
        provider - the rates provider
        Returns:
        the par spread
      • parSpreadSensitivity

        public PointSensitivities parSpreadSensitivity​(ResolvedTermDepositTrade trade,
                                                       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:
        trade - the trade
        provider - the rates provider
        Returns:
        the par spread curve sensitivity