Class DiscountingBondFutureProductPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.bond.DiscountingBondFutureProductPricer
-
public final class DiscountingBondFutureProductPricer extends 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 ofFixedCouponBond
. 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 Instance Methods Concrete 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.
-
-
-
Field Detail
-
DEFAULT
public static final DiscountingBondFutureProductPricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
DiscountingBondFutureProductPricer
public DiscountingBondFutureProductPricer(DiscountingFixedCouponBondProductPricer bondPricer)
Creates an instance.- Parameters:
bondPricer
- the pricer forResolvedFixedCouponBond
.
-
-
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 futurediscountingProvider
- the discounting provider- Returns:
- the price of the product, in decimal form
-
priceWithZSpread
public double priceWithZSpread(ResolvedBondFuture future, LegalEntityDiscountingProvider discountingProvider, double zSpread, 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 futurediscountingProvider
- the discounting providerzSpread
- the z-spreadcompoundedRateType
- the compounded rate typeperiodPerYear
- 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 futurediscountingProvider
- the discounting provider- Returns:
- the price curve sensitivity of the product
-
priceSensitivityWithZSpread
public PointSensitivities priceSensitivityWithZSpread(ResolvedBondFuture future, LegalEntityDiscountingProvider discountingProvider, double zSpread, 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 futurediscountingProvider
- the discounting providerzSpread
- the z-spreadcompoundedRateType
- the compounded rate typeperiodPerYear
- the number of periods per year- Returns:
- the price curve sensitivity of the product
-
-