FX Rates

Download sample file: FXData.csv

This file provides FX spot rates used for currency conversion.

This FX Rates file type is identified using the pattern: **/FXData*.csv (as specified by fx.data.file-pattern). This file is loaded using the FXRates topic. See the Topic Aliases table for an understanding of the topic aliases associated with each topic.

FXHistorical Topic

The FXHistorical topic has the same file format as FXData.csv. The difference is the file location.

FX Conversion Formula

Input values are converted into the same currency according to this formula:

$$Value_{\text{target currency}} = Value_{\text{input currency}} \cdot FxRate$$

FxRate Lookup

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

  1. In most cases, the algorithm will simply look up the rate based on these key fields: AsOfDate, BaseCcy, CounterCcy. Initially the algorithm searches for the rate that has AsOfDate, input currency, target currency 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, target currency, input currency 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 input currency, let this result be referred to as “baseCcyComponent”

  5. Search for the rate from commonCcy to the target currency, 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 target 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.

Field Key Null FieldType Description Example
BaseCurrency Y N String The left side of the currency pair.
CounterCurrency Y N String The right side of the currency pair
Rate N N Double Forex rate between the two currencies.
AsOfDate Y N Date ‘YYYY-MM-DD’ Timestamp (at close of business) for the data.
search.js