public final class DiscountingBondFutureTradePricer extends Object
This function provides the ability to price a BondFutureTrade.
FixedCouponBond. The bond futures delivery is a bond
for an amount computed from the bond future price, a conversion factor and the accrued interest.| Modifier and Type | Field and Description |
|---|---|
static DiscountingBondFutureTradePricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingBondFutureTradePricer(DiscountingBondFutureProductPricer productPricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
MultiCurrencyAmount |
currencyExposure(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double lastSettlementPrice)
Calculates the currency exposure of the bond future trade.
|
MultiCurrencyAmount |
currencyExposureWithZSpread(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double lastSettlementPrice,
double zSpread,
CompoundedRateType compoundedRateType,
int periodPerYear)
Calculates the currency exposure of the bond future trade with z-spread.
|
double |
parSpread(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double lastSettlementPrice)
Calculates the par spread of the bond future trade.
|
PointSensitivities |
parSpreadSensitivity(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider)
Calculates the par spread sensitivity of the bond future trade.
|
PointSensitivities |
parSpreadSensitivityWithZSpread(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodPerYear)
Calculates the par spread sensitivity of the bond future trade with z-spread.
|
double |
parSpreadWithZSpread(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double lastSettlementPrice,
double zSpread,
CompoundedRateType compoundedRateType,
int periodPerYear)
Calculates the par spread of the bond future trade with z-spread.
|
CurrencyAmount |
presentValue(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double lastSettlementPrice)
Calculates the present value of the bond future trade.
|
PointSensitivities |
presentValueSensitivity(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider)
Calculates the present value sensitivity of the bond future trade.
|
PointSensitivities |
presentValueSensitivityWithZSpread(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodPerYear)
Calculates the present value sensitivity of the bond future trade with z-spread.
|
CurrencyAmount |
presentValueWithZSpread(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double lastSettlementPrice,
double zSpread,
CompoundedRateType compoundedRateType,
int periodPerYear)
Calculates the present value of the bond future trade with z-spread.
|
double |
price(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider)
Calculates the price of the bond future trade.
|
double |
priceWithZSpread(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodPerYear)
Calculates the price of the bond future trade with z-spread.
|
public static final DiscountingBondFutureTradePricer DEFAULT
public DiscountingBondFutureTradePricer(DiscountingBondFutureProductPricer productPricer)
productPricer - the pricer for BondFuturepublic double price(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider)
The price of the trade is the price on the valuation date.
Strata uses decimal prices for bond futures. This is coherent with the pricing of FixedCouponBond.
For example, a price of 99.32% is represented in Strata by 0.9932.
trade - the tradediscountingProvider - the discounting providerpublic double priceWithZSpread(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
The price of the trade is the price on the valuation date.
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve.
trade - the tradediscountingProvider - the discounting providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodPerYear - the number of periods per yearpublic CurrencyAmount presentValue(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double lastSettlementPrice)
The present value of the product is the value on the valuation date.
This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.
trade - the tradediscountingProvider - the discounting providerlastSettlementPrice - the last settlement price used for margining, in decimal formpublic CurrencyAmount presentValueWithZSpread(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double lastSettlementPrice, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
The present value of the product is the value on the valuation date.
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve.
This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.
trade - the tradediscountingProvider - the discounting providerlastSettlementPrice - the last settlement price used for margining, in decimal formzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodPerYear - the number of periods per yearpublic PointSensitivities presentValueSensitivity(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider)
The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.
trade - the tradediscountingProvider - the discounting providerpublic PointSensitivities presentValueSensitivityWithZSpread(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
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 issuer discounting curve.
trade - the tradediscountingProvider - the discounting providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodPerYear - the number of periods per yearpublic double parSpread(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double lastSettlementPrice)
The par spread is defined in the following way. When the reference price (or market quote) is increased by the par spread, the present value of the trade is zero.
This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.
trade - the tradediscountingProvider - the discounting providerlastSettlementPrice - the last settlement price used for margining, in decimal formpublic double parSpreadWithZSpread(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double lastSettlementPrice, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
The par spread is defined in the following way. When the reference price (or market quote) is increased by the par spread, the present value of the trade is zero.
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve.
This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.
trade - the tradediscountingProvider - the discounting providerlastSettlementPrice - the last settlement price used for margining, in decimal formzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodPerYear - the number of periods per yearpublic PointSensitivities parSpreadSensitivity(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider)
The par spread sensitivity of the trade is the sensitivity of the par spread to the underlying curves.
trade - the tradediscountingProvider - the discounting providerpublic PointSensitivities parSpreadSensitivityWithZSpread(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
The par spread sensitivity of the trade is the sensitivity of the par spread to the underlying curves.
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve.
trade - the tradediscountingProvider - the discounting providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodPerYear - the number of periods per yearpublic MultiCurrencyAmount currencyExposure(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double lastSettlementPrice)
This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.
trade - the tradediscountingProvider - the discounting providerlastSettlementPrice - the last settlement price used for margining, in decimal formpublic MultiCurrencyAmount currencyExposureWithZSpread(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double lastSettlementPrice, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve.
This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.
trade - the tradediscountingProvider - the discounting providerlastSettlementPrice - the last settlement price used for margining, in decimal formzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodPerYear - the number of periods per yearCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.