Class DiscountingTermDepositProductPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.deposit.DiscountingTermDepositProductPricer
-
public class DiscountingTermDepositProductPricer 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 DiscountingTermDepositProductPricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description DiscountingTermDepositProductPricer()
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
parRate(ResolvedTermDeposit deposit, RatesProvider provider)
Calculates the deposit fair rate given the start and end time and the accrual factor.PointSensitivities
parRateSensitivity(ResolvedTermDeposit deposit, RatesProvider provider)
Calculates the par rate curve sensitivity.double
parSpread(ResolvedTermDeposit deposit, RatesProvider provider)
Calculates the spread to be added to the deposit rate to have a zero present value.PointSensitivities
parSpreadSensitivity(ResolvedTermDeposit deposit, RatesProvider provider)
Calculates the par spread curve sensitivity.CurrencyAmount
presentValue(ResolvedTermDeposit deposit, RatesProvider provider)
Calculates the present value by discounting the final cash flow (nominal + interest) and the initial payment (initial amount).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).
-
-
-
Field Detail
-
DEFAULT
public static final DiscountingTermDepositProductPricer DEFAULT
Default implementation.
-
-
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 productprovider
- 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 productprovider
- 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 productprovider
- 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 productprovider
- 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 productprovider
- 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 productprovider
- the rates provider- Returns:
- the par spread curve sensitivity
-
-