BacktestFolio · Guides

Drawdown, volatility and recovery time

Volatility measures the swings. Drawdown measures the fall from the peak, how long it lasts and the recovery. How to read them with the Ulcer Index.

13 min read

CAGR, the compound annual growth rate, keeps only the end point, and the guide What is a portfolio backtest explains how to read the return of a period that has already ended. Here you look at the path, with two measures that answer different questions. Volatility measures how far returns move from the mean, both when they rise and when they fall, and so it describes the size of the swings. Drawdown measures the loss from the previous peak to the trough that follows, and maximum drawdown is the deepest fall of the period. Together with duration, drawdown says how much was lost and for how long the value stayed under that peak.

What volatility measures

The volatility of a backtest is the standard deviation of returns, scaled to a year. On the site, full-month returns are used, from month-end to month-end, over the whole period you chose. The sample standard deviation is calculated, the same one spreadsheets use with divisor n − 1, and multiplied by the square root of 12. That is the square-root-of-time rule: if the months are not correlated with each other, the dispersion of a year is about that of a month multiplied by the square root of the number of months, and for compound returns it remains an approximation. Standard deviation has no sign, so a month that sits 4 points above the mean enters the calculation the same way as a month that sits 4 points below.

An example with made-up numbers starts from twelve monthly returns: eleven months at +1% and one month at −11%. The mean is zero, because 11 and −11 cancel. The sum of squared deviations is 11 × 1² + 11² = 132, which divided by 11 gives 12, and the square root of 12 is the monthly standard deviation, 3.46% rounded to two decimals. Multiplied again by the square root of 12 it is exactly 12%, and that is the annualized volatility of this series.

If the month at −11% arrives when the value is already at the high of the period, that month’s drawdown is 11%, and to get back to the high you need a gain of 12.36%, that is 0.11 divided by 0.89. The annualized 12% describes the dispersion of all the months around the mean.

Depth, length and recovery time

Drawdown starts from the running high, the highest point touched up to that moment, and measures how far the value has fallen since: it is the stretch seen by someone who was already in. A drawdown of 40% means that, against that high, the value has reached 60, and someone who was at the peak and looked at the trough saw 40% disappear. Someone who entered earlier, or stayed after the trough, lived through a different piece of the same curve.

For the maximum drawdown of the period you chose, the formula is (trough − peak) / peak. Recovery time is how long it takes before the value sees that high again. Until it gets back, the episode stays open, and a few positive months at the end do not close the loss if the peak is still above. The length of the episode is counted from the peak, so it includes the fall and the climb from the trough.

The percentage needed to recover is larger than the one lost, and the gap grows as the fall gets deeper. If the value goes from 100 to 50 the loss is 50%, and to get back to 100 the capital has to double, which means a gain of 100%. The formula is the loss divided by what is left: 0.50 / 0.50 = 1. With a loss of 20% the recovery is 0.20 / 0.80 = 25%, while with a loss of 40% it is 0.40 / 0.60, two thirds, 66.7%.

The same volatility, different drawdowns

Standard deviation looks only at the list of returns, while drawdown also looks at the order in which they arrive, so two series with the same returns in a different sequence have the same volatility and can have a different maximum drawdown. This example is constructed too, with no costs and no contributions, on an index that starts at 100. The four returns are annual and made up, so the standard deviation is already on a one-year step and is not multiplied again by the square root of 12.

In the first order, +20%, −10%, +20%, −10%, the year-end values are 120, 108, 129.60 and 116.64. The intermediate peak is 129.60 and the trough that follows is 116.64, so the drawdown is −10%.

In the second order, +20%, +20%, −10%, −10%, the values are 120, 144, 129.60 and 116.64. The peak is 144, and from there two falls of 10% in a row take the value to 116.64, so the drawdown is −19%. Start and finish match, and so does the CAGR, but over the same four years the first path falls 10% from its high and the second 19%.

A second example holds the CAGR steady and lets volatility change, again with no costs and no contributions, and with the index starting at 100.

