> ## 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.

# Stress calibration scenario FX rates

Download sample file: [StressCalibration\_ScenarioFX.csv](./csv/StressCalibration_ScenarioFX.csv)

This Stress Calibration Scenario FX Rates file type is identified using the pattern: **\*\*/StressCalibration\_ScenarioFX\*.csv** (as specified by stress-calibration.scenario-fx.file-pattern). A sample file is `StressCalibration_ScenarioFX`. This file is loaded using the **StressCalibrationScenarioFxRates** 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 |
| - | - | - | - | - | - |
| RiskFactorSet | Y | Y | String | The risk-factor set to which the entry belongs. The following different values are possible:“Full”: data for the full set of risk-factors, “Reduced”: data for the reduced set of risk factors | |
| 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 PV vector. | |
| AsOfDate | Y | N | Date ‘YYYY-MM-DD’ | Timestamp (at close of business) for the data. | |
