• java.lang.Object

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

This provides the ability to price ResolvedTermDeposit.

• ### Field Summary

Fields
Modifier and Type Field Description
static DiscountingTermDepositTradePricer DEFAULT
Default implementation.
• ### Constructor Summary

Constructors
Constructor Description
DiscountingTermDepositTradePricer​(DiscountingTermDepositProductPricer productPricer)
Creates an instance.
• ### Method Summary

All Methods
Modifier and Type Method Description
MultiCurrencyAmount currencyExposure​(ResolvedTermDepositTrade trade, RatesProvider provider)
Calculates the currency exposure.
CurrencyAmount currentCash​(ResolvedTermDepositTrade trade, RatesProvider provider)
Calculates the current cash.
double parRate​(ResolvedTermDepositTrade trade, RatesProvider provider)
Calculates the deposit fair rate given the start and end time and the accrual factor.
PointSensitivities parRateSensitivity​(ResolvedTermDepositTrade trade, RatesProvider provider)
Calculates the par rate curve sensitivity.
double parSpread​(ResolvedTermDepositTrade trade, RatesProvider provider)
Calculates the spread to be added to the deposit rate to have a zero present value.
PointSensitivities parSpreadSensitivity​(ResolvedTermDepositTrade trade, RatesProvider provider)
Calculates the par spread curve sensitivity.
CurrencyAmount presentValue​(ResolvedTermDepositTrade trade, RatesProvider provider)
Calculates the present value by discounting the final cash flow (nominal + interest) and the initial payment (initial amount).
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).
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Field Detail

• #### DEFAULT

public static final DiscountingTermDepositTradePricer DEFAULT
Default implementation.
• ### Constructor Detail

public DiscountingTermDepositTradePricer​(DiscountingTermDepositProductPricer productPricer)
Creates an instance.
Parameters:
productPricer - the pricer for 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

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:

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
• #### currencyExposure

public MultiCurrencyAmount currencyExposure​(ResolvedTermDepositTrade trade,
RatesProvider provider)
Calculates the currency exposure.
Parameters:
trade - the trade
provider - the rates provider
Returns:
the currency exposure
• #### currentCash

public CurrencyAmount currentCash​(ResolvedTermDepositTrade trade,
RatesProvider provider)
Calculates the current cash.
Parameters:
trade - the trade
provider - the rates provider
Returns:
the current cash