public interface IborCapFloorMarketDataLookup extends CalculationParameter
The cap/floor market lookup provides access to the volatilities used to price cap/floors.
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(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 IborCapFloorMarketData |
marketDataView(MarketData marketData)
Obtains a filtered view of the complete set of market data.
|
default IborCapFloorScenarioMarketData |
marketDataView(ScenarioMarketData marketData)
Obtains a filtered view of the complete set of market data.
|
static IborCapFloorMarketDataLookup |
of(IborIndex index,
IborCapletFloorletVolatilitiesId volatilityId)
Obtains an instance based on a single mapping from index to volatility identifier.
|
static IborCapFloorMarketDataLookup |
of(Map<IborIndex,IborCapletFloorletVolatilitiesId> 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.
|
IborCapletFloorletVolatilities |
volatilities(IborIndex index,
MarketData marketData)
Obtains cap/floor volatilities based on the specified market data.
|
filterstatic IborCapFloorMarketDataLookup of(IborIndex index, IborCapletFloorletVolatilitiesId volatilityId)
The lookup provides volatilities for the specified index.
index - the Ibor indexvolatilityId - the volatility identifierstatic IborCapFloorMarketDataLookup of(Map<IborIndex,IborCapletFloorletVolatilitiesId> 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 CapFloorMarketLookup.class.
When querying parameters using CalculationParameters.findParameter(Class),
CapFloorMarketLookup.class must be passed in to find the instance.
queryType in interface CalculationParameterImmutableSet<IborIndex> getVolatilityIndices()
ImmutableSet<MarketDataId<?>> getVolatilityIds(IborIndex 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(IborIndex... indices)
indices - the indices, for which volatilities are requiredFunctionRequirements requirements(Set<IborIndex> indices)
indices - the indices, for which volatilities are requireddefault IborCapFloorScenarioMarketData 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 IborCapFloorMarketData 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 scenarioIborCapletFloorletVolatilities volatilities(IborIndex index, MarketData marketData)
This provides IborCapletFloorletVolatilities suitable for pricing a cap/floor.
Although this method can be used directly, it is typically invoked indirectly
via IborCapFloorMarketData:
// bind the baseData to this lookup IborCapFloorMarketData view = lookup.marketDataView(baseData); // pass around CapFloorMarketData within the function to use in pricing IborCapletFloorletVolatilities vols = view.volatilities(index);
index - the Ibor 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.