Class BlackBondFutureOptionMarginedTradePricer
- java.lang.Object
-
- com.opengamma.strata.pricer.bond.BlackBondFutureOptionMarginedTradePricer
-
public final class BlackBondFutureOptionMarginedTradePricer extends Object
Pricer implementation for bond future option.The bond future option is priced based on Black model.
Price
Strata uses decimal prices for bond futures options in the trade model, pricers and market data. This is coherent with the pricing ofBondFuture
.
-
-
Field Summary
Fields Modifier and Type Field Description static BlackBondFutureOptionMarginedTradePricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description BlackBondFutureOptionMarginedTradePricer(BlackBondFutureOptionMarginedProductPricer productPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiCurrencyAmount
currencyExposure(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities, double lastOptionSettlementPrice)
Calculates the currency exposure of the bond future option trade.MultiCurrencyAmount
currencyExposure(ResolvedBondFutureOptionTrade trade, LocalDate valuationDate, double currentOptionPrice, double lastOptionSettlementPrice)
Calculates the currency exposure of the bond future option trade from the current option price.CurrencyAmount
presentValue(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BlackBondFutureVolatilities volatilities, double futurePrice, double lastOptionSettlementPrice)
Calculates the present value of the bond future option trade from the underlying future price.CurrencyAmount
presentValue(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities, double lastOptionSettlementPrice)
Calculates the present value of the bond future option trade.CurrencyAmount
presentValue(ResolvedBondFutureOptionTrade trade, LocalDate valuationDate, double currentOptionPrice, double lastOptionSettlementPrice)
Calculates the present value of the bond future option trade from the current option price.BondFutureOptionSensitivity
presentValueSensitivityModelParamsVolatility(ResolvedBondFutureOptionTrade futureOptionTrade, LegalEntityDiscountingProvider discountingProvider, BlackBondFutureVolatilities volatilities)
Computes the present value sensitivity to the Black volatility used in the pricing.BondFutureOptionSensitivity
presentValueSensitivityModelParamsVolatility(ResolvedBondFutureOptionTrade futureOptionTrade, LegalEntityDiscountingProvider discountingProvider, BlackBondFutureVolatilities volatilities, double futurePrice)
Computes the present value sensitivity to the Black volatility used in the pricing based on the price of the underlying future.PointSensitivities
presentValueSensitivityRates(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities)
Calculates the present value sensitivity of the bond future option trade.double
price(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities)
Calculates the price of the bond future option trade.
-
-
-
Field Detail
-
DEFAULT
public static final BlackBondFutureOptionMarginedTradePricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
BlackBondFutureOptionMarginedTradePricer
public BlackBondFutureOptionMarginedTradePricer(BlackBondFutureOptionMarginedProductPricer productPricer)
Creates an instance.- Parameters:
productPricer
- the pricer forResolvedBondFutureOption
-
-
Method Detail
-
price
public double price(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities)
Calculates the price of the bond future option trade.The price of the trade is the price on the valuation date.
- Parameters:
trade
- the tradediscountingProvider
- the discounting providervolatilities
- the volatilities- Returns:
- the price of the product, in decimal form
-
presentValue
public CurrencyAmount presentValue(ResolvedBondFutureOptionTrade trade, LocalDate valuationDate, double currentOptionPrice, double lastOptionSettlementPrice)
Calculates the present value of the bond future option trade from the current option price.The present value of the product is the value on the valuation date. The current price is specified, not calculated.
This method calculates based on the difference between the specified current price and the last settlement price, or the trade price if traded on the valuation date.
- Parameters:
trade
- the tradevaluationDate
- the valuation date; required to asses if the trade or last closing price should be usedcurrentOptionPrice
- the option price on the valuation datelastOptionSettlementPrice
- the last settlement price used for margining for the option, in decimal form- Returns:
- the present value
-
presentValue
public CurrencyAmount presentValue(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities, double lastOptionSettlementPrice)
Calculates the present value of the bond future option trade.The present value of the product is the value on the valuation date. The current price is calculated using the volatility model.
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 tradediscountingProvider
- the discounting providervolatilities
- the volatilitieslastOptionSettlementPrice
- the last settlement price used for margining for the option, in decimal form- Returns:
- the present value
-
presentValue
public CurrencyAmount presentValue(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BlackBondFutureVolatilities volatilities, double futurePrice, double lastOptionSettlementPrice)
Calculates the present value of the bond future option trade from the underlying future price.The present value of the product is the value on the valuation date. The current price is calculated using the volatility model with a known future price.
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 tradediscountingProvider
- the discounting providervolatilities
- the volatilitiesfuturePrice
- the price of the underlying futurelastOptionSettlementPrice
- the last settlement price used for margining for the option, in decimal form- Returns:
- the present value
-
presentValueSensitivityRates
public PointSensitivities presentValueSensitivityRates(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities)
Calculates the present value sensitivity of the bond future option trade.The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.
- Parameters:
trade
- the tradediscountingProvider
- the discounting providervolatilities
- the volatilities- Returns:
- the present value curve sensitivity of the trade
-
presentValueSensitivityModelParamsVolatility
public BondFutureOptionSensitivity presentValueSensitivityModelParamsVolatility(ResolvedBondFutureOptionTrade futureOptionTrade, LegalEntityDiscountingProvider discountingProvider, BlackBondFutureVolatilities volatilities)
Computes the present value sensitivity to the Black volatility used in the pricing.The result is a single sensitivity to the volatility used. The volatility is associated with the expiry/delay/strike/future price key combination.
This calculates the underlying future price using the future pricer.
- Parameters:
futureOptionTrade
- the tradediscountingProvider
- the discounting providervolatilities
- the volatilities- Returns:
- the price sensitivity
-
presentValueSensitivityModelParamsVolatility
public BondFutureOptionSensitivity presentValueSensitivityModelParamsVolatility(ResolvedBondFutureOptionTrade futureOptionTrade, LegalEntityDiscountingProvider discountingProvider, BlackBondFutureVolatilities volatilities, double futurePrice)
Computes the present value sensitivity to the Black volatility used in the pricing based on the price of the underlying future.The result is a single sensitivity to the volatility used. The volatility is associated with the expiry/delay/strike/future price key combination.
- Parameters:
futureOptionTrade
- the tradediscountingProvider
- the discounting providervolatilities
- the volatilitiesfuturePrice
- the price of the underlying future- Returns:
- the price sensitivity
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities, double lastOptionSettlementPrice)
Calculates the currency exposure of the bond future option 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 tradediscountingProvider
- the discounting providervolatilities
- the volatilitieslastOptionSettlementPrice
- the last settlement price used for margining for the option, in decimal form- Returns:
- the currency exposure of the bond future option trade
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedBondFutureOptionTrade trade, LocalDate valuationDate, double currentOptionPrice, double lastOptionSettlementPrice)
Calculates the currency exposure of the bond future option trade from the current option price.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 tradevaluationDate
- the valuation date; required to asses if the trade or last closing price should be usedcurrentOptionPrice
- the option price on the valuation datelastOptionSettlementPrice
- the last settlement price used for margining for the option, in decimal form- Returns:
- the currency exposure of the bond future option trade
-
-