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

# FX delta PnL explain

> FX Delta PnL Explain can be handled using the logic for interpreting risk factors as currency pairs, either by directly defining the currency pair, such as C...

FX Delta PnL Explain can be handled using the logic for interpreting risk factors as currency pairs, either by directly defining the currency pair, such as CAD/USD, or by customizing the interpretation of risk factors, for example, CAD\_FX Equivalent.

## Example scenario

### 1. Input data: Sensitivity inputs

The sensitivity input data contains the following fields:

* **Risk Factor**: Specifies the FX pair or equivalent representation for the sensitivity.
* **Value (Delta)**: The sensitivity of the Delta to changes in the FX rate.

#### Example sensitivity input data:

<table><thead><tr><th>Risk factor</th><th>Delta</th></tr></thead><tbody><tr><td>CAD/USD</td><td>1000</td></tr><tr><td>CAD\_FX Equivalent</td><td>1500</td></tr></tbody></table>

### 2. Logic for interpreting risk factors

#### Case 1: Risk factor as a currency pair (preferred approach)

For a CAD/USD, the system interprets the risk factor as:

* **From Currency**: CAD
* **To Currency**: USD

The FX rate for CAD/USD is directly looked up from the FX Rate Market Data Store.

#### Case 2: Risk Factor as an Equivalent (Customized Approach)

For CAD\_FX Equivalent, the system customizes the interpretation to convert it into a currency pair:

* **From Currency**: CAD
* **To Currency**: USD

This mapping is achieved by using a customization layer (for example, the `RiskFactorFXPairTranslatorConfig` class in the code base, where you input a default `To:` currency). Atoti Market Risk then looks up the FX rate CAD/USD in the FX rate market data store.

### 3. Calculating Delta PnL Explain

For each risk factor, the PnL explain is calculated as:

$$
\text{PnL Explain} = \text{Delta} \times \text{FX Rate Change(Absolute or Relative)}
$$
