How each number is computed

The exact definition of total return, CAGR, volatility, Sharpe, max drawdown, hit rate and turnover as our engine calculates them.

On this page7 sections
  1. 1Total return
  2. 2CAGR
  3. 3Volatility
  4. 4Sharpe ratio
  5. 5Max drawdown
  6. 6The year table and hit rate
  7. 7Turnover, costs and cash

All figures come from one daily series: the value of the portfolio at each session's close, starting at 100. Prices are daily closes adjusted for splits and dividends, so returns are total returns.

Total return

total return = final value / starting value − 1

A portfolio that goes from 100 to 250 has a total return of 150%.

CAGR

Compound annual growth rate: the steady yearly return that would turn the starting value into the final value over the same time.

CAGR = (final value / starting value) ^ (1 / years) − 1

Years is calendar days between the first and last date, divided by 365.25.
Worked
  1. 100 grows to 250 over 8 years.
  2. 250 / 100 = 2.5
  3. 2.5 ^ (1/8) = 1.1214
  4. CAGR = 12.14% a year

We show no CAGR for a record shorter than one year. Annualising three good months produces a number that means nothing. Try it yourself with the CAGR calculator.

Volatility

How much the daily returns vary, scaled to a year.

volatility = standard deviation of daily returns × √252

252 is the usual number of trading sessions in a year. We use the sample standard deviation and need at least 20 daily returns.

Sharpe ratio

Return earned per unit of volatility.

Sharpe = (mean daily return / standard deviation of daily returns) × √252

The risk-free rate is taken as 0%. We need at least 60 daily returns to show it.
  • Because we use a 0% risk-free rate, our Sharpe is a little higher than one computed against Treasury bills. Compare ours with ours, not with a figure from elsewhere.
  • Sharpe treats upside and downside swings the same. A strategy that jumps up a lot is penalised for it.
  • Above 1 over a long period is good for a stock strategy. A figure above 2 on a long backtest is more often a sign of a flaw than of skill.

Max drawdown

The largest fall from a previous high to a later low, over the whole record.

drawdown on a day = value that day / highest value so far − 1

Max drawdown is the most negative of these. We also keep the date of the peak and the date of the trough.
Worked
  1. Value climbs to 180, falls to 117, later reaches 260.
  2. 117 / 180 − 1 = −35%
  3. Max drawdown: −35%, even though the record ends at a new high.

A drawdown needs a larger gain to recover than the fall that caused it. See the drawdown recovery calculator.

The year table and hit rate

  • Each row is the strategy and the comparison over one calendar year.
  • Hit rate is the number of years the strategy beat the comparison, counting complete years only when there are any.
  • Best year and worst year are taken from the same table. A partial first or last year is marked as incomplete.

Turnover, costs and cash

  • Turnover at a rebalance is the share of the portfolio that changed. Annual turnover is that summed over a year.
  • Cost drag is the total paid in trading costs as a share of the portfolio. See Costs in a backtest.
  • Cash is the average and the largest share of the portfolio left uninvested because too few stocks passed the rules.

Something here wrong or unclear? Tell us. Informational only, not investment advice.

After hours

That's a wrap.

17hrs22min59sec

Market opens Friday, Nov 13 at 9:30 AM ET