Package com.opengamma.strata.measure.fx
Class FxRateConfig
- java.lang.Object
-
- com.opengamma.strata.measure.fx.FxRateConfig
-
- All Implemented Interfaces:
org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class FxRateConfig extends Object implements org.joda.beans.ImmutableBean
Configuration defining how to createFxRateinstances 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFxRateConfig.BuilderThe bean-builder forFxRateConfig.static classFxRateConfig.MetaThe meta-bean forFxRateConfig.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FxRateConfig.Builderbuilder()Returns a builder used to create an instance of the bean.booleanequals(Object obj)Optional<QuoteId>getObservableRateKey(CurrencyPair currencyPair)Returns a key identifying the market quote for an observable FX rate.inthashCode()static FxRateConfig.Metameta()The meta-bean forFxRateConfig.FxRateConfig.MetametaBean()static FxRateConfigof(Map<CurrencyPair,QuoteId> quotesMap)Returns FX rate configuration built using the data in the map.FxRateConfig.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()
-
-
-
Method Detail
-
getObservableRateKey
public Optional<QuoteId> getObservableRateKey(CurrencyPair currencyPair)
Returns a key identifying the market quote for an observable FX rate.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.
- Parameters:
currencyPair- the currency pair- Returns:
- a key identifying the market quote for the rate if it is observable in the market
-
of
public static FxRateConfig of(Map<CurrencyPair,QuoteId> quotesMap)
Returns FX rate configuration built using the data in the map.- Parameters:
quotesMap- map of currency pairs to the market quotes defining their rates- Returns:
- FX rate configuration built using the data in the map
-
meta
public static FxRateConfig.Meta meta()
The meta-bean forFxRateConfig.- Returns:
- the meta-bean, not null
-
builder
public static FxRateConfig.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public FxRateConfig.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
toBuilder
public FxRateConfig.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-