public final class FxRateConfig extends Object implements org.joda.beans.ImmutableBean
FxRate instances from observable market data.
Currently this only supports rates which are observable in the market. Cross rates derived from other rates will be supported later.
This class is likely to change when support for cross rates is added.
When populating this class all currency pairs must be quoted using the market conventions.
| Modifier and Type | Class and Description |
|---|---|
static class |
FxRateConfig.Builder
The bean-builder for
FxRateConfig. |
static class |
FxRateConfig.Meta
The meta-bean for
FxRateConfig. |
| Modifier and Type | Method and Description |
|---|---|
static FxRateConfig.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
Optional<QuoteId> |
getObservableRateKey(CurrencyPair currencyPair)
Returns a key identifying the market quote for an observable FX rate.
|
int |
hashCode() |
static FxRateConfig.Meta |
meta()
The meta-bean for
FxRateConfig. |
FxRateConfig.Meta |
metaBean() |
static FxRateConfig |
of(Map<CurrencyPair,QuoteId> quotesMap)
Returns FX rate configuration built using the data in the map.
|
FxRateConfig.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public Optional<QuoteId> getObservableRateKey(CurrencyPair currencyPair)
If the FX rate is not observable in the market an empty optional is returned.
It is possible the quote is for the rate of the inverse of the currency pair. This does not matter as the market data system ensures that the correct rate is always provided regardless of which way round the pair is quoted.
currencyPair - the currency pairpublic static FxRateConfig of(Map<CurrencyPair,QuoteId> quotesMap)
quotesMap - map of currency pairs to the market quotes defining their ratespublic static FxRateConfig.Meta meta()
FxRateConfig.public static FxRateConfig.Builder builder()
public FxRateConfig.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic FxRateConfig.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.