Course contents
Return is not the number that matters
A raw return figure tells you almost nothing; a professional judges a strategy by risk-adjusted and behavioural measures: the Sharpe and Sortino ratios, the information ratio, maximum drawdown, turnover, and hit rate. This chapter computes each from a backtest and explains what a good and bad value of each really means.
- Compute the Sharpe, Sortino, and information ratios, maximum drawdown, and turnover from a backtest
- Interpret each metric and its blind spots
- Judge a strategy on the whole risk-adjusted picture, not its return
Ask a beginner how a strategy did and they quote its return. Ask a professional and they quote its Sharpe, its drawdown, and half a dozen other numbers, because a return figure alone is nearly useless. It says nothing about the risk taken to earn it or the pain endured on the way. This chapter computes the metrics that actually matter.
The suite
Here is a full metric suite computed on a momentum factor's returns.
# A single return figure hides the risk taken to get it. A professional judges a
# strategy by a suite of risk-adjusted and behavioural measures. Here we compute
# them on a momentum factor's monthly returns. Synthetic data (factor_data.py).
import numpy as np
from factor_data import make_market, long_short, max_drawdown
returns, static = make_market()
momentum = (1 + returns).rolling(12).apply(np.prod, raw=True).shift(1) - 1
r = long_short(momentum, returns).dropna() # monthly factor returns
def sharpe(x):
return x.mean() / x.std(ddof=1) * np.sqrt(12)
def sortino(x):
downside = x[x < 0].std(ddof=1)
return x.mean() / downside * np.sqrt(12) if downside > 0 else float("inf")
ann_return = (1 + r).prod() ** (12 / len(r)) - 1
print(f"Months: {len(r)}")
print(f"Annualised return: {ann_return * 100:6.1f}% (headline, but incomplete)")
print(f"Sharpe ratio: {sharpe(r):6.2f} (return per unit of total risk)")
print(f"Sortino ratio: {sortino(r):6.2f} (return per unit of DOWNSIDE risk)")
print(f"Max drawdown: {max_drawdown(r) * 100:6.1f}% (worst peak-to-trough fall)")
print(f"Hit rate: {(r > 0).mean() * 100:6.1f}% (share of winning months)")
print("\nThe Sharpe, Sortino, drawdown, and hit rate together tell the real story.")
print("Judge a strategy on the whole risk-adjusted picture, never on return alone.")Months: 60 Annualised return: 15.5% (headline, but incomplete) Sharpe ratio: 0.98 (return per unit of total risk) Sortino ratio: 1.67 (return per unit of DOWNSIDE risk) Max drawdown: -15.9% (worst peak-to-trough fall) Hit rate: 63.3% (share of winning months) The Sharpe, Sortino, drawdown, and hit rate together tell the real story. Judge a strategy on the whole risk-adjusted picture, never on return alone.
Take them one at a time. The Sharpe ratio (0.98 here) is return per unit of total risk, the headline risk-adjusted number, and the one the whole course keeps returning to. The Sortino ratio (1.67) is a refinement: it divides return by downside risk only, on the sensible view that upside volatility is not something to be punished, so it rewards strategies whose swings are mostly upward. Maximum drawdown (minus 15.9%) is the worst peak-to-trough fall, the survival number from Risk and Psychology, the loss you would actually have had to sit through. The hit rate (63.3%) is the share of winning periods, useful but secondary, because it says how often you win and nothing about how much. And turnover, from the last chapter, measures how much the strategy trades, which drives both costs and capacity.
One more, for strategies meant to beat a benchmark: the information ratio is the Sharpe of the strategy's return above its benchmark, measuring skill relative to just buying the index. A factor fund that beats the market by a little, very consistently, can have a high information ratio even with a modest raw return.
Judge the whole picture
No single metric is enough, and the return least of all. A high return with a savage drawdown is a trap, because you would likely have abandoned the strategy at the bottom; a modest return with a high Sharpe and a shallow drawdown may be far better to actually live with. Weight drawdown heavily, since it is the survival number, read the Sharpe and Sortino together, and treat the raw return as the least informative figure on the page. And carry the warning from Part 1: every one of these numbers is an estimate with uncertainty, so a glittering Sharpe measured over a short sample is not proof of anything, a point the next chapters make brutally.
What to carry forward
A return figure alone is nearly useless; judge a strategy on a suite of measures. The Sharpe is return per unit of total risk, the Sortino refines it to downside risk, maximum drawdown is the worst fall you must survive, the hit rate is how often you win, and the information ratio measures skill against a benchmark. Weight drawdown heavily, read the ratios together, and distrust the raw return. Above all, every one of these is a noisy estimate, which sets up the hardest lesson of the course: with enough tries, an impressive Sharpe is exactly what luck produces, the subject of the next chapter.