• java.lang.Object

• public final class DiscountingBondFutureTradePricer
extends java.lang.Object
Pricer implementation for bond future trades.

This function provides the ability to price a BondFutureTrade.

#### Price

Strata uses decimal prices for bond futures in the trade model, pricers and market data. This is coherent with the pricing of FixedCouponBond. The bond futures delivery is a bond for an amount computed from the bond future price, a conversion factor and the accrued interest.
• ### Field Summary

Fields
Modifier and Type Field Description
static DiscountingBondFutureTradePricer DEFAULT
Default implementation.
• ### Constructor Summary

Constructors
Constructor Description
DiscountingBondFutureTradePricer​(DiscountingBondFutureProductPricer productPricer)
Creates an instance.
• ### Method Summary

All Methods
Modifier and Type Method 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)
double parSpread​(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double lastSettlementPrice)
PointSensitivities parSpreadSensitivity​(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider)
PointSensitivities parSpreadSensitivityWithZSpread​(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
double parSpreadWithZSpread​(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double lastSettlementPrice, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
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)
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)
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Field Detail

• #### DEFAULT

public static final DiscountingBondFutureTradePricer DEFAULT
Default implementation.
• ### Constructor Detail

public DiscountingBondFutureTradePricer​(DiscountingBondFutureProductPricer productPricer)
Creates an instance.
Parameters:
productPricer - the pricer for BondFuture
• ### Method Detail

• #### price

public double price​(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider)
Calculates the price of the bond future trade.

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.

Parameters:
trade - the trade
discountingProvider - the discounting provider
Returns:
the price of the trade, in decimal form

public double priceWithZSpread​(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
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.

Parameters:
trade - the trade
discountingProvider - the discounting provider
zSpread - the z-spread
compoundedRateType - the compounded rate type
periodPerYear - the number of periods per year
Returns:
the price of the trade, in decimal form
• #### presentValue

public CurrencyAmount presentValue​(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double lastSettlementPrice)
Calculates the present value of the bond future trade.

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.

Parameters:
trade - the trade
discountingProvider - the discounting provider
lastSettlementPrice - the last settlement price used for margining, in decimal form
Returns:
the present value

public CurrencyAmount presentValueWithZSpread​(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double lastSettlementPrice,
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.

Parameters:
trade - the trade
discountingProvider - the discounting provider
lastSettlementPrice - the last settlement price used for margining, in decimal form
zSpread - the z-spread
compoundedRateType - the compounded rate type
periodPerYear - the number of periods per year
Returns:
the present value
• #### presentValueSensitivity

public PointSensitivities presentValueSensitivity​(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider)
Calculates the present value sensitivity of the bond future trade.

The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.

Parameters:
trade - the trade
discountingProvider - the discounting provider
Returns:
the present value curve sensitivity of the trade

public PointSensitivities presentValueSensitivityWithZSpread​(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
CompoundedRateType compoundedRateType,
int periodPerYear)
Calculates the present value sensitivity of the bond future trade with z-spread.

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.

Parameters:
trade - the trade
discountingProvider - the discounting provider
zSpread - the z-spread
compoundedRateType - the compounded rate type
periodPerYear - the number of periods per year
Returns:
the present value curve sensitivity of the trade

public 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.

Parameters:
trade - the trade
discountingProvider - the discounting provider
lastSettlementPrice - the last settlement price used for margining, in decimal form
Returns:

public double parSpreadWithZSpread​(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double lastSettlementPrice,
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.

Parameters:
trade - the trade
discountingProvider - the discounting provider
lastSettlementPrice - the last settlement price used for margining, in decimal form
zSpread - the z-spread
compoundedRateType - the compounded rate type
periodPerYear - the number of periods per year
Returns:

public PointSensitivities parSpreadSensitivity​(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider)

The par spread sensitivity of the trade is the sensitivity of the par spread to the underlying curves.

Parameters:
trade - the trade
discountingProvider - the discounting provider
Returns:

public PointSensitivities parSpreadSensitivityWithZSpread​(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
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.

Parameters:
trade - the trade
discountingProvider - the discounting provider
zSpread - the z-spread
compoundedRateType - the compounded rate type
periodPerYear - the number of periods per year
Returns:
• #### currencyExposure

public MultiCurrencyAmount currencyExposure​(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double lastSettlementPrice)
Calculates the currency exposure of the bond future trade.

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.

Parameters:
trade - the trade
discountingProvider - the discounting provider
lastSettlementPrice - the last settlement price used for margining, in decimal form
Returns:
the currency exposure of the bond future trade

public MultiCurrencyAmount currencyExposureWithZSpread​(ResolvedBondFutureTrade trade,
LegalEntityDiscountingProvider discountingProvider,
double lastSettlementPrice,
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.

Parameters:
trade - the trade
discountingProvider - the discounting provider
lastSettlementPrice - the last settlement price used for margining, in decimal form
zSpread - the z-spread
compoundedRateType - the compounded rate type
periodPerYear - the number of periods per year
Returns:
the currency exposure of the bond future trade