Entropic Drawdown at Risk Contribution
The Entropic Drawdown at Risk Contribution splits the Entropic Drawdown at Risk (EDaR) of the portfolio, the Entropic Value at Risk of Ahmadi-Javid (2012) applied to the drawdowns of the uncompounded cumulative return, among the assets. It lies between the Conditional Drawdown at Risk and the maximum drawdown.
The formula for the Entropic Drawdown at Risk Contribution starts from the uncompounded cumulative return \(Y_{t}\) of the portfolio, with \(w_{i}\) the weight and \(r_{i , s}\) the return of asset i of the N assets in period s, its drawdowns \(D_{t}\) below the running peak \(P_{t}\) (the highest Y up to t, and at least zero) and their entropic bound, with E the average over the periods, alpha the tail probability and \(z_{0}\) the value of \(z > 0\) at which the bound is lowest:
\[Y_{t} = \sum_{s=1}^{t} \sum_{i=1}^{N} w_{i} \cdot r_{i,s}\] \[D_{t} = P_{t} - Y_{t}\] \[\text{EDaR} = z_{0} \cdot \ln\left(\frac{\mathbb{E}\left[\exp\left(\frac{D_{t}}{z_{0}}\right)\right]}{\alpha}\right)\]The marginal contribution \(\text{MC}_{i}\) follows from central differences of EDaR(w) at the weights w, with \(e_{i}\) the vector with 1 for asset i and 0 elsewhere and h a small step, and the risk contribution \(\text{RC}_{i}\) is the weight times it:
\[\text{MC}_{i} = \frac{\text{EDaR}(w + h \cdot e_{i}) - \text{EDaR}(w - h \cdot e_{i})}{2 \cdot h}\] \[\text{RC}_{i} = w_{i} \cdot \text{MC}_{i}\]The contributions add up to the EDaR. The deepest drawdowns weigh exponentially more than the others, so the assets behind the worst falls take most of it.
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: EDaR contribution.
In the Finance Toolkit this is get_risk_contributions with risk_measure="entropic_drawdown_at_risk", 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="entropic_drawdown_at_risk", weights={"AAPL": 0.4, "MSFT": 0.3, "JNJ": 0.2, "XOM": 0.1})
| Parameter | Type | Description | Example |
|---|---|---|---|
weights | dict[str, float] | None | The weight per asset; weights that sum to less than one hold the rest, \(1 - \Sigma w\), as cash at the risk free rate, and weights above one borrow the difference at it (cash has no risk and contributes nothing). Defaults to None, which uses the latest weights of the Portfolio the Toolkit came from, or equal weights. | None, which uses the latest weights of the Portfolio the Toolkit came from, or equal weights |
risk_measure | str | The risk measure. Options are: “volatility” (Volatility Contribution, of the covariance estimate), “cvar” (Conditional Value at Risk Contribution, the expected shortfall), “semideviation” (Semideviation Contribution, below a return of zero), “mad” (Mean Absolute Deviation Contribution), “cdar” (Conditional Drawdown at Risk Contribution), “var” (Value at Risk Contribution, historical), “evar” (Entropic Value at Risk Contribution), “worst_realization” (Worst Realization Contribution, the largest loss), “gini_mean_difference” (Gini Mean Difference Contribution), “tail_gini” (Tail Gini Contribution), “lower_partial_moment” (Lower Partial Moment Contribution, first order below zero), “kurtosis” (Kurtosis Contribution, the square root of the fourth central moment), “maximum_drawdown” (Maximum Drawdown Contribution), “average_drawdown” (Average Drawdown Contribution), “drawdown_at_risk” (Drawdown at Risk Contribution), “entropic_drawdown_at_risk” (Entropic Drawdown at Risk Contribution), “ulcer_index” (Ulcer Index Contribution). Defaults to “volatility”. | "volatility" |
alpha | float | The tail probability of the tail measures (the expected shortfall, CDaR, VaR, EVaR, Tail Gini, Drawdown at Risk and EDaR), e.g. 0.05 for the worst 5% of periods or drawdowns. Defaults to 0.05. | 0.01 |
period | str | The frequency of the returns. Options are: “daily” (daily returns), “weekly” (weekly returns), “monthly” (monthly returns), “quarterly” (quarterly returns), “yearly” (yearly returns). Defaults to “daily”. | "weekly" |
covariance | str | The estimator of the covariance matrix. The shrinkage and denoised estimators stabilize the weights when there are many assets compared to the number of periods. Options are: “sample” (the sample covariance, ddof=1), “ledoit_wolf” (shrunk towards the scaled identity, Ledoit and Wolf, 2004), “ledoit_wolf_constant_correlation” (shrunk towards the average correlation, Ledoit and Wolf, 2004), “ledoit_wolf_single_factor” (shrunk towards the covariance that the benchmark as a single factor implies, Ledoit and Wolf, 2003), “oas” (Oracle Approximating Shrinkage, Chen et al., 2010), “shrunk” (a fixed 10% towards the scaled identity), “semicovariance” (the co-movement below a zero return, Estrada, 2008), “exponential” (exponentially weighted, recent periods weigh most, RiskMetrics), “denoised” (the eigenvalues of the correlation matrix that random returns could produce averaged, Laloux et al., 2000), “denoised_spectral” (those eigenvalues set to zero), “denoised_shrink” (the noise correlations shrunk towards their diagonal, López de Prado, 2020), “gerber” (co-movements beyond half a standard deviation, Gerber et al., 2022), “factor” (the covariance of the Fama and French five factor model with OLS loadings, Fama and French, 1993), “minimum_covariance_determinant” (the reweighted covariance of the half of the periods with the smallest covariance determinant, robust to outliers, Rousseeuw and Van Driessen, 1999), “jlogo” (the sparse inverse covariance on the TMFG planar graph of the correlations, Barfuss et al., 2016), “geodesic” (10% towards the scaled identity along the geodesic of the positive definite matrices, Bhatia, 2007), “regime_adjusted_ew” (exponentially weighted with a half-life of 40 periods, rescaled by the recent realized against predicted risk, Paleologo, 2025), “nercome” (eigenvectors from one part of the periods and the variances along them from the other, averaged over random splits, Lam, 2016), “ccc_garch” (the next-period covariance of GARCH(1, 1) volatilities with constant correlations, Bollerslev, 1990), “mm” (the robust MM-estimator, Maronna et al., 2019), “rocke” (Rocke’s robust S-estimator, Maronna et al., 2019). Defaults to “sample”. | "sample" |
covariance_span | int | The span in periods of the exponentially weighted covariance; the weight of a period halves after about span / 2.9 periods. Defaults to 180. | 180 |
include_benchmark | bool | Whether to include the benchmark as an asset. Defaults to False. | True |
rolling | int | None | The number of periods in a trailing window that moves through time, e.g. 252 for a year of daily returns: the volatility contributions on the sample covariance of each window, one row per period, with the weights held fixed. Only for the volatility with the sample covariance. Defaults to None, which uses every period at once. | 4 |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the Toolkit’s rounding. | 2 |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |
Which returns:
| Asset | Weight | Marginal Contribution | Risk Contribution | Percentage Contribution |
|---|---|---|---|---|
| AAPL | 0.4 | 0.2622 | 0.1049 | 0.6498 |
| MSFT | 0.3 | 0.2282 | 0.0685 | 0.4242 |
| JNJ | 0.2 | 0.0011 | 0.0002 | 0.0013 |
| XOM | 0.1 | -0.1217 | -0.0122 | -0.0754 |
| Total | 1.0 | 0.1614 | 1.0000 |
5 rows
References
- Paper Ahmadi-Javid, A. (2012). “Entropic Value-at-Risk: A New Coherent Risk Measure.” Journal of Optimization Theory and Applications, 155(3), 1105-1123.