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

# PL

> PL Attribution and Backtesting measures under MAR32, covering PL sums (Actual, Hypothetical, Theoretical), Spearman/Kolmogorov-Smirnov correlation tests, and VaR/ES exceptions and outliers used to validate the IMA model.

[model\_eligibility](../../tags/model_eligibility)

Measures for the PL Attribution Test (PLAT) and Backtesting, used to assess the eligibility of a desk for the Internal Model Approach.

### Actual PL

| | |
| - | - |
| **Description** | A sum of Actual PL input values |
| **Reference** | {baselLink("MAR", 32, 4)} |

### Actual PL Lookback

| | |
| - | - |
| **Description** | The historical Actual PL values |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### Actual PL Lookback Rank

| | |
| - | - |
| **Description** | Technical measure |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### Actual PL Lookback Index

| | |
| - | - |
| **Description** | Technical measure |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### Exception 97.5 (Actual) Lookback

| | |
| - | - |
| **Description** | The historical Exception 97.5 (Actual) values |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

The measure helps to inspect exceptions for PLAT and Backtesting.

> [!NOTE]
>
> You can change the lookback horizon (for instance 1M) to a shorter or longer observation window using the **NbDaysPLMeasures** context value.

### Exception 97.5 (Hypothetical) Lookback

| | |
| - | - |
| **Description** | The historical Exception 97.5 (Hypothetical) values |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

The measure helps to inspect exceptions for PLAT and Backtesting.

> [!NOTE]
>
> You can change the lookback horizon (for instance 1M) to a shorter or longer observation window using the **NbDaysPLMeasures** context value.

### Exception 99 (Actual) Lookback

| | |
| - | - |
| **Description** | The historical Exception 99 (Actual) values |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

The measure helps to inspect exceptions for PLAT and Backtesting.

> [!NOTE]
>
> You can change the lookback horizon (for instance 1M) to a shorter or longer observation window using the **NbDaysPLMeasures** context value.

### Exception 99 (Hypothetical) Lookback

| | |
| - | - |
| **Description** | The historical Exception 99 (Hypothetical) values |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

The measure helps to inspect exceptions for PLAT and Backtesting.

> [!NOTE]
>
> You can change the lookback horizon (for instance 1M) to a shorter or longer observation window using the **NbDaysPLMeasures** context value.

### Hypothetical PL

| | |
| - | - |
| **Description** | A sum of Hypothetical PL input values |
| **Reference** | {baselLink("MAR", 32, 4)} |

### Hypothetical PL Lookback

| | |
| - | - |
| **Description** | The hypothetical PL contributing to the eligibility statistics calculations |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

The measure helps to inspect actual contributors to the eligibility statistics calculations and spot potential data quality issues, such as spikes or missing values.

> [!NOTE]
>
> You can change the lookback horizon (for instance 1M) to a shorter or longer observation window using the **NbDaysPLMeasures** context value.

### Hypothetical PL Lookback Rank

| | |
| - | - |
| **Description** | Computes hypothetical PL rank for each observation date |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### Hypothetical PL Lookback Index

| | |
| - | - |
| **Description** | Technical measure |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### Kolmogorov-Smirnov Test Metric

| | |
| - | - |
| **Description** | The Kolmogorov Smirnov statistics |
| **Reference** | {baselLink("MAR", 32, 41)} |

### Kolmogorov-Smirnov Test p-value

| | |
| - | - |
| **Description** | The p-value for the Kolmogorov-Smirnov Test. |
| **Reference** | {baselLink("MAR", 32, 42)} |

### Mean Ratio

| | |
| - | - |
| **Description** | The mean of the unexplained P\&L divided by the standard deviation of the hypothetical P\&L (BCBS 352: 183 (b)) |

The mean ratio is a P\&L attribution test metric, computed as shown below.

**Mean Ratio** = **Mean Unexplained PL** / **Std Dev Hypothetical PL**

### Mean Unexplained PL

| | |
| - | - |
| **Description** | The mean of the unexplained P\&L (BCBS 352: 183 (b)) |

This page describes the Mean unexplained PL measure, which provides the mean of the unexplained P\&L.

The measure is computed based on the **Unexplained PL** measure.

### p-value (Actual) Lookback

| | |
| - | - |
| **Description** | The historical p-value (Actual) values |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### p-value (Actual) Lookback Rank

| | |
| - | - |
| **Description** | Technical measure |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### p-value (Actual) Lookback Index

