public interface BondFutureOptionMarketDataLookup extends CalculationParameter
The bond future option market lookup provides access to the volatilities used to price bond 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(SecurityId securityId)
Gets the identifiers used to obtain the volatilities for the specified security ID.
|
ImmutableSet<SecurityId> |
getVolatilitySecurityIds()
Gets the set of security IDs that volatilities are provided for.
|
default BondFutureOptionMarketData |
marketDataView(MarketData marketData)
Obtains a filtered view of the complete set of market data.
|
default BondFutureOptionScenarioMarketData |
marketDataView(ScenarioMarketData marketData)
Obtains a filtered view of the complete set of market data.
|
static BondFutureOptionMarketDataLookup |
of(Map<SecurityId,BondFutureVolatilitiesId> volatilityIds)
Obtains an instance based on a map of volatility identifiers.
|
static BondFutureOptionMarketDataLookup |
of(SecurityId securityId,
BondFutureVolatilitiesId volatilityId)
Obtains an instance based on a single mapping from security ID to volatility identifier.
|
default Class<? extends CalculationParameter> |
queryType()
Gets the type that the lookup will be queried by.
|
default FunctionRequirements |
requirements(SecurityId... securityIds)
Creates market data requirements for the specified security IDs.
|
FunctionRequirements |
requirements(Set<SecurityId> securityIds)
Creates market data requirements for the specified security IDs.
|
BondFutureVolatilities |
volatilities(SecurityId securityId,
MarketData marketData)
Obtains bond future volatilities based on the specified market data.
|
filterstatic BondFutureOptionMarketDataLookup of(SecurityId securityId, BondFutureVolatilitiesId volatilityId)
The lookup provides volatilities for the specified security ID.
securityId - the security IDvolatilityId - the volatility identifierstatic BondFutureOptionMarketDataLookup of(Map<SecurityId,BondFutureVolatilitiesId> volatilityIds)
The map is used to specify the appropriate volatilities to use for each security ID.
volatilityIds - the volatility identifiers, keyed by security IDdefault Class<? extends CalculationParameter> queryType()
This returns BondFutureOptionMarketLookup.class.
When querying parameters using CalculationParameters.findParameter(Class),
BondFutureOptionMarketLookup.class must be passed in to find the instance.
queryType in interface CalculationParameterImmutableSet<SecurityId> getVolatilitySecurityIds()
ImmutableSet<MarketDataId<?>> getVolatilityIds(SecurityId securityId)
The result will typically refer to a surface or cube. If the security ID is not found, an exception is thrown.
securityId - the security ID for which identifiers are requiredIllegalArgumentException - if the security ID is not founddefault FunctionRequirements requirements(SecurityId... securityIds)
securityIds - the security IDs, for which volatilities are requiredFunctionRequirements requirements(Set<SecurityId> securityIds)
securityIds - the security IDs, for which volatilities are requireddefault BondFutureOptionScenarioMarketData 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 BondFutureOptionMarketData 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 scenarioBondFutureVolatilities volatilities(SecurityId securityId, MarketData marketData)
This provides BondFutureVolatilities suitable for pricing bond future options.
Although this method can be used directly, it is typically invoked indirectly
via BondFutureOptionMarketData:
// bind the baseData to this lookup BondFutureOptionMarketData view = lookup.marketDataView(baseData); // pas around BondFutureOptionMarketData within the function to use in pricing BondFutureVolatilities vols = view.volatilities(securityId);
securityId - the security IDmarketData - the complete set of market data for one scenarioMarketDataNotFoundException - if the security ID is not foundCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.