FX Rates Service

With the ReferenceCurrency context value you can change the dashboard’s currency for the Value-at-Risk, sensitivities, PL and other measures.

Please note, that some of the measures will remain unaffected when the reference currency is changed, the measures in this list display values in the native currency by design. Please refer to the individual measures documentation for more information.

Default Reference Currency

If the ReferenceCurrency is not set, the results will be converted into the default calculation currency configured in the application properties (fx-rates.common-currency in the risk.properties).

Market data

The FX Rates are defined along the [AsOfDate] dimension to allow for historical rate conversions.

Multiple data sets - official end-of-date, trader’s marks, etc - can be provided, and each data set will have to list the applicable currency pairs. We don’t assume that all rates will be against the same currency. Please refer to the FxRate Lookup section below for more information.

We expect that the rates are displayed in their natural way: the market convention for some currency pairs is to always be referenced in a certain way, such as always showing a rate that multiplies or divides one currency by the other. To simplify the coding, we have chosen a single unique way across all currency pairs such as always multiply: GBP/USD 1.55 means that the amount in GBP is multiplied by 1.55 to produce the amount in USD. Please refer to the [FX Conversion Formula] section below.

FX Conversion Formula

The conversion is applied according to this formula:

$$Value_{\text{reference currency}} = Value_{\text{native currency}} \cdot FxRate$$

FxRate Lookup

The $FxRate$ for converting the native currency value into the reference currency value is obtained based on the data in the FX Rates data store.

  1. In most cases, the algorithm will simply lookup the rate based on these key fields: AsOfDate, BaseCcy, CounterCcy. Initially the algorithm will search for the rate that will have AsOfDate, NativeCurrency, ReferenceCurrency in the key fields. See the Direct Lookup example below.

  2. If the rate was not found, the algorithm will try the indirect lookup - search rate by AsOfDate, ReferenceCurrency, NativeCurrency and take the reciprocal of the rate if found.

  3. If the rate is still not found at this stage, the algorithm will compute the rate using the FX crosses via the “CommonCcy” configured in the application properties (fx-rates.common-currency in the risk.properties):

  4. Search for the rate from CommonCcy to NativeCurrency, let this result be referred to as “baseCcyComponent”

  5. Search for the rate from commonCcy to the referenceCurrency, let this result be referred to as “counterCcyComponent”

  6. Compute the FxRate as counterCcyComponent divided by baseCcyComponent. See the FX Crosses example below.

Direct Lookup Example

AsOfDate BaseCcy CounterCcy FxRate
2019-01-01 EUR CHF 1.0794

The risk in CHF will be displayed as 107.94 = 100 x 1.0794.

FX Crosses Example

AsOfDate BaseCcy CounterCcy FxRate
2019-01-01 EUR CHF 1.0794
2019-01-01 EUR KZT 370.0427

With CHF as the reference currency, the rate applicable to KZT exposure is computed as follows:

The KZT/CHF rate is computed as 1.0794/370.0427 = 0.002916961.

Hence, the risk in CHF will be displayed as 0.2916961 = 100 x 0.002916961.

See also

search.js