## Class DiscountingBondFutureProductPricer

• java.lang.Object
• com.opengamma.strata.pricer.bond.DiscountingBondFutureProductPricer

• public final class DiscountingBondFutureProductPricer
extends java.lang.Object
Pricer for for bond future products.

This function provides the ability to price a ResolvedBondFuture.

#### 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 DiscountingBondFutureProductPricer DEFAULT
Default implementation.
• ### Constructor Summary

Constructors
Constructor Description
DiscountingBondFutureProductPricer​(DiscountingFixedCouponBondProductPricer bondPricer)
Creates an instance.
• ### Method Summary

All Methods
Modifier and Type Method Description
double price​(ResolvedBondFuture future, LegalEntityDiscountingProvider discountingProvider)
Calculates the price of the bond future product.
PointSensitivities priceSensitivity​(ResolvedBondFuture future, LegalEntityDiscountingProvider discountingProvider)
Calculates the price sensitivity of the bond future product.
PointSensitivities priceSensitivityWithZSpread​(ResolvedBondFuture future, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
Calculates the price sensitivity of the bond future product with z-spread.
double priceWithZSpread​(ResolvedBondFuture future, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
Calculates the price of the bond future product with z-spread.
• ### Methods inherited from class java.lang.Object

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

• #### DEFAULT

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

• #### DiscountingBondFutureProductPricer

public DiscountingBondFutureProductPricer​(DiscountingFixedCouponBondProductPricer bondPricer)
Creates an instance.
Parameters:
bondPricer - the pricer for ResolvedFixedCouponBond.
• ### Method Detail

• #### price

public double price​(ResolvedBondFuture future,
LegalEntityDiscountingProvider discountingProvider)
Calculates the price of the bond future product.

The price of the product 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:
future - the future
discountingProvider - the discounting provider
Returns:
the price of the product, in decimal form

public double priceWithZSpread​(ResolvedBondFuture future,
LegalEntityDiscountingProvider discountingProvider,
CompoundedRateType compoundedRateType,
int periodPerYear)
Calculates the price of the bond future product with z-spread.

The price of the product 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.

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:
future - the future
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 product, in decimal form
• #### priceSensitivity

public PointSensitivities priceSensitivity​(ResolvedBondFuture future,
LegalEntityDiscountingProvider discountingProvider)
Calculates the price sensitivity of the bond future product.

The price sensitivity of the product is the sensitivity of the price to the underlying curves.

Note that the price sensitivity should be no currency.

Parameters:
future - the future
discountingProvider - the discounting provider
Returns:
the price curve sensitivity of the product

public PointSensitivities priceSensitivityWithZSpread​(ResolvedBondFuture future,
LegalEntityDiscountingProvider discountingProvider,
CompoundedRateType compoundedRateType,
int periodPerYear)
Calculates the price sensitivity of the bond future product with z-spread.

The price sensitivity of the product is the sensitivity of the price 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.

Note that the price sensitivity should be no currency.

Parameters:
future - the future
discountingProvider - the discounting provider
zSpread - the z-spread
compoundedRateType - the compounded rate type
periodPerYear - the number of periods per year
Returns:
the price curve sensitivity of the product