public final class DiscountingBondFutureProductPricer extends Object
This function provides the ability to price a ResolvedBondFuture.
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 DiscountingBondFutureProductPricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingBondFutureProductPricer(DiscountingFixedCouponBondProductPricer bondPricer)
Creates an instance.
|
| Modifier and Type | Method and 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.
|
public static final DiscountingBondFutureProductPricer DEFAULT
public DiscountingBondFutureProductPricer(DiscountingFixedCouponBondProductPricer bondPricer)
bondPricer - the pricer for ResolvedFixedCouponBond.public double price(ResolvedBondFuture future, LegalEntityDiscountingProvider discountingProvider)
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.
future - the futurediscountingProvider - the discounting providerpublic double priceWithZSpread(ResolvedBondFuture future, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
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.
future - the futurediscountingProvider - the discounting providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodPerYear - the number of periods per yearpublic PointSensitivities priceSensitivity(ResolvedBondFuture future, LegalEntityDiscountingProvider discountingProvider)
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.
future - the futurediscountingProvider - the discounting providerpublic PointSensitivities priceSensitivityWithZSpread(ResolvedBondFuture future, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
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.
future - the futurediscountingProvider - the discounting providerzSpread - 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.