public interface CreditRatesMarketDataLookup extends CalculationParameter
The credit rates market lookup provides access to credit, discount and recovery rate curves.
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 |
|---|---|
CreditRatesProvider |
creditRatesProvider(MarketData marketData)
Obtains credit rates provider based on the specified market data.
|
ImmutableSet<Pair<StandardId,Currency>> |
getCreditLegalEntities()
Gets the set of pairs of legal entity ID and currency that credit curves are provided for.
|
ImmutableSet<MarketDataId<?>> |
getCreditMarketDataIds(StandardId standardId,
Currency currency)
Gets the identifiers used to obtain the credit curve for the pair of legal entity ID and currency.
|
ImmutableSet<Currency> |
getDiscountCurrencies()
Gets the set of currencies that discount factors are provided for.
|
ImmutableSet<MarketDataId<?>> |
getDiscountMarketDataIds(Currency currency)
Gets the identifiers used to obtain the discount factors for the specified currency.
|
ImmutableSet<StandardId> |
getRecoveryRateLegalEntities()
Gets the set of legal entity IDs that recovery rate curves are provided for.
|
ImmutableSet<MarketDataId<?>> |
getRecoveryRateMarketDataIds(StandardId standardId)
Gets the identifiers used to obtain the recovery rate curve for the legal entity ID.
|
default CreditRatesMarketData |
marketDataView(MarketData marketData)
Obtains a filtered view of the complete set of market data.
|
default CreditRatesScenarioMarketData |
marketDataView(ScenarioMarketData marketData)
Obtains a filtered view of the complete set of market data.
|
static CreditRatesMarketDataLookup |
of(Map<Pair<StandardId,Currency>,CurveId> creditCurveIds,
Map<Currency,CurveId> discountCurveIds,
Map<StandardId,CurveId> recoveryRateCurveIds)
Obtains an instance based on a maps for credit, discount and recovery rate curves.
|
static CreditRatesMarketDataLookup |
of(Map<Pair<StandardId,Currency>,CurveId> creditCurveIds,
Map<Currency,CurveId> discountCurveIds,
Map<StandardId,CurveId> recoveryRateCurveIds,
ObservableSource observableSource)
Obtains an instance based on a maps for credit, discount and recovery rate curves.
|
default Class<? extends CalculationParameter> |
queryType()
Gets the type that the lookup will be queried by.
|
FunctionRequirements |
requirements(StandardId legalEntityId,
Currency currency)
Creates market data requirements for the specified standard ID and currency.
|
filterstatic CreditRatesMarketDataLookup of(Map<Pair<StandardId,Currency>,CurveId> creditCurveIds, Map<Currency,CurveId> discountCurveIds, Map<StandardId,CurveId> recoveryRateCurveIds)
creditCurveIds - the credit curve identifiers, keyed by legal entity ID and currencydiscountCurveIds - the discount curve identifiers, keyed by currencyrecoveryRateCurveIds - the recovery rate curve identifiers, keyed by legal entity IDstatic CreditRatesMarketDataLookup of(Map<Pair<StandardId,Currency>,CurveId> creditCurveIds, Map<Currency,CurveId> discountCurveIds, Map<StandardId,CurveId> recoveryRateCurveIds, ObservableSource observableSource)
creditCurveIds - the credit curve identifiers, keyed by legal entity ID and currencydiscountCurveIds - the discount curve identifiers, keyed by currencyrecoveryRateCurveIds - the recovery rate curve identifiers, keyed by legal entity IDobservableSource - the source of market data for quotes and other observable market datadefault Class<? extends CalculationParameter> queryType()
This returns CreditRatesMarketDataLookup.class.
When querying parameters using CalculationParameters.findParameter(Class),
CreditRatesMarketDataLookup.class must be passed in to find the instance.
queryType in interface CalculationParameterImmutableSet<Currency> getDiscountCurrencies()
ImmutableSet<MarketDataId<?>> getDiscountMarketDataIds(Currency currency)
In most cases, the identifier will refer to a curve. If the currency is not found, an exception is thrown.
currency - the currency for which identifiers are requiredIllegalArgumentException - if the currency is not foundImmutableSet<Pair<StandardId,Currency>> getCreditLegalEntities()
ImmutableSet<MarketDataId<?>> getCreditMarketDataIds(StandardId standardId, Currency currency)
In most cases, the identifier will refer to a curve. If the pair is not found, an exception is thrown.
standardId - the legal entity IDcurrency - the currencyIllegalArgumentException - if the pair is not foundImmutableSet<StandardId> getRecoveryRateLegalEntities()
ImmutableSet<MarketDataId<?>> getRecoveryRateMarketDataIds(StandardId standardId)
In most cases, the identifier will refer to a curve. If the ID is not found, an exception is thrown.
standardId - the legal entity IDIllegalArgumentException - if the ID is not foundFunctionRequirements requirements(StandardId legalEntityId, Currency currency)
legalEntityId - legal entity IDcurrency - the currencyIllegalArgumentException - if unable to create requirementsdefault CreditRatesScenarioMarketData 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 CreditRatesMarketData 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 scenarioCreditRatesProvider creditRatesProvider(MarketData marketData)
This provides CreditRatesProvider suitable for pricing credit products.
Although this method can be used directly, it is typically invoked indirectly
via CreditRatesMarketData:
// bind the baseData to this lookup CreditRatesMarketData view = lookup.marketView(baseData); // pass around CreditRatesMarketData within the function to use in pricing CreditRatesProvider provider = view.creditRatesProvider();
marketData - the complete set of market data for one scenarioCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.