atoti
Published in

atoti

How to explain non-additive measures, Part 3: order-statistics decomposition

Interactive decomposition with atoti

This article is a part of a series. Check also: Part 1: Pro-rata allocation for a generic example of allocation into additive components and Part 2: Marginal contribution for an incremental analysis example. In this post, we’ll explore a technique that is handy for historical VaR decomposition — the “LEstimated VaR”, aka “Component VaR”.

If you wish to read what non-additive measures are and why we may want to have them decomposed — please refer to the Pro-rata allocation post.

The name “LEstimated VaR” refers to the term “L-estimator” — a linear combination of order statistics — as we’ll be zooming in the tail scenario, that has been identified as the VaR scenario for the parent portfolio to break down the portfolio’s VaR into the sum of contributions by sub-portfolios.

Such contribution analysis calculations are very hard, if not impossible to do with common data aggregation tools but easy with atoti using “parent” and “sibling” data relationships which allows you to navigate any hierarchy of data and implement your on-the-fly allocation rules.

Solution: LEstimated VaR

In finance, the firm-level risk measure needs to be attributed down to desks in an additive manner to identify top risk drivers and allocate costs. VaR measure is non-additive, or more specifically it is sub-additive:

On the pivot table below you can see, that VaR computed at a portfolio level — Developed Markets — is smaller than the sum of sub-portfolio-level VaRs.

In this post, we create a measure — LEstimated VaR — which shows the simulated PL for the tail scenario, that has been identified as the VaR scenario for the parent Portfolio, hence allowing to break parent Portfolio’s VaR into additive risk contributions by sub-portfolios.

UPDATE: The GIFs and code snippets in this article are based on an older version of atoti. We have released much smoother and even more functional dashboards and widgets with the latest version of atoti. Check out this link to see the documentation of the latest version of atoti.

Python implementation

The algorithm for computing LEstimated VaR contributions is three-step:

* identify the VaR scenario of a portfolio,

* propagate this scenario down to the immediate children portfolios,

* lookup simulated PL for the scenario per scenario.

To identify the VaR scenario we’ll be using atoti’s function n_lowest_indices:

Having obtained the VaR scenario at the parent level, we’ll apply it to filter the historical PL vector and obtain the LEstimated VaR:

Since the historical PL scenario behind the LEstimated VaR for the sub-portfolios the same as the scenario used by a portfolio’s VaR, the contributions add up exactly to the VaR value:

If a hierarchy has multiple levels — for example, as in a banks’ organizational hierarchy — the allocation of the top-level values can apply every time the user expands it.

Conclusion

In this post, we discussed how to use parent and sibling relationships in atoti to implement contributory measures and explained non-additive measures. I hope the described techniques can help solve your analytical needs.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Anastasia V Polyakova

Anastasia V Polyakova

115 Followers

Anastasia is a quantitative financial analyst and risk management practitioner experienced in modern data analysis tools and frameworks.