public interface FxRateLookup extends CalculationParameter
An instance of MarketData can contain many different FX rates.
This lookup allows a specific set of rates to be obtained.
Implementations of this interface must be immutable.
| Modifier and Type | Method and Description |
|---|---|
FxRateProvider |
fxRateProvider(MarketData marketData)
Obtains an FX rate provider based on the specified market data.
|
static FxRateLookup |
ofMatrix()
Obtains an instance that uses an FX matrix.
|
static FxRateLookup |
ofMatrix(FxMatrixId matrixId)
Obtains an instance that uses an FX matrix.
|
static FxRateLookup |
ofRates()
Obtains the standard instance.
|
static FxRateLookup |
ofRates(Currency triangulationCurrency)
Obtains an instance that uses triangulation on the specified currency.
|
static FxRateLookup |
ofRates(Currency triangulationCurrency,
ObservableSource observableSource)
Obtains an instance that uses triangulation on the specified currency.
|
static FxRateLookup |
ofRates(ObservableSource observableSource)
Obtains the standard instance.
|
default Class<? extends CalculationParameter> |
queryType()
Gets the type that the parameter will be queried by.
|
filterstatic FxRateLookup ofRates()
This expects the market data to contain instances of FxRateId
based on the default ObservableSource.
Triangulation will use the default of the currency, typically USD.
static FxRateLookup ofRates(ObservableSource observableSource)
This expects the market data to contain instances of FxRateId
based on the specified ObservableSource.
Triangulation will use the default of the currency, typically USD.
observableSource - the source of observable market datastatic FxRateLookup ofRates(Currency triangulationCurrency)
This expects the market data to contain instances of FxRateId
based on the default ObservableSource.
Triangulation will use the specified currency.
triangulationCurrency - the triangulation currencystatic FxRateLookup ofRates(Currency triangulationCurrency, ObservableSource observableSource)
This expects the market data to contain instances of FxRateId
based on the specified ObservableSource.
Triangulation will use the specified currency.
triangulationCurrency - the triangulation currencyobservableSource - the source of observable market datastatic FxRateLookup ofMatrix()
This expects the market data to contain an instance of FxMatrix
accessed by the standard FxMatrixId.
static FxRateLookup ofMatrix(FxMatrixId matrixId)
This expects the market data to contain an instance of FxMatrix
accessed by the specified FxMatrixId.
matrixId - the FX matrix identifierdefault Class<? extends CalculationParameter> queryType()
CalculationParameter
Parameters can be queried using CalculationParameters.findParameter(Class).
This type is the key that callers must use in that method.
By default, this is just Object.getClass().
It will only differ if the query type is an interface rather than the concrete class.
queryType in interface CalculationParameterFxRateProvider fxRateProvider(MarketData marketData)
This provides an FxRateProvider suitable for obtaining FX rates.
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.