Conditional Value at Risk Contribution

The Conditional Value at Risk Contribution splits the expected shortfall (CVaR) of the portfolio, the average loss in its worst periods, among the assets. The expected shortfall doubles when the weights double, and its derivative by the weight of an asset is the average loss of that asset in the worst periods of the portfolio (Tasche, 2000; Scaillet, 2004), so the contributions show which assets lose when the portfolio does.

The formula for the Conditional Value at Risk Contribution starts from the returns \(X_{t}\) of the portfolio in each of the T periods, with \(w_{i}\) the weight and \(r_{i , t}\) the return of asset i of the N assets:

\[X_{t} = \sum_{i=1}^{N} w_{i} \cdot r_{i,t}\]

It weighs the periods by the tail probabilities \(p_{t}\) of Rockafellar and Uryasev (2002): 1 / (alpha * T) for each of the floor(alpha * T) lowest returns of the portfolio, what is left of a total of 1 for the next one and zero for the others, with alpha the tail probability:

\[\text{CVaR} = -\sum_{t=1}^{T} p_{t} \cdot X_{t}\]

The marginal contribution \(\text{MC}_{i}\) is the same average of the returns of asset i, and the risk contribution \(\text{RC}_{i}\) the weight times it:

\[\text{MC}_{i} = -\sum_{t=1}^{T} p_{t} \cdot r_{i,t}\] \[\text{RC}_{i} = w_{i} \cdot \text{MC}_{i}\]

The contributions add up to the expected shortfall per period (e.g. daily), not annualized. An asset can have a modest volatility contribution and a large one here when it falls together with the rest in the worst periods. Only the tail share of the periods enters, so the contributions move more from one sample to the next than those of the volatility.

The risk contribution of an asset is its weight times its marginal contribution, the change in the risk of the portfolio from a small increase in that weight. Litterman (1997) used this decomposition to find the hot spots of a portfolio, the positions that add most to its risk, and the hedges that reduce it. For a risk measure that doubles when every weight doubles, Euler’s theorem makes the contributions add up to the risk of the portfolio (Tasche, 2000), so they split that risk among the assets: the Euler allocation. A large position in a calm asset can contribute less risk than a small one in a volatile asset, and an asset that tends to gain when the portfolio loses contributes a negative amount, as it hedges the rest. The percentage contribution, the risk contribution over the risk of the portfolio, compares directly with the weight: an asset whose share of the risk lies far above its share of the capital is a hot spot.

Also known as: component CVaR, component expected shortfall, CVaR contribution.

In the Finance Toolkit this is get_risk_contributions with risk_measure="cvar", the same function as Risk Contributions.

Example · AAPL, MSFT, JNJ, XOM · 2021 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_risk_contributions:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "JNJ", "XOM"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.portfolio.get_risk_contributions(risk_measure="cvar", weights={"AAPL": 0.4, "MSFT": 0.3, "JNJ": 0.2, "XOM": 0.1})

Which returns:

References

  • Paper Tasche, D. (2000). “Conditional Expectations as Quantile Derivatives.” Working paper, arXiv math/0104190.
  • Paper Scaillet, O. (2004). “Nonparametric Estimation and Sensitivity Analysis of Expected Shortfall.” Mathematical Finance, 14(1), 115-129.
  • Paper Rockafellar, R. T. and Uryasev, S. (2002). “Conditional Value-at-Risk for General Loss Distributions.” Journal of Banking & Finance, 26(7), 1443-1471.
  • Library Referenced against Riskfolio-Lib’s Risk_Contribution (Conditional Value at Risk Contribution)
Share