Interface FxRateLookup
-
- All Superinterfaces:
CalculationParameter
- All Known Subinterfaces:
RatesMarketDataLookup
public interface FxRateLookup extends CalculationParameter
The lookup that provides access to FX rates in market data.An instance of
MarketDatacan contain many different FX rates. This lookup allows a specific set of rates to be obtained.Implementations of this interface must be immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description FxRateProviderfxRateProvider(MarketData marketData)Obtains an FX rate provider based on the specified market data.static FxRateLookupofMatrix()Obtains an instance that uses an FX matrix.static FxRateLookupofMatrix(FxMatrixId matrixId)Obtains an instance that uses an FX matrix.static FxRateLookupofRates()Obtains the standard instance.static FxRateLookupofRates(Currency triangulationCurrency)Obtains an instance that uses triangulation on the specified currency.static FxRateLookupofRates(Currency triangulationCurrency, ObservableSource observableSource)Obtains an instance that uses triangulation on the specified currency.static FxRateLookupofRates(ObservableSource observableSource)Obtains the standard instance.default Class<? extends CalculationParameter>queryType()Gets the type that the parameter will be queried by.-
Methods inherited from interface com.opengamma.strata.calc.runner.CalculationParameter
filter
-
-
-
-
Method Detail
-
ofRates
static FxRateLookup ofRates()
Obtains the standard instance.This expects the market data to contain instances of
FxRateIdbased on the defaultObservableSource. Triangulation will use the default of the currency, typically USD.- Returns:
- the FX rate lookup
-
ofRates
static FxRateLookup ofRates(ObservableSource observableSource)
Obtains the standard instance.This expects the market data to contain instances of
FxRateIdbased on the specifiedObservableSource. Triangulation will use the default of the currency, typically USD.- Parameters:
observableSource- the source of observable market data- Returns:
- the FX rate lookup
-
ofRates
static FxRateLookup ofRates(Currency triangulationCurrency)
Obtains an instance that uses triangulation on the specified currency.This expects the market data to contain instances of
FxRateIdbased on the defaultObservableSource. Triangulation will use the specified currency.- Parameters:
triangulationCurrency- the triangulation currency- Returns:
- the FX rate lookup
-
ofRates
static FxRateLookup ofRates(Currency triangulationCurrency, ObservableSource observableSource)
Obtains an instance that uses triangulation on the specified currency.This expects the market data to contain instances of
FxRateIdbased on the specifiedObservableSource. Triangulation will use the specified currency.- Parameters:
triangulationCurrency- the triangulation currencyobservableSource- the source of observable market data- Returns:
- the FX rate lookup
-
ofMatrix
static FxRateLookup ofMatrix()
Obtains an instance that uses an FX matrix.This expects the market data to contain an instance of
FxMatrixaccessed by the standardFxMatrixId.- Returns:
- the FX rate lookup
-
ofMatrix
static FxRateLookup ofMatrix(FxMatrixId matrixId)
Obtains an instance that uses an FX matrix.This expects the market data to contain an instance of
FxMatrixaccessed by the specifiedFxMatrixId.- Parameters:
matrixId- the FX matrix identifier- Returns:
- the FX rate lookup
-
queryType
default Class<? extends CalculationParameter> queryType()
Description copied from interface:CalculationParameterGets the type that the parameter will be queried by.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.- Specified by:
queryTypein interfaceCalculationParameter- Returns:
- the type of the parameter implementation
-
fxRateProvider
FxRateProvider fxRateProvider(MarketData marketData)
Obtains an FX rate provider based on the specified market data.This provides an
FxRateProvidersuitable for obtaining FX rates.- Parameters:
marketData- the complete set of market data for one scenario- Returns:
- the FX rate provider
-
-