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

export const productName = "Atoti FRTB";

This section describes how requirements in BCBS 457 are implemented in
{productName} (Internal Models Approach).

For further details, see the [Internal Models Approach.](../../../cube/measures/internalmodelapproach/index)

The formulae and definitions in the BCBS document are not repeated here
– instead, references are provided to the relevant paragraphs, as
appropriate.

## Calculation steps

The aggregated internal models-based capital charges for IMA desks in
green or amber PLA zones is given as: \[MAR33]

$IMA_{GA} = C_A + DRC$

where

$C_A = max\left\{ IMCC_{t-1} + SES_{t-1};\ m_c \cdot IMCC_{avg} + SES_{avg} \right\}$

### Expected Shortfall (ES)

<Note>
  BCBS-457 Reference

  This section refers to \[MAR33]
  The scaling is applied as defined in [MAR33.4](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_4)
  The liquidity horizon tables in \[MAR33] and[MAR33.12](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_12) are held in datastores.
  The risk capital adjustment defined in [MAR33.5](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_5)
</Note>

{productName} can calculate Expected Shortfall (ES). The
Solution requires P\&L vectors as inputs that are keyed by the
following attributes:

* AsOfDate
* TradeId
* Dataset (ES<sub>rs</sub>, ES<sub>fc,</sub> ES<sub>rc</sub>)
* Risk Class
* Liquidity Horizon
* Currency

For information, see the [input file format for Expected Shortfall PL Trade](../../../input-files/expected-shortfall-pl-trade).

 

{productName} allows the ES percentile to be expressed as a
context value with a default setting of 97.5 [MAR33.3](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_3)

{productName} contains measures for the calculation of the
following.  The calculation chain exposes the intermediate measures for:

* Raw input data on a drill through panel and / or pivot view
* Conversion of input P\&L vectors to a reference currency (if the
  source systems provide native currency P\&L values)
* Calculation of ES (liquidity adjusted, capital constrained and
  capital unconstrained)
* Squared Liquidity Horizon (LH) factor [MAR33.4](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_4) and [MAR33.12](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_12)
* IMCC

 

{productName} calculates the three Expected Shortfall values for
ES<sub>rs</sub>, ES<sub>fc</sub> and ES<sub>rc</sub> separately and also
applies the risk capital adjustment.[MAR33.5](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_5)

