Skip to main content
The purpose of the sensitivity ladder is to increase PnL calculation accuracy by computing the sensitivities at different market configurations. It is used to compute PnL Explain and the Taylor VaR.

Input data

The system is fed with a table of sensitivities shifted from the current market value. For instance:

Calculation theory

The purpose is to calculate the PnL based on the delta ladder for the underlying market price. The ladder is based on price shift, so for PnL explain we first convert the market data pair into a shift.

For PnL explain

The conversion between market data and shift is done with the following formula: shiftd=ShiftFromMD(MDd,MDd1)shift_d=\mathrm{ShiftFromMD}(MD_d,MD_{d-1}) This formula is defined by the IPnLExplainFormulaProvider::getShiftFromMDFormula method bean, based on the mr.sensi.rules.<sensitivity-type>.pnl-explain property.
To keep consistency between ladders and standard sensitivities across PnL Explain and Taylor VaR, the formula provider bean must ensure that PnlExplain(sensi,MDd,MDd1)=VaRExplain(sensi,ShiftFromMD(MDd,MDd1))\mathrm{PnlExplain}(sensi,MD_d,MD_{d-1})=\mathrm{VaRExplain}(sensi,\mathrm{ShiftFromMD}(MD_d,MD_{d-1}))
  • PnlExplain is provided by IPnLExplainFormulaProvider::getPnlExplainFormula
  • VaRExplain is provided by IPnLExplainFormulaProvider::getVaRExplainFormula
  • ShiftFromMD is provided by IPnLExplainFormulaProvider::getShiftFromMDFormula

Ladder computation

We assume that P(shift)=P(0)+0shiftdelta(x)xP(shift)=P(0)+\int_0^{shift}delta(x)\cdot \partial x. As we are on a discrete distribution (the ladder), this will be transformed into: PnL(shift)=P(shift)P(0)=shifti]0,shift]shifti1shiftidelta(x)xPnL(shift)=P(shift)-P(0)=\sum_{shift_i\in]0,shift]}\int_{shift_{i-1}}^{shift_i}delta(x)\cdot \partial x So it will lead to the integration of the Red surface:

Ladder integration parts

To compute the shifti1shiftidelta(x)x\int_{shift_{i-1}}^{shift_i}delta(x)\cdot \partial x part of the formula, several methodologies can be used depending on the way the delta ladder has been computed. The Ladder module will call the partial integration computation for each ladder step. By default, Atoti Market Risk provides the following ways to compute this partial integration:

Adding a new formula

To add a new formula, create a new Extended Plugin that complies with the signature:
The formula has to comply with the ILadderFormula interface. The function will be called and the result summed for each ladder step until the target shift is reached.

Implementation

Input files

Ladder pillar definition

For details on this input file format, see Ladder Definition.

Datastore

The ladder definition is stored as is in a standalone store. The ladder sensitivities are stored in the TRADE_SENSITIVITIES datastore. Each line is split by tenor, maturity, and moneyness according to the scalar model of data.

Cube

The Ladder column is populated by native measures in the Sensitivity Cube. The Cube also has an analysis dimension on the ladder definition, so with an Expand post-processor you can view the content of the ladder.

Calculation logic

The logic is customized with the properties under mr.sensi.rules..pnl-explain. For details on these properties, see Sensitivities module properties. The InputSelector bean is managing the way the Ladders are applied. The function IInputSelector::getFormulaInput(@NonNull LadderContext context, @NonNull String sensitivityKind, @NonNull String sensitivityName, @NonNull String riskClass) defines whether the Ladder methodology is applied following the SensitivityInput value by reading the ladder properties: The function IInputSelector::getLadderFormula(@NonNull String sensitivityKind, @NonNull String sensitivityName, @NonNull String riskClass) will return the formula used for ladders depending on the selected methodology defined on the ladder-formula properties.