public class DiscountingCapitalIndexedBondTradePricer extends Object
This function provides the ability to price a ResolvedCapitalIndexedBondTrade.
| Modifier and Type | Field and Description |
|---|---|
static DiscountingCapitalIndexedBondTradePricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingCapitalIndexedBondTradePricer(DiscountingCapitalIndexedBondProductPricer productPricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
MultiCurrencyAmount |
currencyExposure(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider)
Calculates the currency exposure of the bond trade.
|
MultiCurrencyAmount |
currencyExposureFromCleanPrice(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider,
ReferenceData refData,
double cleanRealPrice)
Calculates the currency exposure of the bond trade.
|
MultiCurrencyAmount |
currencyExposureFromCleanPriceWithZSpread(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider,
ReferenceData refData,
double cleanRealPrice,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the currency exposure of the bond trade with z-spread.
|
MultiCurrencyAmount |
currencyExposureWithZSpread(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the currency exposure of the bond trade with z-spread.
|
CurrencyAmount |
currentCash(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider)
Calculates the current cash of the bond trade.
|
DiscountingCapitalIndexedBondProductPricer |
getProductPricer()
Gets the capital indexed bond product pricer.
|
CurrencyAmount |
netAmount(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider)
Calculates the net amount of the settlement of the bond trade.
|
CurrencyAmount |
presentValue(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider)
Calculates the present value of the bond trade.
|
CurrencyAmount |
presentValueFromCleanPrice(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider,
ReferenceData refData,
double cleanRealPrice)
Calculates the present value of the bond trade from the clean price.
|
CurrencyAmount |
presentValueFromCleanPriceWithZSpread(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider,
ReferenceData refData,
double cleanRealPrice,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value of the settlement of the bond trade from the clean price with z-spread.
|
PointSensitivities |
presentValueSensitivity(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider)
Calculates the present value sensitivity of the bond trade.
|
PointSensitivities |
presentValueSensitivityFromCleanPrice(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider,
ReferenceData refData,
double cleanRealPrice)
Calculates the present value sensitivity of the settlement of the bond trade from the real clean price.
|
PointSensitivities |
presentValueSensitivityFromCleanPriceWithZSpread(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider,
ReferenceData refData,
double cleanRealPrice,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value sensitivity of the settlement of the bond trade from the real clean price
with z-spread.
|
PointSensitivities |
presentValueSensitivityWithZSpread(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value sensitivity of the bond trade with z-spread.
|
CurrencyAmount |
presentValueWithZSpread(ResolvedCapitalIndexedBondTrade trade,
RatesProvider ratesProvider,
LegalEntityDiscountingProvider discountingProvider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value of the bond trade with z-spread.
|
LocalDate |
settlementDate(ResolvedCapitalIndexedBondTrade trade,
LocalDate valuationDate)
Calculates the settlement date.
|
public static final DiscountingCapitalIndexedBondTradePricer DEFAULT
public DiscountingCapitalIndexedBondTradePricer(DiscountingCapitalIndexedBondProductPricer productPricer)
productPricer - pricer for ResolvedCapitalIndexedBondpublic DiscountingCapitalIndexedBondProductPricer getProductPricer()
public CurrencyAmount presentValue(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider)
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 traderatesProvider - the rates provider, used to determine price index valuesdiscountingProvider - the discount factors providerpublic CurrencyAmount presentValueWithZSpread(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, 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 traderatesProvider - the rates provider, used to determine price index valuesdiscountingProvider - the discount factors providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic PointSensitivities presentValueSensitivity(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider)
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 traderatesProvider - the rates provider, used to determine price index valuesdiscountingProvider - the discount factors providerpublic PointSensitivities presentValueSensitivityWithZSpread(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
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 traderatesProvider - the rates provider, used to determine price index valuesdiscountingProvider - the discount factors providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic CurrencyAmount presentValueFromCleanPrice(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, ReferenceData refData, double cleanRealPrice)
Since the sign of the settlement notional is opposite to that of the product, negative amount will be returned for positive quantity of trade.
trade - the traderatesProvider - the rates provider, used to determine price index valuesrefData - the reference data used to calculate the settlement datediscountingProvider - the discount factors providercleanRealPrice - the clean real pricepublic CurrencyAmount presentValueFromCleanPriceWithZSpread(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, ReferenceData refData, double cleanRealPrice, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Since the sign of the settlement notional is opposite to that of the product, negative amount will be returned for positive quantity of trade.
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the discounting curve.
trade - the traderatesProvider - the rates provider, used to determine price index valuesdiscountingProvider - the discount factors providerrefData - the reference data used to calculate the settlement datezSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearcleanRealPrice - the clean real pricepublic PointSensitivities presentValueSensitivityFromCleanPrice(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, ReferenceData refData, double cleanRealPrice)
The present value sensitivity of the settlement is the sensitivity of the present value to the underlying curves.
trade - the traderatesProvider - the rates provider, used to determine price index valuesrefData - the reference data used to calculate the settlement datediscountingProvider - the discount factors providercleanRealPrice - the clean real pricepublic PointSensitivities presentValueSensitivityFromCleanPriceWithZSpread(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, ReferenceData refData, double cleanRealPrice, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
The present value sensitivity of the settlement is the sensitivity of the present value to the underlying curves.
trade - the traderatesProvider - the rates provider, used to determine price index valuesrefData - the reference data used to calculate the settlement datediscountingProvider - the discount factors providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearcleanRealPrice - the clean real pricepublic MultiCurrencyAmount currencyExposureFromCleanPrice(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, ReferenceData refData, double cleanRealPrice)
trade - the traderatesProvider - the rates provider, used to determine price index valuesdiscountingProvider - the discount factors providerrefData - the reference data used to calculate the settlement datecleanRealPrice - the clean real pricepublic MultiCurrencyAmount currencyExposure(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider)
trade - the traderatesProvider - the rates provider, used to determine price index valuesdiscountingProvider - the discount factors providerpublic MultiCurrencyAmount currencyExposureFromCleanPriceWithZSpread(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, ReferenceData refData, double cleanRealPrice, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
trade - the traderatesProvider - the rates provider, used to determine price index valuesdiscountingProvider - the discount factors providerrefData - the reference data used to calculate the settlement datezSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearcleanRealPrice - the clean real pricepublic MultiCurrencyAmount currencyExposureWithZSpread(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
trade - the traderatesProvider - the rates provider, used to determine price index valuesdiscountingProvider - the discount factors providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic CurrencyAmount currentCash(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider)
trade - the traderatesProvider - the rates provider, used to determine price index valuespublic CurrencyAmount netAmount(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider)
Since the sign of the settlement notional is opposite to that of the product, negative amount will be returned for positive quantity of trade.
trade - the traderatesProvider - the rates provider, used to determine price index valuespublic LocalDate settlementDate(ResolvedCapitalIndexedBondTrade 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.