{productName} assumes that data for ES<sub>rs</sub> has been
supplied as an input. For information on how {productName} can
help with the assessment of the ES period of stress, see [Evaluating the ES Period of Maximum Stress](#evaluating-the-es-period-of-maximum-stress).

 

### Internally Modelled Capital Charge (IMCC)

<Note>
  BCBS-457 Reference

  This section refers to [MAR33.14](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_14) and [MAR33.15](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_15).
</Note>

The rho factor in the IMCC calculation is parameterised which allows the
user to configure the factor at query time.

Part of the IMCC calculation for the *aggregated charge* requires the
weighted average charge per desk over the last 60 days. {productName} does not calculate this value. It is required as desk-level input data to the Solution.

### Stressed Capital Add-On (SES)

<Note>
  BCBS-457 Reference

  This section refers to [MAR33.16](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_16).

  The aggregation of the capitalised Non-Modellable Risk Factors (NMRFs)
  is calculated according to this paragraph.
</Note>

In the IMARiskFactors store, {productName} uses the
Non-Modellable Risk Factors (NMRFs) and Idiosyncratic fields to
distinguish between three types of risk factors:

* Modellable
* Non-modellable, but not idiosyncratic
* Non-modellable idiosyncratic credit spread risk factors that have
  been demonstrated to be appropriate to aggregate with zero
  correlation

### DEFAULT RISK CHARGE FOR IMA (DRC)

<Note>
  BCBS-457 Reference

  This section refers to [MAR33.18](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_18).
</Note>

{productName} presents a VaR-based approach to DRC for IMA which
is calculated from P\&L vectors at trade level. The result is required
at 99.9% which means that the input vectors are typically of size
100,000 or more.

The input vector at the trade level is very sparse (meaning that most of
the million elements are zero). This is because any one obligor is
insensitive to most of the scenarios. {productName} compresses
the sparse vectors and stores them in off-heap memory so that the trade
level vectors use the minimum possible memory.

{productName} provides a context value that enables the user to
look at the IMA DRC under different confidence levels. By default, {productName} computes the IMA DRC at 99.9% but a context value is
provided that enables the user to work with other levels.

### Evaluating the ES Period of Maximum Stress

<Note>
  BCBS-457 Reference

  This section refers to [MAR33.7](https://www.bis.org/basel_framework/chapter/MAR/33.htm?inforce=20230101\&published=20200327#paragraph_MAR_33_20230101_33_7).
</Note>

{productName} does not provide the scheduling tasks required to
load the data for this calculation. The vector corresponding to the
stressed period can be written out to a CSV file by {productName}.

### P\&L Attribution Tests and Backtesting

<Note>
  BCBS-457 Reference

  This section is concerned with \[MAR32].
</Note>

There are two cubes:

* The **PL Summary Cube** for the desk and firm-wide monitoring.
* <span style={{"letterSpacing": "0.0px"}}>The </span>**PL**
  **Cube**<span style={{"letterSpacing": "0.0px"}}> for trade level
  analytics, including aggregating VaR P\&L vectors to the desk level
  and calculating the VaR values.</span>

#### Supported Use Cases

The P\&L Attribution Tests and Backtesting have been designed to enable
the following use cases.

1. Monitoring historical VaR and P\&L values at the desk and firm-wide
   levels, as required by regulation.
2. Calculating desk and firm-wide VaR values from trade level VaR P\&L
   vectors.
3. Customizing trade level inputs and analytics to support analysing
   recent exceptions/outliers.

#### PL Summary Cube

The PL Summary Cube collects aggregated data with a long history (at
least the 1 year required by the regulations) at the desk and firm-wide
levels.  Including:

* Daily P\&L values (actual, hypothetical, and risk-theoretical).
* Daily VaR values at the 97.5% and 99% confidence level.

The cube includes the analytics required for P\&L Attribution Tests and
Backtesting.  Including:

* The mean of the difference between the risk-theoretical and
  hypothetical P\&L (unexplained P\&L) divided by the standard
  deviation of the hypothetical P\&L.
* The variance of the unexplained P\&L divided by the variance of the
  hypothetical P\&L.
* A count of the number of exceptions when comparing the Actual P\&L
  and Hypothetical P\&L against the VaR at the 97.5% and 99%
  confidence levels.

For more information, see .\
The input data to the summary cube requires the following data fields in
the input data files:

* AsOfDate
* Desk name
* Currency
* Actual PL
* Hypothetical PL
* Theoretical PL
* VaR 99
* VaR 97.5

For information, see the input file format for [PL Summary](../../../input-files/pl-summary).

#### PL Cube

The PL Cube collects recent data at the trade (or position) level,
including the VaR P\&L vectors.

* Includes VaR calculations, for calculating the desk and firm-wide
  VaR values at the 97.5% and 99% confidence level.
* It is expected that this cube will be customized to support
  analysing exceptions/outliers.

For more information, see .

### IMA Multiplier

<Note>
  BCBS-457 Reference

  This section references [MAR99.17](https://www.bis.org/basel_framework/chapter/MAR/99.htm?inforce=20230101\&published=20200327#paragraph_MAR_99_20230101_99_17)
</Note>

The IMA Multiplier factors are held in a datastore so that they can be
fetched at query time and can be sensitive to jurisdiction. {productName} provides a post-processor that can take as input the number
of P\&L/VaR exceptions (see [P\&L Attribution Tests and Backtesting](#pl-attribution-tests-and-backtesting)) and return a multiplier factor as a measure.
