public interface OvernightFutureOptionMarketDataLookup extends CalculationParameter
The Overnight future option market lookup provides access to the volatilities used to price Overnight future options.
The lookup implements CalculationParameter and is used by passing it
as an argument to CalculationRules. It provides the link between the
data that the function needs and the data that is available in ScenarioMarketData.
Implementations of this interface must be immutable.
| Modifier and Type | Method and Description |
|---|---|
ImmutableSet<MarketDataId<?>> |
getVolatilityIds(OvernightIndex index)
Gets the identifiers used to obtain the volatilities for the specified currency.
|
ImmutableSet<OvernightIndex> |
getVolatilityIndices()
Gets the set of indices that volatilities are provided for.
|
default OvernightFutureOptionMarketData |
marketDataView(MarketData marketData)
Obtains a filtered view of the complete set of market data.
|
default OvernightFutureOptionScenarioMarketData |
marketDataView(ScenarioMarketData marketData)
Obtains a filtered view of the complete set of market data.
|
static OvernightFutureOptionMarketDataLookup |
of(Map<OvernightIndex,OvernightFutureOptionVolatilitiesId> volatilityIds)
Obtains an instance based on a map of volatility identifiers.
|
static OvernightFutureOptionMarketDataLookup |
of(OvernightIndex index,
OvernightFutureOptionVolatilitiesId volatilityId)
Obtains an instance based on a single mapping from index to volatility identifier.
|
default Class<? extends CalculationParameter> |
queryType()
Gets the type that the lookup will be queried by.
|
default FunctionRequirements |
requirements(OvernightIndex... indices)
Creates market data requirements for the specified indices.
|
FunctionRequirements |
requirements(Set<OvernightIndex> indices)
Creates market data requirements for the specified indices.
|
OvernightFutureOptionVolatilities |
volatilities(OvernightIndex index,
MarketData marketData)
Obtains Overnight future option volatilities based on the specified market data.
|
filterstatic OvernightFutureOptionMarketDataLookup of(OvernightIndex index, OvernightFutureOptionVolatilitiesId volatilityId)
The lookup provides volatilities for the specified index.
index - the Overnight indexvolatilityId - the volatility identifierstatic OvernightFutureOptionMarketDataLookup of(Map<OvernightIndex,OvernightFutureOptionVolatilitiesId> volatilityIds)
The map is used to specify the appropriate volatilities to use for each index.
volatilityIds - the volatility identifiers, keyed by indexdefault Class<? extends CalculationParameter> queryType()
This returns OvernightFutureOptionMarketLookup.class.
When querying parameters using CalculationParameters.findParameter(Class),
OvernightFutureOptionMarketLookup.class must be passed in to find the instance.
queryType in interface CalculationParameterImmutableSet<OvernightIndex> getVolatilityIndices()
ImmutableSet<MarketDataId<?>> getVolatilityIds(OvernightIndex index)
The result will typically refer to a surface or cube. If the index is not found, an exception is thrown.
index - the index for which identifiers are requiredIllegalArgumentException - if the index is not founddefault FunctionRequirements requirements(OvernightIndex... indices)
indices - the indices, for which volatilities are requiredFunctionRequirements requirements(Set<OvernightIndex> indices)
indices - the indices, for which volatilities are requireddefault OvernightFutureOptionScenarioMarketData marketDataView(ScenarioMarketData marketData)
This method returns an instance that binds the lookup to the market data.
The input is ScenarioMarketData, which contains market data for all scenarios.
marketData - the complete set of market data for all scenariosdefault OvernightFutureOptionMarketData marketDataView(MarketData marketData)
This method returns an instance that binds the lookup to the market data.
The input is MarketData, which contains market data for one scenario.
marketData - the complete set of market data for one scenarioOvernightFutureOptionVolatilities volatilities(OvernightIndex index, MarketData marketData)
This provides OvernightFutureOptionVolatilities suitable for pricing an Overnight future option.
Although this method can be used directly, it is typically invoked indirectly
via OvernightFutureOptionMarketData:
// bind the baseData to this lookup OvernightFutureOptionMarketData view = lookup.marketDataView(baseData); // pass around OvernightFutureOptionMarketData within the function to use in pricing OvernightFutureOptionVolatilities vols = view.volatilities(index);
index - the Overnight indexmarketData - the complete set of market data for one scenarioMarketDataNotFoundException - if the index is not foundCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.