Class IborFutureOptionTradeCalculations
- java.lang.Object
-
- com.opengamma.strata.measure.index.IborFutureOptionTradeCalculations
-
public class IborFutureOptionTradeCalculations extends Object
Calculates pricing and risk measures for trades in an option contract based on an Ibor index future.This provides a high-level entry point for option pricing and risk measures.
Each method takes a
ResolvedIborFutureOptionTrade
, whereas application code will typically work withIborFutureOptionTrade
. CallIborFutureOptionTrade::resolve(ReferenceData)
to convertIborFutureOptionTrade
toResolvedIborFutureOptionTrade
.Price
The price of an Ibor future option is based on the price of the underlying future, the volatility and the time to expiry. The price of the at-the-money option tends to zero as expiry approaches.Strata uses decimal prices for Ibor 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.
-
-
Field Summary
Fields Modifier and Type Field Description static IborFutureOptionTradeCalculations
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description IborFutureOptionTradeCalculations(NormalIborFutureOptionMarginedTradePricer tradePricer)
Creates an instance.
-
Method Summary
-
-
-
Field Detail
-
DEFAULT
public static final IborFutureOptionTradeCalculations DEFAULT
Default implementation.
-
-
Constructor Detail
-
IborFutureOptionTradeCalculations
public IborFutureOptionTradeCalculations(NormalIborFutureOptionMarginedTradePricer tradePricer)
Creates an instance.In most cases, applications should use the
DEFAULT
instance.- Parameters:
tradePricer
- the pricer forResolvedIborFutureOptionTrade
-
-
Method Detail
-
presentValue
public CurrencyScenarioArray presentValue(ResolvedIborFutureOptionTrade trade, RatesMarketDataLookup ratesLookup, IborFutureOptionMarketDataLookup optionLookup, ScenarioMarketData marketData)
Calculates present value across one or more scenarios.- Parameters:
trade
- the traderatesLookup
- the lookup used to query the rates market dataoptionLookup
- the lookup used to query the option market datamarketData
- the market data- Returns:
- the present value, one entry per scenario
-
presentValue
public CurrencyAmount presentValue(ResolvedIborFutureOptionTrade trade, RatesProvider ratesProvider, IborFutureOptionVolatilities volatilities)
Calculates present value for a single set of market data.- Parameters:
trade
- the traderatesProvider
- the market datavolatilities
- the option volatilities- Returns:
- the present value
-
pv01CalibratedSum
public MultiCurrencyScenarioArray pv01CalibratedSum(ResolvedIborFutureOptionTrade trade, RatesMarketDataLookup ratesLookup, IborFutureOptionMarketDataLookup optionLookup, ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.This is the sensitivity of present value to a one basis point shift in the calibrated curves. The result is the sum of the sensitivities of all affected curves.
- Parameters:
trade
- the traderatesLookup
- the lookup used to query the rates market dataoptionLookup
- the lookup used to query the option market datamarketData
- the market data- Returns:
- the present value sensitivity, one entry per scenario
-
pv01CalibratedSum
public MultiCurrencyAmount pv01CalibratedSum(ResolvedIborFutureOptionTrade trade, RatesProvider ratesProvider, IborFutureOptionVolatilities volatilities)
Calculates present value sensitivity for a single set of market data.This is the sensitivity of present value to a one basis point shift in the calibrated curves. The result is the sum of the sensitivities of all affected curves.
- Parameters:
trade
- the traderatesProvider
- the market datavolatilities
- the option volatilities- Returns:
- the present value sensitivity
-
pv01CalibratedBucketed
public ScenarioArray<CurrencyParameterSensitivities> pv01CalibratedBucketed(ResolvedIborFutureOptionTrade trade, RatesMarketDataLookup ratesLookup, IborFutureOptionMarketDataLookup optionLookup, ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.This is the sensitivity of present value to a one basis point shift in the calibrated curves. The result is provided for each affected curve and currency, bucketed by curve node.
- Parameters:
trade
- the traderatesLookup
- the lookup used to query the rates market dataoptionLookup
- the lookup used to query the option market datamarketData
- the market data- Returns:
- the present value sensitivity, one entry per scenario
-
pv01CalibratedBucketed
public CurrencyParameterSensitivities pv01CalibratedBucketed(ResolvedIborFutureOptionTrade trade, RatesProvider ratesProvider, IborFutureOptionVolatilities volatilities)
Calculates present value sensitivity for a single set of market data.This is the sensitivity of present value to a one basis point shift in the calibrated curves. The result is provided for each affected curve and currency, bucketed by curve node.
- Parameters:
trade
- the traderatesProvider
- the market datavolatilities
- the option volatilities- Returns:
- the present value sensitivity
-
pv01MarketQuoteSum
public MultiCurrencyScenarioArray pv01MarketQuoteSum(ResolvedIborFutureOptionTrade trade, RatesMarketDataLookup ratesLookup, IborFutureOptionMarketDataLookup optionLookup, ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.This is the sensitivity of present value to a one basis point shift in the market quotes used to calibrate the curves. The result is the sum of the sensitivities of all affected curves.
- Parameters:
trade
- the traderatesLookup
- the lookup used to query the rates market dataoptionLookup
- the lookup used to query the option market datamarketData
- the market data- Returns:
- the present value sensitivity, one entry per scenario
-
pv01MarketQuoteSum
public MultiCurrencyAmount pv01MarketQuoteSum(ResolvedIborFutureOptionTrade trade, RatesProvider ratesProvider, IborFutureOptionVolatilities volatilities)
Calculates present value sensitivity for a single set of market data.This is the sensitivity of present value to a one basis point shift in the market quotes used to calibrate the curves. The result is the sum of the sensitivities of all affected curves.
- Parameters:
trade
- the traderatesProvider
- the market datavolatilities
- the option volatilities- Returns:
- the present value sensitivity
-
pv01MarketQuoteBucketed
public ScenarioArray<CurrencyParameterSensitivities> pv01MarketQuoteBucketed(ResolvedIborFutureOptionTrade trade, RatesMarketDataLookup ratesLookup, IborFutureOptionMarketDataLookup optionLookup, ScenarioMarketData marketData)
Calculates present value sensitivity across one or more scenarios.This is the sensitivity of present value to a one basis point shift in the market quotes used to calibrate the curves. The result is provided for each affected curve and currency, bucketed by curve node.
- Parameters:
trade
- the traderatesLookup
- the lookup used to query the rates market dataoptionLookup
- the lookup used to query the option market datamarketData
- the market data- Returns:
- the present value sensitivity, one entry per scenario
-
pv01MarketQuoteBucketed
public CurrencyParameterSensitivities pv01MarketQuoteBucketed(ResolvedIborFutureOptionTrade trade, RatesProvider ratesProvider, IborFutureOptionVolatilities volatilities)
Calculates present value sensitivity for a single set of market data.This is the sensitivity of present value to a one basis point shift in the market quotes used to calibrate the curves. The result is provided for each affected curve and currency, bucketed by curve node.
- Parameters:
trade
- the traderatesProvider
- the market datavolatilities
- the option volatilities- Returns:
- the present value sensitivity
-
unitPrice
public DoubleScenarioArray unitPrice(ResolvedIborFutureOptionTrade trade, RatesMarketDataLookup ratesLookup, IborFutureOptionMarketDataLookup optionLookup, ScenarioMarketData marketData)
Calculates unit price across one or more scenarios.This is the price of a single unit of the security.
Strata uses decimal prices for Ibor futures in the trade model, pricers and market data. The decimal price is based on the decimal rate equivalent to the percentage. For example, a price of 99.32 implies an interest rate of 0.68% which is represented in Strata by 0.9932.
- Parameters:
trade
- the traderatesLookup
- the lookup used to query the rates market dataoptionLookup
- the lookup used to query the option market datamarketData
- the market data- Returns:
- the present value, one entry per scenario
-
unitPrice
public double unitPrice(ResolvedIborFutureOptionTrade trade, RatesProvider ratesProvider, IborFutureOptionVolatilities volatilities)
Calculates unit price for a single set of market data.This is the price of a single unit of the security.
Strata uses decimal prices for Ibor futures in the trade model, pricers and market data. The decimal price is based on the decimal rate equivalent to the percentage. For example, a price of 99.32 implies an interest rate of 0.68% which is represented in Strata by 0.9932.
- Parameters:
trade
- the traderatesProvider
- the market datavolatilities
- the option volatilities- Returns:
- the present value
-
-