Interface CreditRatesMarketDataLookup
-
- All Superinterfaces:
CalculationParameter
public interface CreditRatesMarketDataLookup extends CalculationParameter
The lookup that provides access to credit rates in market data.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 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 CreditRatesProvider
creditRatesProvider(MarketData marketData)
Obtains credit rates provider based on the specified market data.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(java.util.Map<Pair<StandardId,Currency>,CurveId> creditCurveIds, java.util.Map<Currency,CurveId> discountCurveIds, java.util.Map<StandardId,CurveId> recoveryRateCurveIds)
Obtains an instance based on a maps for credit, discount and recovery rate curves.static CreditRatesMarketDataLookup
of(java.util.Map<Pair<StandardId,Currency>,CurveId> creditCurveIds, java.util.Map<Currency,CurveId> discountCurveIds, java.util.Map<StandardId,CurveId> recoveryRateCurveIds, ObservableSource observableSource)
Obtains an instance based on a maps for credit, discount and recovery rate curves.default java.lang.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.-
Methods inherited from interface com.opengamma.strata.calc.runner.CalculationParameter
filter
-
-
-
-
Method Detail
-
of
static CreditRatesMarketDataLookup of(java.util.Map<Pair<StandardId,Currency>,CurveId> creditCurveIds, java.util.Map<Currency,CurveId> discountCurveIds, java.util.Map<StandardId,CurveId> recoveryRateCurveIds)
Obtains an instance based on a maps for credit, discount and recovery rate curves.- Parameters:
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 ID- Returns:
- the rates lookup containing the specified curves
-
of
static CreditRatesMarketDataLookup of(java.util.Map<Pair<StandardId,Currency>,CurveId> creditCurveIds, java.util.Map<Currency,CurveId> discountCurveIds, java.util.Map<StandardId,CurveId> recoveryRateCurveIds, ObservableSource observableSource)
Obtains an instance based on a maps for credit, discount and recovery rate curves.- Parameters:
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 data- Returns:
- the rates lookup containing the specified curves
-
queryType
default java.lang.Class<? extends CalculationParameter> queryType()
Gets the type that the lookup will be queried by.This returns
CreditRatesMarketDataLookup.class
. When querying parameters usingCalculationParameters.findParameter(Class)
,CreditRatesMarketDataLookup.class
must be passed in to find the instance.- Specified by:
queryType
in interfaceCalculationParameter
- Returns:
- the type of the parameter implementation
-
requirements
FunctionRequirements requirements(StandardId legalEntityId, Currency currency)
Creates market data requirements for the specified standard ID and currency.- Parameters:
legalEntityId
- legal entity IDcurrency
- the currency- Returns:
- the requirements
- Throws:
java.lang.IllegalArgumentException
- if unable to create requirements
-
marketDataView
default CreditRatesScenarioMarketData 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 CreditRatesMarketData 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
-
creditRatesProvider
CreditRatesProvider creditRatesProvider(MarketData marketData)
Obtains credit rates provider based on the specified market data.This provides
CreditRatesProvider
suitable for pricing credit products. Although this method can be used directly, it is typically invoked indirectly viaCreditRatesMarketData
:// 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();
- Parameters:
marketData
- the complete set of market data for one scenario- Returns:
- the rates provider
-
-