Entropic Drawdown at Risk (EDaR)
Calculate the Entropic Drawdown at Risk (EDaR) of an investment portfolio or asset’s returns: the tightest entropic bound on the deep drawdowns, between the CDaR and the Maximum Drawdown.
The Entropic Drawdown at Risk is the historic Entropic Value at Risk (the historic method of get_entropic_value_at_risk) of the drawdown series: the tightest bound on the drawdowns that follows from the Chernoff inequality. It is at least as severe as the Drawdown at Risk and the Conditional Drawdown at Risk at the same alpha and at most as severe as the Maximum Drawdown, and as a coherent risk measure it is the drawdown counterpart of the EVaR in Cajas’ (2021) entropic portfolio optimization. It weighs the deepest drawdowns more than the CDaR does, without resting on the single worst moment as the Maximum Drawdown does.
The formula is as follows (with the default alpha of 0.05):
\[\operatorname{Wealth}(t) = \prod(1 + \operatorname{Return}(s)) \;\text{for}\; s \leq t\] \[\operatorname{Drawdown}(t) = \frac{\operatorname{Wealth}(t)}{\max(1,\; \max(\operatorname{Wealth}(s) \;\text{for}\; s \leq t))} - 1\] \[\text{EDaR} = - \text{inf over}\; z > 0 \;\text{of}\; z \cdot \ln\left(\frac{\operatorname{mean}\left(\exp\left(- \frac{\operatorname{Drawdown}(t)}{z}\right)\right)}{\alpha}\right)\]Every period counts towards the drawdown distribution, including those at a high (a drawdown of 0), and Wealth starts at 1, so a decline from the start of the window counts. The bound is minimized over the risk aversion z numerically (on the logarithm of 1 / z, with scipy’s brentq). Without compounding the drawdowns are measured on the summed returns instead, as an absolute decline from their peak (Drawdown(t) = Sum(t) - max(0, max(Sum(s) for s <= t)), with Sum(t) = Σ Return(s)). The result is a negative decimal.
Also known as: EDaR, entropic drawdown, uncompounded EDaR, absolute EDaR.
Example · ^STOXX50E, ^N225, ^GSPC · 2021 to 2025
Install the Finance Toolkit with pip install financetoolkit -U, then call get_entropic_drawdown_at_risk:
from financetoolkit import Toolkit
toolkit = Toolkit(
["^STOXX50E", "^N225", "^GSPC"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.risk.get_entropic_drawdown_at_risk(period="yearly", within_period=True)
Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:
What was the 95% entropic drawdown at risk of the Euro Stoxx 50, the Nikkei 225 and the S&P 500 in each year from 2021 to 2025?
Which returns:
| Item | ^STOXX50E | ^N225 | ^GSPC | Benchmark |
|---|---|---|---|---|
| 2021 | -0.0676 | -0.1046 | -0.0453 | -0.0446 |
| 2022 | -0.2426 | -0.1427 | -0.2474 | -0.2382 |
| 2023 | -0.0947 | -0.0864 | -0.0902 | -0.0874 |
| 2024 | -0.0911 | -0.2002 | -0.0702 | -0.0695 |
| 2025 | -0.1374 | -0.1840 | -0.1606 | -0.1592 |
5 rows
Parameters
get_entropic_drawdown_at_risk accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
period | str | The data frequency for returns. Options are: “daily”, “weekly”, “monthly”, “quarterly”, “yearly”. Defaults to “daily”. | "weekly" |
alpha | float | The tail probability for the EDaR calculation (e.g., 0.05 for the 95% confidence level). Defaults to 0.05. | 0.01 |
compound_returns | bool | Whether to compound the returns into the wealth path the drawdowns are measured on, or to sum them (absolute drawdowns). Defaults to True. | True |
within_period | bool | Whether to calculate the EDaR within the specified period or for the entire period. Thus whether to look at the EDaR within a specific year (if period = ‘yearly’) or look at the entirety of all years. Defaults to False. Note that this requires intraday data when period = ‘daily’, since a single day only nests observations when intraday data was fetched. | True |
rolling | int | The rolling window size to use for the calculation. If set, the EDaR is calculated over a rolling window of this many periods across the full return history instead of per period, every window starting from a wealth of 1. At least 2. Defaults to None. | 4 |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the EDaR values over time. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |
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 |
References
- Paper Cajas, D. (2021). “Entropic Portfolio Optimization: a Disciplined Convex Programming Framework.” SSRN Electronic Journal.
- Paper Ahmadi-Javid, A. (2012). “Entropic Value-at-Risk: A New Coherent Risk Measure.” Journal of Optimization Theory and Applications, 155(3), 1105-1123.
- Library Referenced against skfolio’s edar
- Library Referenced against Riskfolio-Lib’s EDaR_Rel (compounded)
- Library Referenced against Riskfolio-Lib’s EDaR_Abs (uncompounded)