> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IMA ES scenario FX rates

Download sample file: [IMA\_ES\_ScenarioFX.csv](./csv/IMA_ES_ScenarioFX.csv)

This file provides FX spot rates used in IMA ES scenarios.

This IMA ES Scenario FX Rates file type is identified using the pattern: **\*\*/IMA\_ES\_ScenarioFX\*.csv** (as specified by ima.es.scenario-fx.file-pattern). A sample file is `IMA_ES_ScenarioFX`. This file is loaded using the **EsScenarioFxRates** topic. See the [Topic Aliases table](https://docs.activeviam.com/solutions/frtb/6.0/dev/dev-ref-impl/dev-dlc/dlc-frtb-config.md#topic-aliases) for an understanding of the topic aliases associated with each topic.

### FXHistorical topic

The `EsScenarioFxHistorical` topic has the same file format as IMA\_ES\_ScenarioFX.csv. The difference is the file location.

* When loading the `EsScenarioFxRates` topic, the as-of date is provided in the scope and the file will be loaded from the corresponding directory.
* When loading the `EsScenarioFxHistorical` topic, no as-of date is provided in the scope and all IMA\_ES\_ScenarioFX.csv files from the historical directory are loaded.

## FxRate lookup

The $FxRate$ for converting the input currency value into the target currency value is obtained based on the data in the [EsScenarioFxRates store](https://docs.activeviam.com/solutions/frtb/6.0/datastore/internalmodelsapproach/es-scenario-fx-rates.md).

Similar to the scalar base FX rates, a common currency is used to calculate cross rates.

| **Field** | **Key** | **Null** | **FieldType** | **Description** | **Example** |
| - | - | - | - | - | - |
| DataSet | Y | Y | String | The data set to which the entry belongs. The following different values are possible: “Full Set Current” is data for the last 12 months. “Reduced Set Stressed” is data with the reduced set of risk factors for the 12-month stress period. “Reduced Set Current” is data with the reduced set of risk factors for the last 12 months. | |
| RiskClass | Y | N | String | The risk class, which will be one of the following:GIRR, CSR, Equity, Commodity, FX, allin | |
| LiquidityHorizon | Y | Y | String | The Liquidity Horizon in days: 10, 20, 40, 60, or 120. | |
| BaseCurrency | Y | N | String | The left side of the currency pair. | |
| CounterCurrency | Y | N | String | The right side of the currency pair | |
| Rates | N | N | Double Vector | The vector of FX rates between the two currencies. The vector is indexed by the same scenarios as the corresponding IMA ES PV vector. | |
| AsOfDate | Y | N | Date ‘YYYY-MM-DD’ | Timestamp (at close of business) for the data. | |