| | |
| - | - |
| **Description** | Technical measure |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### p-value (Hypothetical) Lookback

| | |
| - | - |
| **Description** | The historical p-value (Hypothetical) values |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### p-value (Hypothetical) Lookback Rank

| | |
| - | - |
| **Description** | Technical measure |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### p-value (Hypothetical) Lookback Index

| | |
| - | - |
| **Description** | Technical measure |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### PL Scenario Rank

| | |
| - | - |
| **Description** | Simulated PL rank for each VaR Scenario |
| **Required hierarchies** | [Scenarios](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/risk.md#scenarios) |

### Spearman Correlation Metric

This page describes the **Spearman correlation metric** measure, which provides the Spearman correlation statistics.

| | |
| - | - |
| **Description** | The Spearman Correlation statistics |
| **Reference** | {baselLink("MAR", 32, 38)} |

### Spearman Correlation Metric Denominator

| | |
| - | - |
| **Description** | Technical measure |

### Spearman Correlation Metric Numerator

| | |
| - | - |
| **Description** | Technical measure |

### Std Dev Hypothetical PL

| | |
| - | - |
| **Description** | The standard deviation of hypothetical PL |
| **Reference** | {baselLink("MAR", 32, 38)} |
| **Formula** | $\displaystyle stdev = \sqrt{\frac{\sum(x - \bar{x})^2}{n}}$ |

The measure is computed based on the **Hypothetical PL** measure.

### Std Dev Hypothetical PL Lookback Rank

| | |
| - | - |
| **Description** | Technical measure |

### Std Dev Theoretical PL Lookback Rank

| | |
| - | - |
| **Description** | Technical measure |

### Theoretical PL

| | |
| - | - |
| **Description** | A sum of Theoretical PL input values (BCBS 352: 183) |

### Theoretical PL Lookback

| | |
| - | - |
| **Description** | The theoretical PL contributing to the eligibility statistics calculations |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

The measure helps to inspect the actual contributors to the eligibility statistics calculations and spot potential data quality issues, such as spikes or missing values.

> [!NOTE]
>
> The lookback horizon (for instance 1M) can be changed to a shorter or longer observation window using the **NbDaysPLMeasures** context value.

### Theoretical PL Lookback Rank

| | |
| - | - |
| **Description** | Computes risk-theoretical PL rank for each observation date |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### Theoretical PL Lookback Index

| | |
| - | - |
| **Description** | Technical measure |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### Unexplained PL

| | |
| - | - |
| **Description** | Difference between Risk Theoretical PL and Hypothetical PL |

### Unexplained PL Lookback

| | |
| - | - |
| **Description** | Unexplained PL contributing to the eligibility statistics calculations (BCBS 352: 183) |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

The measure helps to inspect actual contributors to the eligibility statistics calculations and spot potential data quality issues, such as spikes or missing values.

> [!NOTE]
>
> The lookback horizon (for instance 1M) can be changed to a shorter or longer observation window using the **NbDaysPLMeasures** context value.

### Variance Hypothetical PL

This page describes the **Variance hypothetical PL** measure, which provides the variance of the hypothetical P\&L (BCBS 352: 183 (b)).

| | |
| - | - |
| **Description** | The variance of the hypothetical P\&L (BCBS 352: 183 (b)) |
| **Formula** | $\displaystyle \frac{\sum (x-\bar{x})^2}{n}$ |

### Variance Ratio

This measure gives the variance of the unexplained P\&L divided by the variance of the hypothetical P\&L.

| | |
| - | - |
| **Description** | The variance of the unexplained P\&L divided by the variance of the hypothetical P\&L (BCBS 352: 183 (b)) |

### Variance Unexplained PL

This measure gives the variance of the unexplained P\&L.

| | |
| - | - |
| **Description** | The variance of the unexplained P\&L (BCBS 352: 183 (b)) |
| **Formula** | $\displaystyle \frac{\sum (x-\bar{x})^2}{n}$ |

## VaR

### ES 97.5

This measure provides the trade-level 1-day expected shortfall at the 97.5% confidence level.

| | |
| - | - |
| **Description** | The trade level 1-day expected shortfall at 97.5% confidence level |

### ES 99

This measure provides the expected shortfall at the 99% confidence level.

| | |
| - | - |
| **Description** | The expected shortfall at 99% confidence level |

### Exception 97.5 (Actual)

| | |
| - | - |
| **Description** | The measure returns 1 if Actual PL is below VaR 97.5 (previous day). |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 97.5 (Actual) Count

| | |
| - | - |
| **Description** | The rolling sum of Exception 97.5 (exceptions from Actual) |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 97.5 (Actual) Dates

| | |
| - | - |
| **Description** | The list of past dates where Actual PL overshoots VaR |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 97.5 Count

| | |
| - | - |
| **Description** | The max of Exception 97.5 (Actual) and Exception 97.5 (Hypothetical) |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 97.5 (Hypothetical)

| | |
| - | - |
| **Description** | The measure returns 1 if Hypothetical PL is below VaR 97.5 (previous day). |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 97.5 (Hypothetical) Count

| | |
| - | - |
| **Description** | The rolling sum of Exception 97.5 (exceptions from Hypothetical) |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 97.5 (Hypothetical) Dates

| | |
| - | - |
| **Description** | The list of past dates where Hypothetical PL overshoots VaR |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 99 (Actual)

| | |
| - | - |
| **Description** | The measure returns 1 if Actual PL is below VaR 99 (previous day). |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 99 (Actual) Count

| | |
| - | - |
| **Description** | The rolling sum of Exception 99 (exceptions from Actual) |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 99 (Actual) Dates

| | |
| - | - |
| **Description** | The list of past dates where Actual PL overshoots VaR |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 99 Count

| | |
| - | - |
| **Description** | The max of Exception 99 (Actual) and Exception 99 (Hypothetical) |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 99 (Hypothetical)

| | |
| - | - |
| **Description** | The measure returns 1 if Hypothetical PL is below VaR 99 (previous day). |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 99 (Hypothetical) Count

| | |
| - | - |
| **Description** | The rolling sum of Exception 99 (exceptions from Hypothetical) |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Exception 99 (Hypothetical) Dates

| | |
| - | - |
| **Description** | The list of past dates where Hypothetical PL overshoots VaR |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Outlier 97.5

This measure returns the maximum of the actual and hypothetical 97.5 exceptions used for model eligibility.

| | |
| - | - |
| **Description** | Max of (Exception 97.5 (Actual), Exception 97.5 (Hypothetical)) |

### Outlier 97.5 Count

| | |
| - | - |
| **Description** | The rolling sum of Outlier 97.5 |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Outlier 97.5 Dates

| | |
| - | - |
| **Description** | The list of past dates where Actual PL or Hypothetical PL overshoots VaR |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Outlier 99

| | |
| - | - |
| **Description** | Max of (Exception 99 (Actual) , Exception 99 (Hypothetical)) |

### Outlier 99 Count

| | |
| - | - |
| **Description** | The rolling sum of Outlier 99 |
| **Reference** | {baselLink("MAR", 32, 5)} |

### Outlier 99 Dates

| | |
| - | - |
| **Description** | The list of past dates where Actual PL or Hypothetical PL overshoots VaR |
| **Reference** | {baselLink("MAR", 32, 5)} |

### p-value (Actual)

| | |
| - | - |
| **Description** | The actual PL p-value from upstream system (BCBS 352: 183) |

### p-value (Hypothetical)

| | |
| - | - |
| **Description** | The hypothetical PL p-value from upstream system (BCBS 352: 183) |

### VaR 97.5% (Previous Day)

| | |
| - | - |
| **Description** | The measure 'VaR 97.5%' taken as of previous day. This measure is tested against PL time series. |
| **Reference** | {baselLink("MAR", 32, 4)} |

### VaR 97.5% (previous day) Lookback

| | |
| - | - |
| **Description** | The historical VaR 97.5% (previous day) values |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### VaR 99% (Previous Day)

| | |
| - | - |
| **Description** | The measure 'VaR 99%' taken as of previous day. This measure is tested against PL time series. |
| **Reference** | {baselLink("MAR", 32, 4)} |

### VaR 99% (previous day) Lookback

| | |
| - | - |
| **Description** | The historical VaR 99% (previous day) values |
| **Required hierarchies** | [Lookback](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/lookback.md) |

### VaR PL

| | |
| - | - |
| **Description** | Technical measure holding the VaR PL Vector, which can be expanded using the `VaR PL Expand` measure. |

### VaR PL Expand

| | |
| - | - |
| **Description** | The simulated PL vectors - input data for the VaR calculation |
| **Required hierarchies** | [Scenarios](https://docs.activeviam.com/solutions/frtb/6.0/cube/dimensions/risk.md#scenarios) |
