public class DiscountingFixedCouponBondTradePricer extends Object
This function provides the ability to price a ResolvedFixedCouponBondTrade.
| Modifier and Type | Field and Description |
|---|---|
static DiscountingFixedCouponBondTradePricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingFixedCouponBondTradePricer(DiscountingFixedCouponBondProductPricer productPricer,
DiscountingPaymentPricer paymentPricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
MultiCurrencyAmount |
currencyExposure(ResolvedFixedCouponBondTrade trade,
LegalEntityDiscountingProvider provider)
Calculates the currency exposure of the fixed coupon bond trade.
|
MultiCurrencyAmount |
currencyExposureWithZSpread(ResolvedFixedCouponBondTrade trade,
LegalEntityDiscountingProvider provider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the currency exposure of the fixed coupon bond trade with z-spread.
|
CurrencyAmount |
currentCash(ResolvedFixedCouponBondTrade trade,
LocalDate valuationDate)
Calculates the current cash of the fixed coupon bond trade.
|
DiscountingFixedCouponBondProductPricer |
getProductPricer()
Gets the fixed coupon bond product pricer.
|
CurrencyAmount |
presentValue(ResolvedFixedCouponBondTrade trade,
LegalEntityDiscountingProvider provider)
Calculates the present value of the fixed coupon bond trade.
|
CurrencyAmount |
presentValueFromCleanPrice(ResolvedFixedCouponBondTrade trade,
LegalEntityDiscountingProvider provider,
ReferenceData refData,
double cleanPrice)
Calculates the present value of the fixed coupon bond trade from the clean price of the underlying product.
|
CurrencyAmount |
presentValueFromCleanPriceWithZSpread(ResolvedFixedCouponBondTrade trade,
LegalEntityDiscountingProvider provider,
ReferenceData refData,
double cleanPrice,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value of the fixed coupon bond trade with z-spread from the
clean price of the underlying product.
|
PointSensitivities |
presentValueSensitivity(ResolvedFixedCouponBondTrade trade,
LegalEntityDiscountingProvider provider)
Calculates the present value sensitivity of the fixed coupon bond trade.
|
PointSensitivities |
presentValueSensitivityWithZSpread(ResolvedFixedCouponBondTrade trade,
LegalEntityDiscountingProvider provider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value sensitivity of the fixed coupon bond trade with z-spread.
|
CurrencyAmount |
presentValueWithZSpread(ResolvedFixedCouponBondTrade trade,
LegalEntityDiscountingProvider provider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value of the fixed coupon bond trade with z-spread.
|
LocalDate |
settlementDate(ResolvedFixedCouponBondTrade trade,
LocalDate valuationDate)
Calculates the settlement date.
|
Payment |
upfrontPayment(ResolvedFixedCouponBondTrade trade)
Calculates the payment that was made for the trade.
|
public static final DiscountingFixedCouponBondTradePricer DEFAULT
public DiscountingFixedCouponBondTradePricer(DiscountingFixedCouponBondProductPricer productPricer, DiscountingPaymentPricer paymentPricer)
productPricer - the pricer for ResolvedFixedCouponBondpaymentPricer - the pricer for Paymentpublic DiscountingFixedCouponBondProductPricer getProductPricer()
public CurrencyAmount presentValue(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider provider)
The present value of the trade is the value on the valuation date. The result is expressed using the payment currency of the bond.
Coupon payments of the underlying product are considered based on the settlement date of the trade.
trade - the tradeprovider - the discounting providerpublic CurrencyAmount presentValueWithZSpread(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
The present value of the trade is the value on the valuation date. The result is expressed using the payment currency of the bond.
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the discounting curve.
Coupon payments of the underlying product are considered based on the settlement date of the trade.
trade - the tradeprovider - the discounting providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic CurrencyAmount presentValueFromCleanPrice(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider provider, ReferenceData refData, double cleanPrice)
The present value of the trade is the value on the valuation date. The result is expressed using the payment currency of the bond.
Coupon payments of the underlying product are considered based on the settlement date of the trade.
trade - the tradeprovider - the discounting providerrefData - the reference data used to calculate the settlement datecleanPrice - the clean pricepublic CurrencyAmount presentValueFromCleanPriceWithZSpread(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider provider, ReferenceData refData, double cleanPrice, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
The present value of the trade is the value on the valuation date. The result is expressed using the payment currency of the bond.
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the discounting curve.
Coupon payments of the underlying product are considered based on the settlement date of the trade.
trade - the tradeprovider - the discounting providerrefData - the reference data used to calculate the settlement datecleanPrice - the clean pricezSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic PointSensitivities presentValueSensitivity(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider provider)
The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.
Coupon payments of the underlying product are considered based on the settlement date of the trade.
trade - the tradeprovider - the discounting providerpublic PointSensitivities presentValueSensitivityWithZSpread(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the discounting curve.
Coupon payments of the underlying product are considered based on the settlement date of the trade.
trade - the tradeprovider - the discounting providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic MultiCurrencyAmount currencyExposure(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider provider)
trade - the tradeprovider - the discounting providerpublic MultiCurrencyAmount currencyExposureWithZSpread(ResolvedFixedCouponBondTrade 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(ResolvedFixedCouponBondTrade trade, LocalDate valuationDate)
trade - the tradevaluationDate - the valuation datepublic Payment upfrontPayment(ResolvedFixedCouponBondTrade trade)
This is the payment that was made on the settlement date, based on the quantity and clean price.
trade - the tradepublic LocalDate settlementDate(ResolvedFixedCouponBondTrade 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.