Oisigma/Blog
Research & notes

How Long Do Drawdowns Last? A Free TradingView Histogram

How long a drawdown lasts is a separate question from how deep it goes. A sharp fall can be recovered within weeks, and a shallow one can sit below its old peak for years. There is no single answer to the question in the title, because it depends on the market, the timeframe and the history loaded. What can be done is to count.

We have published a free, open-source indicator on TradingView that does the counting: the Drawdown Duration Histogram. It measures how many chart bars each completed drawdown lasted and draws the result as a histogram. It is descriptive. It gives no buy or sell signals and says nothing about when the current drawdown ends.

Three lengths for every drawdown

An episode starts at a peak, passes through its lowest point, and ends on the bar that sets a new peak. A dip inside a larger decline is not a separate episode, because it never starts from a new peak.

The indicator records three lengths for each episode, all in chart bars. Total runs from the peak to the bar that sets the new peak. Falling runs from the peak to the lowest point. Recovering runs from the lowest point to the new peak. The first is the sum of the other two.

The split matters because one total can hide very different shapes. A fall that takes five bars and a recovery that takes two hundred is a different experience from the reverse, and the total alone does not distinguish them. One setting chooses which of the three lengths the histogram shows. The summary table always shows all three.

By default, episodes whose deepest point is shallower than 1% are left out of the counts and the statistics, and peaks and troughs use closing prices. An option switches to highs and lows.

Reading the bars

The horizontal axis is length in bars and the height of each bar is the number of completed episodes in that bin. The default bins end at 5, 10, 20, 50, 100, 250 and 500 bars, with one more for anything longer. On a daily chart that reads as about a week, two weeks, a month, a quarter, half a year, a year, two years, and beyond.

The bins get wider to the right because short drawdowns are numerous and long ones are few. That has a consequence for reading the chart: the bars are counts per bin, not a density. A tall bar over a wide bin does not mean that length is common per bar of width.

The label above each bar gives the reading that does not depend on bin width. Its last line is a threshold and a share. Taking the illustration used in the script's own tooltip, a label of "21+: 35%" above the 21 to 50 bin means that 35% of completed drawdowns lasted 21 bars or more. It is not the share of drawdowns inside that bin, and the first bin always reads 100%.

The summary table

The table has a column for each of the three lengths. Its rows give the median, the 90th percentile and the longest among completed episodes, followed by two rows for the open drawdown: its length so far, and the share of completed episodes that lasted at least as long. That share is computed from the full list of episodes, not from the bins.

The open drawdown

The unfinished drawdown is kept out of every count. The bin holding its length so far is drawn in a second color, and its three lengths appear in the table.

Those figures are provisional in a specific way. Total can only grow. If price sets a new low, Falling jumps to the new low's bar and Recovering resets to zero, because the recovery is now measured from a later point. A drawdown that looked like it was twenty bars into its recovery can be back at the start of one.

A share of episodes is not a share of time, or a forecast

The row "share lasting at least as long" is the one most open to misreading. Suppose it reads 10%. That says one in ten completed episodes on this chart lasted at least as long as the open one has so far. It does not say there is a 10% chance of anything. The open episode is not a fresh draw from the list: it has already lasted this long, and the list says nothing about what it does next.

Counting by episode also understates how much time long drawdowns take up. A constructed example, not market data: nine episodes of 5 bars and one of 255 bars make ten episodes. Nine in ten were short. But the long one accounts for 255 of the 300 bars spent below a peak, which is 85% of the time. A market can have mostly short drawdowns and still spend most of its time under water inside a long one.

What it does not show

Lengths are in chart bars, so every figure changes with the timeframe, and the default bins suit a daily chart. The statistics cover only the loaded history. Long drawdowns are rare, so the right-hand bins and the 90th percentile rest on few episodes. Dividend adjustment changes the price series and therefore the peaks.

All of the loaded history goes into one distribution, with calm and turbulent periods mixed. Large moves have tended to arrive in clusters, as described in what is volatility clustering. An option restricts the count to dates after a chosen start.

The histogram sits at the right edge of the visible chart and follows it when the chart is scrolled or zoomed. The numbers always describe the whole loaded history, not the part on screen. The longest drawdown on record is only the longest so far, and past behavior is not a guarantee of future results.

How it relates to the expected range

The histogram is not part of the Behavioral Transform Model. It is a separate, free script with open source code, and we have published no research on drawdowns. It sits beside the Drawdown Severity Histogram, which counts the same episodes by depth.

The expected range describes something else: how far price has typically moved over one bar, drawn around the prior close, as set out on How It Works. The working paper tests how often the next close landed inside that range historically. It validates the range's calibration, not the profitability of any use of it, and it makes no statement about recoveries. A range for one bar has no clock for a decline that runs across hundreds. Neither tool has been shown to improve anyone's results.

The takeaway

Depth and length are different properties of a drawdown, and length itself has two parts. The histogram counts them on the chart in front of it: how long declines lasted, how the time split between falling and recovering, and how the unfinished one compares so far. The comparison describes the record. It does not date the recovery.

Frequently asked questions

Is drawdown duration measured in trading days or calendar days? It is measured in chart bars. On a daily chart of a stock or index one bar is one trading day, so weekends and holidays are not counted. On a market that trades every day, a daily bar is a calendar day, and on a weekly chart each bar is a week.

Can the bins be changed? Yes. The bin limits are a list of whole numbers separated by commas, and the script accepts between 1 and 40 of them. A weekly or intraday chart usually needs its own list, because the defaults were chosen to read as familiar periods on a daily chart.

Do deeper drawdowns always take longer to recover? The indicator does not answer that. It summarizes lengths without pairing them with depths, and Oisigma has published no result on the relationship. The only depth it uses is the minimum-depth filter that decides which episodes are counted.

Does it count the same episodes as the Drawdown Severity Histogram? Both scripts use the same episode logic and the same default 1% minimum depth. On the same chart with the same price mode, minimum depth and start date they count the same completed episodes. One sorts them by depth and the other by length.

The Drawdown Duration Histogram is free on TradingView. The Behavioral Transform Model is Oisigma's separate indicator, which draws a calibrated expected range on any TradingView chart, with what was measured and where it falls short published on the Proof page. You can start a free 30-day trial and see how the range sits on the markets you follow.

Now, your charts

Curious how this looks on your charts?

Try it free for 30 days and see the range update as new bars print, on whatever symbols and timeframes you actually trade.

Start your free trial
Complete checkout
Read the paper

30 days free, then $15/mo. Cancel anytime from your account.

Pick up where you left off.