WHS

The Market Risk Accelerator provides the “Weighted” variations of the VaR and ES measures which implement the WHS - exponentially weighted historical simulation approach.

References

The implemented algorithm is described in Section 3 of the following paper:

Implementation

  1. The default value for the decay parameter $\lambda$ is 0.94, it is configured in the mr-config.properties and can be overridden using the WeightedVaRLambda context value.
  2. Each historical scenario is assigned a weight, computed based on the $\lambda$ value and the number of elapsed business days.
  3. The simulated PL input data, which can be displayed using the PnLVectorExpand measure, is ranked from the worst loss to the highest profit.
  4. The scenario weights are accumulated starting from the worst loss and further along the scenarios ranked by PL.
  5. The Weighted VaR is obtained by linearly interpolating the PLs of the ranked scenarios where accumulated weights contain the desired VaRConfidenceLevel.
  6. The Weighted ES is obtained by averaging the PL across scenarios below the Weighted VaR. Please note however, that the confidence level for the Weighted ES is controlled by a different context value - ESConfidenceLevel.

See also