public class DiscountingBillTradePricer extends Object
This function provides the ability to price a ResolvedBillTrade.
| Modifier and Type | Field and Description |
|---|---|
static DiscountingBillTradePricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingBillTradePricer(DiscountingBillProductPricer productPricer,
DiscountingPaymentPricer paymentPricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
MultiCurrencyAmount |
currencyExposure(ResolvedBillTrade trade,
LegalEntityDiscountingProvider provider)
Calculates the currency exposure of a bill trade.
|
MultiCurrencyAmount |
currencyExposureWithZSpread(ResolvedBillTrade trade,
LegalEntityDiscountingProvider provider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the currency exposure of a bill trade with z-spread.
|
CurrencyAmount |
currentCash(ResolvedBillTrade trade,
LocalDate valuationDate)
Calculates the current cash of a bill trade.
|
DiscountingBillProductPricer |
getProductPricer()
Gets the bill product pricer.
|
CurrencyAmount |
presentValue(ResolvedBillTrade trade,
LegalEntityDiscountingProvider provider)
Calculates the present value of a bill trade.
|
PointSensitivities |
presentValueSensitivity(ResolvedBillTrade trade,
LegalEntityDiscountingProvider provider)
Calculates the present value sensitivity of a bill trade.
|
PointSensitivities |
presentValueSensitivityWithZSpread(ResolvedBillTrade trade,
LegalEntityDiscountingProvider provider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value sensitivity of a bill trade with z-spread.
|
CurrencyAmount |
presentValueWithZSpread(ResolvedBillTrade trade,
LegalEntityDiscountingProvider provider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value of a bill trade with z-spread.
|
LocalDate |
settlementDate(ResolvedBillTrade trade,
LocalDate valuationDate)
Calculates the settlement date.
|
public static final DiscountingBillTradePricer DEFAULT
public DiscountingBillTradePricer(DiscountingBillProductPricer productPricer, DiscountingPaymentPricer paymentPricer)
productPricer - the pricer for ResolvedBillpaymentPricer - the pricer for Paymentpublic DiscountingBillProductPricer getProductPricer()
public CurrencyAmount presentValue(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider)
If the settlement details are provided, the present value is the sum of the underlying product's present value multiplied by the quantity and the present value of the settlement payment if still due at the valuation date. If not it is the underlying product's present value multiplied by the quantity.
trade - the tradeprovider - the discounting providerpublic CurrencyAmount presentValueWithZSpread(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
If the settlement details are provided, the present value is the sum of the underlying product's present value multiplied by the quantity and the present value of the settlement payment if still due at the valuation date. If not it is the underlying product's present value multiplied by the quantity.
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve. The z-spread is applied only on the legal entity curve, not on the repo curve used for the settlement amount.
trade - the tradeprovider - the discounting providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic PointSensitivities presentValueSensitivity(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider)
If the settlement details are provided, the sensitivity is the sum of the underlying product's sensitivity multiplied by the quantity and the sensitivity of the settlement payment if still due at the valuation date. If not it is the underlying product's sensitivity multiplied by the quantity.
trade - the tradeprovider - the discounting providerpublic PointSensitivities presentValueSensitivityWithZSpread(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
If the settlement details are provided, the sensitivity is the sum of the underlying product's sensitivity multiplied by the quantity and the sensitivity of the settlement payment if still due at the valuation date. If not it is the underlying product's sensitivity multiplied by the quantity.
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve. The z-spread is applied only on the legal entity curve, not on the repo curve used for the settlement amount.
trade - the tradeprovider - the discounting providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic MultiCurrencyAmount currencyExposure(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider)
trade - the tradeprovider - the discounting providerpublic MultiCurrencyAmount currencyExposureWithZSpread(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
trade - the tradeprovider - the discounting providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic CurrencyAmount currentCash(ResolvedBillTrade trade, LocalDate valuationDate)
trade - the tradevaluationDate - the valuation datepublic LocalDate settlementDate(ResolvedBillTrade trade, LocalDate valuationDate)
The valuation date is returned if the settlement details are not stored.
trade - the tradevaluationDate - the valuation dateCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.