Drawdown Statistics

Summarize the drawdowns of each asset: how many there were, how deep they were on average, how much their depth varied, how long they took to reach the bottom and to recover, how much of the time the asset spent below its high and where the drawdown that is still open stands.

Where the drawdown table (get_drawdown_table) lists the largest drawdowns one by one, the statistics average over all of them, which is what Bacon (2008) uses to describe the drawdown risk of a fund: a manager with many shallow drawdowns that recover quickly and one with a few deep, long ones can have the same Maximum Drawdown. The Coverage is the share of the periods spent below the running high, and the Active measures describe the drawdown the asset is in at the end of the window: how deep it is, how long ago the high was and the bottom was, and how much of the decline has been made good.

The formula is as follows:

\[\operatorname{Drawdown}(t) = \frac{\operatorname{Wealth}(t)}{\max(1,\; \max(\operatorname{Wealth}(s) \;\text{for}\; s \leq t))} - 1\] \[\text{Average Drawdown} = \frac{\sum \;\operatorname{Drawdown}(j)}{d}\] \[\text{Drawdown Deviation} = \sqrt{\frac{\sum \;\operatorname{Drawdown}(j)^{2}}{n}}\] \[\text{Average To Trough} = \frac{\sum(t(\text{trough},\; j) - t(\text{peak},\; j))}{d}\] \[\text{Average To Recovery} = \frac{\sum(t(\text{recovery},\; j) - t(\text{trough},\; j))}{d_{\text{recovered}}}\] \[\text{Average Length} = \frac{\sum(t(\text{recovery},\; j) - t(\text{peak},\; j))}{d_{\text{recovered}}}\] \[\text{Average Recovery Ratio} = \frac{\frac{\sum(t(\text{recovery},\; j) - t(\text{trough},\; j))}{t(\text{trough},\; j) - t(\text{peak},\; j)}}{d_{\text{recovered}}}\] \[\text{Average Recovery Return} = \frac{\sum\left(\frac{\operatorname{Wealth}(\text{recovery},\; j)}{\operatorname{Wealth}(\text{trough},\; j)} - 1\right)}{d_{\text{recovered}}}\] \[\text{Coverage} = \text{the number of periods with Drawdown}(t) < \frac{0}{n}\] \[\text{Active Drawdown} = \operatorname{Drawdown}(T)\] \[\text{Active Duration} = T - t(\text{peak}),\;\; \text{Active Recovery Duration} = T - t(\text{trough})\] \[\text{Active Recovery Return} = \frac{1 + \operatorname{Drawdown}(T)}{1 + \operatorname{Drawdown}(\text{trough})} - 1\] \[\text{Active Recovery} = 1 - \frac{\operatorname{Drawdown}(T)}{\operatorname{Drawdown}(\text{trough})}\]

Where Drawdown(j) is the depth (the lowest Drawdown) of the j-th of the d drawdowns of get_drawdown_table, n the number of returns, d_recovered the number of drawdowns that recovered before the end of the window, T the last period and, for the Active measures, peak the last period at the high and trough the lowest Drawdown since. The lengths count periods (trading days for daily data) and Average Length (Days) the calendar days from peak to recovery. Average Drawdown is negative, Drawdown Deviation positive. The Active Recovery is the share of the decline from the peak to the trough that has been made good (0 at the trough, 1 back at the peak).

Also known as: drawdown summary, average drawdown, drawdown deviation, average drawdown length, average recovery time, average drawdown days, time under water, current drawdown, open drawdown, recovery duration ratio.

Example · META, NFLX · 2021 to 2025

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

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["META", "NFLX"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.risk.get_drawdown_statistics().T

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

How many drawdowns did Meta, Netflix and the S&P 500 have from 2021 to 2025, how deep were they on average and how long did they take to recover?

Which returns:

Parameters

get_drawdown_statistics accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe data frequency for returns. Options are: “daily”, “weekly”, “monthly”, “quarterly”, “yearly”. Defaults to “daily”."weekly"
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
show_columnsstr | list[str] | NoneThe 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

Share