The first portfolio returns 10% every year for four years and at year-end is worth 110, 121, 133.10 and 146.41. The CAGR is 10%, because 1.10 to the fourth power is 1.4641. Every year closes positive, so the maximum drawdown and the standard deviation of the four returns are both zero.

The second returns +50%, −40%, +50% and +8.45% and at year-end is worth 150, 90, 135 and 146.4075, which to the cent is the same 146.41. Start and finish, once rounded to the cent, match. The CAGR on 146.4075 is 9.9995%, which at two decimals is still 10%.

The high of this second path is 150, at the end of the first year, and the trough that follows is 90, so the drawdown is (90 − 150) / 150 = −40%. From 90, to see 150 again, you need a gain of 66.7%. At the end of the third year the value is 135 and at the end of the period 146.41, still under 150, so that peak was not regained. The sample standard deviation of the four returns, 50, −40, 50 and 8.45, is 42.8%.

Sharpe, Sortino and Calmar are covered in the guide on risk-adjusted metrics.

Horizon, liquidity and selling in a fall

High volatility signals that the result can change a lot and quickly. The swing becomes a real loss when you sell while the price is down, even if it rises afterwards, and that happens more easily if you need the money soon. There is also liquidity risk: you may not be able to sell when you want, or you may manage it only at a much lower price. If you spend in euro and the instrument is in another currency, the exchange rate can reduce the result in euro even when the price in that currency rises.

Put recovery time next to your horizon: if you need the money in two years and the episode is still open after three, maximum drawdown is the fall that lands on you. If money leaves the portfolio every year, the order of returns weighs as much as the mean, and that is sequence risk, which the guide on the safe withdrawal rate follows in the phase when you withdraw.

Ulcer Index, depth and length together

Maximum drawdown stops at the worst point, while the Ulcer Index puts depth and length in the same number: it is the square root of the average, weighted by days, of squared drawdowns, expressed as a percentage. If two results have the same maximum drawdown, the one that stayed longer under the peak has the higher Ulcer, because every day under the high enters the average.

The Calmar, the ratio of CAGR to the absolute value of maximum drawdown, is read on the Analysis page, section Risk-Adjusted Returns, on the Plus and Pro plans and in that page’s demo.

VaR and CVaR look at the tail of returns over a horizon and leave aside the path from the high.

Both the swing measures and the fall measures depend on the years you put in the window. A quiet decade can leave out a fall that sits just past the start date, and the same portfolio, shifted by a few years, shows a different drawdown.

Maximum drawdown on daily and month-end closes

Maximum drawdown changes with how many closes you look at. With daily data, the peak and the trough are the days when the value really was at its highest and its lowest. With month-end closes only, twelve points a year are left: the peak becomes the highest month-end before the fall and the trough the lowest month-end after it, even when the extreme days fell in the middle of the month.

The Covid crash shows it clearly. On the S&P 500 Total Return index, the version of the S&P 500 that reinvests dividends, in US dollars, the high was on February 19, 2020 and the low on March 23: −33.8% in 33 calendar days. On month-end closes the same episode runs from the end of December 2019 to the end of March 2020 and stops at −19.6%. Day by day the index lost a third of its value. At month-end, a fifth is what shows.

S&P 500 with dividends reinvested, drawdown from December 2019 to June 2020Day by daylow −33.8%Month-endlow −19.6%
S&P 500 Total Return index, in US dollars. Past performance is not a guarantee of future results.

In monthly data the fall gets shorter at both ends. The February 19 high sits in the middle of the month, and by the end of February the index had already dropped, so the monthly peak stays at the December close, which is lower. After March 23 the index won back part of the loss before the month was out, and the last close of March is the only point of that month that monthly data keeps. The real low does not show up anywhere.

For anyone reading a backtest, the difference touches the fall and how long it lasts. On daily closes, maximum drawdown is always at least as deep as on the month-ends of the same series, because the month-ends are a subset of the days, and recovery time is counted to the day the value gets back to the peak. Volatility stays out of this: on the site it is always calculated on returns from month-end to month-end, so a crash like March 2020 enters the calculation only for the part still there at month-end.

