Interface IborFutureOptionMarketDataLookup
-
- All Superinterfaces:
CalculationParameter
public interface IborFutureOptionMarketDataLookup extends CalculationParameter
The lookup that provides access to Ibor future option volatilities in market data.The Ibor future option market lookup provides access to the volatilities used to price Ibor future options.
The lookup implements
CalculationParameter
and is used by passing it as an argument toCalculationRules
. It provides the link between the data that the function needs and the data that is available inScenarioMarketData
.Implementations of this interface must be immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ImmutableSet<MarketDataId<?>>
getVolatilityIds(IborIndex index)
Gets the identifiers used to obtain the volatilities for the specified currency.ImmutableSet<IborIndex>
getVolatilityIndices()
Gets the set of indices that volatilities are provided for.default IborFutureOptionMarketData
marketDataView(MarketData marketData)
Obtains a filtered view of the complete set of market data.default IborFutureOptionScenarioMarketData
marketDataView(ScenarioMarketData marketData)
Obtains a filtered view of the complete set of market data.static IborFutureOptionMarketDataLookup
of(IborIndex index, IborFutureOptionVolatilitiesId volatilityId)
Obtains an instance based on a single mapping from index to volatility identifier.static IborFutureOptionMarketDataLookup
of(Map<IborIndex,IborFutureOptionVolatilitiesId> volatilityIds)
Obtains an instance based on a map of volatility identifiers.default Class<? extends CalculationParameter>
queryType()
Gets the type that the lookup will be queried by.default FunctionRequirements
requirements(IborIndex... indices)
Creates market data requirements for the specified indices.FunctionRequirements
requirements(Set<IborIndex> indices)
Creates market data requirements for the specified indices.IborFutureOptionVolatilities
volatilities(IborIndex index, MarketData marketData)
Obtains Ibor future option volatilities based on the specified market data.-
Methods inherited from interface com.opengamma.strata.calc.runner.CalculationParameter
filter
-
-
-
-
Method Detail
-
of
static IborFutureOptionMarketDataLookup of(IborIndex index, IborFutureOptionVolatilitiesId volatilityId)
Obtains an instance based on a single mapping from index to volatility identifier.The lookup provides volatilities for the specified index.
- Parameters:
index
- the Ibor indexvolatilityId
- the volatility identifier- Returns:
- the Ibor future option lookup containing the specified mapping
-
of
static IborFutureOptionMarketDataLookup of(Map<IborIndex,IborFutureOptionVolatilitiesId> volatilityIds)
Obtains an instance based on a map of volatility identifiers.The map is used to specify the appropriate volatilities to use for each index.
- Parameters:
volatilityIds
- the volatility identifiers, keyed by index- Returns:
- the Ibor future option lookup containing the specified volatilities
-
queryType
default Class<? extends CalculationParameter> queryType()
Gets the type that the lookup will be queried by.This returns
IborFutureOptionMarketLookup.class
. When querying parameters usingCalculationParameters.findParameter(Class)
,IborFutureOptionMarketLookup.class
must be passed in to find the instance.- Specified by:
queryType
in interfaceCalculationParameter
- Returns:
- the type of the parameter implementation
-
getVolatilityIndices
ImmutableSet<IborIndex> getVolatilityIndices()
Gets the set of indices that volatilities are provided for.- Returns:
- the set of indices
-
getVolatilityIds
ImmutableSet<MarketDataId<?>> getVolatilityIds(IborIndex index)
Gets the identifiers used to obtain the volatilities for the specified currency.The result will typically refer to a surface or cube. If the index is not found, an exception is thrown.
- Parameters:
index
- the index for which identifiers are required- Returns:
- the set of market data identifiers
- Throws:
IllegalArgumentException
- if the index is not found
-
requirements
default FunctionRequirements requirements(IborIndex... indices)
Creates market data requirements for the specified indices.- Parameters:
indices
- the indices, for which volatilities are required- Returns:
- the requirements
-
requirements
FunctionRequirements requirements(Set<IborIndex> indices)
Creates market data requirements for the specified indices.- Parameters:
indices
- the indices, for which volatilities are required- Returns:
- the requirements
-
marketDataView
default IborFutureOptionScenarioMarketData marketDataView(ScenarioMarketData marketData)
Obtains a filtered view of the complete set of market data.This method returns an instance that binds the lookup to the market data. The input is
ScenarioMarketData
, which contains market data for all scenarios.- Parameters:
marketData
- the complete set of market data for all scenarios- Returns:
- the filtered market data
-
marketDataView
default IborFutureOptionMarketData marketDataView(MarketData marketData)
Obtains a filtered view of the complete set of market data.This method returns an instance that binds the lookup to the market data. The input is
MarketData
, which contains market data for one scenario.- Parameters:
marketData
- the complete set of market data for one scenario- Returns:
- the filtered market data
-
volatilities
IborFutureOptionVolatilities volatilities(IborIndex index, MarketData marketData)
Obtains Ibor future option volatilities based on the specified market data.This provides
IborFutureOptionVolatilities
suitable for pricing an Ibor future option. Although this method can be used directly, it is typically invoked indirectly viaIborFutureOptionMarketData
:// bind the baseData to this lookup IborFutureOptionMarketData view = lookup.marketDataView(baseData); // pass around IborFutureOptionMarketData within the function to use in pricing IborFutureOptionVolatilities vols = view.volatilities(index);
- Parameters:
index
- the Ibor indexmarketData
- the complete set of market data for one scenario- Returns:
- the volatilities
- Throws:
MarketDataNotFoundException
- if the index is not found
-
-