Class DiscountingBillTradePricer
 java.lang.Object

 com.opengamma.strata.pricer.bond.DiscountingBillTradePricer

public class DiscountingBillTradePricer extends java.lang.Object
Pricer for bill trades.This function provides the ability to price a
ResolvedBillTrade
.


Field Summary
Fields Modifier and Type Field Description static DiscountingBillTradePricer
DEFAULT
Default implementation.

Constructor Summary
Constructors Constructor Description DiscountingBillTradePricer(DiscountingBillProductPricer productPricer, DiscountingPaymentPricer paymentPricer)
Creates an instance.

Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 zspread.CurrencyAmount
currentCash(ResolvedBillTrade trade, java.time.LocalDate valuationDate)
Calculates the current cash of a bill trade.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 zspread.CurrencyAmount
presentValueWithZSpread(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the present value of a bill trade with zspread.



Field Detail

DEFAULT
public static final DiscountingBillTradePricer DEFAULT
Default implementation.


Constructor Detail

DiscountingBillTradePricer
public DiscountingBillTradePricer(DiscountingBillProductPricer productPricer, DiscountingPaymentPricer paymentPricer)
Creates an instance. Parameters:
productPricer
 the pricer forResolvedBill
paymentPricer
 the pricer forPayment


Method Detail

presentValue
public CurrencyAmount presentValue(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider)
Calculates the present value of a bill trade.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.
 Parameters:
trade
 the tradeprovider
 the discounting provider Returns:
 the present value

presentValueWithZSpread
public CurrencyAmount presentValueWithZSpread(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the present value of a bill trade with zspread.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 zspread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve. The zspread is applied only on the legal entity curve, not on the repo curve used for the settlement amount.
 Parameters:
trade
 the tradeprovider
 the discounting providerzSpread
 the zspreadcompoundedRateType
 the compounded rate typeperiodsPerYear
 the number of periods per year Returns:
 the present value

presentValueSensitivity
public PointSensitivities presentValueSensitivity(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider)
Calculates the present value sensitivity of a bill trade.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.
 Parameters:
trade
 the tradeprovider
 the discounting provider Returns:
 the present value sensitivity

presentValueSensitivityWithZSpread
public PointSensitivities presentValueSensitivityWithZSpread(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the present value sensitivity of a bill trade with zspread.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 zspread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve. The zspread is applied only on the legal entity curve, not on the repo curve used for the settlement amount.
 Parameters:
trade
 the tradeprovider
 the discounting providerzSpread
 the zspreadcompoundedRateType
 the compounded rate typeperiodsPerYear
 the number of periods per year Returns:
 the present value sensitivity

currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider)
Calculates the currency exposure of a bill trade. Parameters:
trade
 the tradeprovider
 the discounting provider Returns:
 the currency exposure

currencyExposureWithZSpread
public MultiCurrencyAmount currencyExposureWithZSpread(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the currency exposure of a bill trade with zspread. Parameters:
trade
 the tradeprovider
 the discounting providerzSpread
 the zspreadcompoundedRateType
 the compounded rate typeperiodsPerYear
 the number of periods per year Returns:
 the currency exposure

currentCash
public CurrencyAmount currentCash(ResolvedBillTrade trade, java.time.LocalDate valuationDate)
Calculates the current cash of a bill trade. Parameters:
trade
 the tradevaluationDate
 the valuation date Returns:
 the current cash amount