How to read them in BacktestFolio

On the Backtest page, after the calculation, the Portfolio Metrics table shows Std. Deviation (Ann.), Max Drawdown and Max Recovery Time. That time is in days and runs from the day of the peak to the day the value returns to the peak, or, if by the end of the period the peak has not been regained, to the last day of the series. The length in months in the drawdown table uses the same span, from the peak to the end of the episode.

Further down, the Risk Analysis section shows the Drawdowns chart, the curve of the fall against the running high, and the Top 10 Drawdowns table. Each row of the table has a timeline with Peak, Bottom and Recovery, plus depth and Duration, and stays Ongoing if there is no recovery. In the same section are the Ulcer Index and the Value at Risk (VaR) table, with VaR and CVaR at 95% and at 99% on horizons from one month to ten years. They are estimated on the historical returns of each window without annualizing them, and they show up as a negative return.

To read them together I start from volatility, which says how much the path swung, then I look at maximum drawdown, recovery time and the length of the worst rows. With the Ulcer Index I see whether the fall was a single point or a long stay under the peak.

The frequency of the data changes the drawdown too. Where the engine has daily prices, the trough can fall inside the month. Where the years are rebuilt from an index that only has month-end data, the drawdown sees those month-ends, and a fall that closed before the end of the month does not make it into the maximum drawdown. Volatility, on the site, stays calculated on full months in both cases.

The note under the metrics says that standard deviation, Sharpe and Sortino use the monthly returns of the whole backtest period, the same frequency as ETF factsheets. The GIPS 2020 standard, provision 4.A.1.j of the CFA Institute’s GIPS Standards for Firms, asks for the annualized ex-post standard deviation of monthly returns for the previous three years, at each year-end, for the composite and for the benchmark, without setting the formula.

With DCA, drawdown and recovery time stay those of the portfolio return and contributions do not shorten them. The effect of the money added, including the maximum loss on the amount paid in, is kept separate in the DCA effect box.

The metrics table and the risk section show up with the backtest result on the Free plan too, which stops the window at 10 years and leaves the 10-year column of the VaR table locked.

Frequently asked questions

What is the difference between drawdown and volatility?

Volatility measures how far returns move from the mean, up and down, while drawdown measures the loss from the peak to the trough that follows, and maximum drawdown is the worst fall of the period. With the same returns in a different order, volatility stays the same and the drawdown can change.

Are risk and volatility the same thing?

Volatility measures the size of the swings. A loss becomes real when you sell during the fall, for example because you need the money before the value sees the peak again. The risk that applies to you therefore also depends on your horizon and on being able to wait for the recovery without having to get out.

What is maximum drawdown and how is it calculated?

It is the deepest fall from the running high to the next trough, and it is calculated as (trough − peak) / peak. A drawdown of 40% takes the value from 100 to 60 against that peak.

How do you tell how deep a fall you can live with?

Put maximum drawdown and recovery time next to the date you need the money and next to the cash you keep outside the portfolio. The backtest gives you those two numbers on the portfolio you entered.

How do you lower the volatility of a stock portfolio?

It depends on how the pieces move: if they do not move together, a low correlation pulls the volatility of the total below the weighted average of the parts. In the per-instrument table you read the standard deviation of each row, and in Portfolio Metrics the one for the total, over the same period.

Does a 50% fall recover with a 50% rise?

From 100 to 50, a 50% rise takes you to 75. To get back to 100 the value has to double, so the rise required is 100%.

How do you read the loss and the length of a fall together?

On your result, read maximum drawdown for the depth, recovery time and the length of the rows for the time, volatility for the size of the swings and the Ulcer Index for depth and length together. Then compare that length with the date you need the money.

See also


The content on this page is for educational purposes only and does not constitute financial advice, investment recommendation or promise of return. See the Financial Disclaimer.