Class BlackFixedCouponBondOptionPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.bond.BlackFixedCouponBondOptionPricer
-
public class BlackFixedCouponBondOptionPricer extends Object
Pricer for fixed coupon bond options based on Black formula for the (dirty) bond price.The volatilities are stored in a (normalized) BondYieldVolatilities. They are stored as bond yield equivalent volatilities and are converted to bond price volatilities through the formula "price volatility = duration * yield volatility".
-
-
Field Summary
Fields Modifier and Type Field Description static BlackFixedCouponBondOptionPricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description BlackFixedCouponBondOptionPricer(DiscountingFixedCouponBondProductPricer bondPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DiscountingFixedCouponBondProductPricer
getBondPricer()
Gets the bond pricer.CurrencyAmount
presentValue(ResolvedFixedCouponBondOption bondOption, LegalEntityDiscountingProvider legalEntityProvider, BondYieldVolatilities volatilities)
Calculates the present value of the bond option.BondYieldSensitivity
presentValueSensitivityModelParamsVolatility(ResolvedFixedCouponBondOption bondOption, LegalEntityDiscountingProvider legalEntityProvider, BondYieldVolatilities volatilities)
Returns the present value sensitivity to the underlying yield volatilities.PointSensitivities
presentValueSensitivityRatesStickyStrike(ResolvedFixedCouponBondOption bondOption, LegalEntityDiscountingProvider legalEntityProvider, BondYieldVolatilities volatilities)
Returns the present value sensitivity to the underlying curves.
-
-
-
Field Detail
-
DEFAULT
public static final BlackFixedCouponBondOptionPricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
BlackFixedCouponBondOptionPricer
public BlackFixedCouponBondOptionPricer(DiscountingFixedCouponBondProductPricer bondPricer)
Creates an instance.- Parameters:
bondPricer
- the pricer for the underlyingResolvedFixedCouponBond
.
-
-
Method Detail
-
getBondPricer
protected DiscountingFixedCouponBondProductPricer getBondPricer()
Gets the bond pricer.- Returns:
- the bond pricer
-
presentValue
public CurrencyAmount presentValue(ResolvedFixedCouponBondOption bondOption, LegalEntityDiscountingProvider legalEntityProvider, BondYieldVolatilities volatilities)
Calculates the present value of the bond option.The volatilities are stored as yield volatilities. They are converted to bond volatilities using the approximated formula "price volatility = duration * yield volatility".
- Parameters:
bondOption
- the bond optionlegalEntityProvider
- the provider to value the bondvolatilities
- the volatilities- Returns:
- the present value
-
presentValueSensitivityRatesStickyStrike
public PointSensitivities presentValueSensitivityRatesStickyStrike(ResolvedFixedCouponBondOption bondOption, LegalEntityDiscountingProvider legalEntityProvider, BondYieldVolatilities volatilities)
Returns the present value sensitivity to the underlying curves.The sensitivity is computed with "sticky strike" volatility, i.e. the volatility used in the Black formula is not impacted by the curve-implied change in moneyness.
The volatilities are stored as yield volatilities. They are converted to bond volatilities using the approximated formula "price volatility = duration * yield volatility".
- Parameters:
bondOption
- the bond optionlegalEntityProvider
- the provider to value the bondvolatilities
- the volatilities- Returns:
- the present value sensitivity to rates
-
presentValueSensitivityModelParamsVolatility
public BondYieldSensitivity presentValueSensitivityModelParamsVolatility(ResolvedFixedCouponBondOption bondOption, LegalEntityDiscountingProvider legalEntityProvider, BondYieldVolatilities volatilities)
Returns the present value sensitivity to the underlying yield volatilities.The sensitivity is to the underlying yield volatilities, before they are transformed to bond price volatilities as described below.
The volatilities are stored as yield volatilities. They are converted to bond volatilities using the approximated formula "price volatility = duration * yield volatility".
- Parameters:
bondOption
- the bond optionlegalEntityProvider
- the provider to value the bondvolatilities
- the volatilities- Returns:
- the present value sensitivity to the yield volatility parameters
-
-