public class NormalOvernightFutureOptionMarginedTradePricer extends Object
This provides the ability to price an Overnight future option. The option must be based on daily margin.
Strata uses decimal prices for Overnight future options in the trade model, pricers and market data. The decimal price is based on the decimal rate equivalent to the percentage. For example, an option price of 0.2 is related to a futures price of 99.32 that implies an interest rate of 0.68%. Strata represents the price of the future as 0.9932 and thus represents the price of the option as 0.002.
| Modifier and Type | Field and Description |
|---|---|
static NormalOvernightFutureOptionMarginedTradePricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
NormalOvernightFutureOptionMarginedTradePricer(NormalOvernightFutureOptionMarginedProductPricer futureOptionPricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
CurrencyAmount |
presentValue(ResolvedOvernightFutureOptionTrade trade,
LocalDate valuationDate,
double currentOptionPrice,
double lastOptionSettlementPrice)
Calculates the present value of the Overnight future option trade from the current option price.
|
CurrencyAmount |
presentValue(ResolvedOvernightFutureOptionTrade trade,
RatesProvider ratesProvider,
NormalOvernightFutureOptionVolatilities volatilities,
double lastOptionSettlementPrice)
Calculates the present value of the Overnight future option trade.
|
CurrencyAmount |
presentValue(ResolvedOvernightFutureOptionTrade trade,
RatesProvider ratesProvider,
NormalOvernightFutureOptionVolatilities volatilities,
double futurePrice,
double lastOptionSettlementPrice)
Calculates the present value of the Overnight future option trade from the underlying future price.
|
OvernightFutureOptionSensitivity |
presentValueSensitivityModelParamsVolatility(ResolvedOvernightFutureOptionTrade futureOptionTrade,
NormalOvernightFutureOptionVolatilities volatilities,
double futurePrice)
Computes the present value sensitivity to the normal volatility used in the pricing
based on the price of the underlying future.
|
OvernightFutureOptionSensitivity |
presentValueSensitivityModelParamsVolatility(ResolvedOvernightFutureOptionTrade futureOptionTrade,
RatesProvider ratesProvider,
NormalOvernightFutureOptionVolatilities volatilities)
Computes the present value sensitivity to the normal volatility used in the pricing.
|
PointSensitivities |
presentValueSensitivityRates(ResolvedOvernightFutureOptionTrade trade,
RatesProvider ratesProvider,
NormalOvernightFutureOptionVolatilities volatilities)
Calculates the present value sensitivity of the Overnight future option trade.
|
double |
price(ResolvedOvernightFutureOptionTrade trade,
RatesProvider ratesProvider,
NormalOvernightFutureOptionVolatilities volatilities)
Calculates the price of the Overnight future option trade.
|
public static final NormalOvernightFutureOptionMarginedTradePricer DEFAULT
public NormalOvernightFutureOptionMarginedTradePricer(NormalOvernightFutureOptionMarginedProductPricer futureOptionPricer)
futureOptionPricer - the pricer for OvernightFutureOptionpublic double price(ResolvedOvernightFutureOptionTrade trade, RatesProvider ratesProvider, NormalOvernightFutureOptionVolatilities volatilities)
The price of the trade is the price on the valuation date. The price is calculated using the volatility model.
trade - the traderatesProvider - the rates providervolatilities - the volatilitiespublic CurrencyAmount presentValue(ResolvedOvernightFutureOptionTrade trade, LocalDate valuationDate, double currentOptionPrice, double lastOptionSettlementPrice)
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.
trade - the tradevaluationDate - the valuation date; required to asses if the trade or last closing price should be usedcurrentOptionPrice - the current price for the option, in decimal formlastOptionSettlementPrice - the last settlement price used for margining for the option, in decimal formpublic CurrencyAmount presentValue(ResolvedOvernightFutureOptionTrade trade, RatesProvider ratesProvider, NormalOvernightFutureOptionVolatilities volatilities, double lastOptionSettlementPrice)
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.
trade - the traderatesProvider - the rates providervolatilities - the volatilitieslastOptionSettlementPrice - the last settlement price used for margining for the option, in decimal formpublic CurrencyAmount presentValue(ResolvedOvernightFutureOptionTrade trade, RatesProvider ratesProvider, NormalOvernightFutureOptionVolatilities volatilities, double futurePrice, double lastOptionSettlementPrice)
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.
trade - the traderatesProvider - the rates providervolatilities - the volatilitiesfuturePrice - the price of the underlying future, in decimal formlastOptionSettlementPrice - the last settlement price used for margining for the option, in decimal formpublic PointSensitivities presentValueSensitivityRates(ResolvedOvernightFutureOptionTrade trade, RatesProvider ratesProvider, NormalOvernightFutureOptionVolatilities volatilities)
The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.
trade - the traderatesProvider - the rates providervolatilities - the volatilitiespublic OvernightFutureOptionSensitivity presentValueSensitivityModelParamsVolatility(ResolvedOvernightFutureOptionTrade futureOptionTrade, RatesProvider ratesProvider, NormalOvernightFutureOptionVolatilities volatilities)
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.
futureOptionTrade - the traderatesProvider - the rates providervolatilities - the volatilitiespublic OvernightFutureOptionSensitivity presentValueSensitivityModelParamsVolatility(ResolvedOvernightFutureOptionTrade futureOptionTrade, NormalOvernightFutureOptionVolatilities volatilities, double futurePrice)
The result is a single sensitivity to the volatility used. The volatility is associated with the expiry/delay/strike/future price key combination.
futureOptionTrade - the tradevolatilities - the volatilitiesfuturePrice - the price of the underlying future, in decimal formCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.