The Sharpe ratio, beyond the basics
- Published
- Updated
- Topic
- Risk Management
- Reading time
- 6 min read
What the Sharpe ratio measures, how uncertain a single backtest figure really is, where it misleads, and which numbers to read next to it.
The Sharpe ratio is the most quoted number in systematic trading. It is also one of the most misread. A Sharpe of 2 can be excellent, meaningless or dangerous, depending on how it was measured and what kind of strategy produced it.
This guide covers what the ratio measures, how much uncertainty sits behind a single estimate, where it misleads, and which numbers to read next to it.
What it measures
The Sharpe ratio, introduced by William F. Sharpe in 1966, is the average excess return of a strategy divided by the volatility of its returns:
Sharpe = (average return − risk-free rate) / standard deviation of returns
It answers one question: how much return did the strategy earn for each unit of volatility it took on? Because it is scale-free, it lets you compare a slow trend-following system with a fast intraday one, or a strategy at 1× leverage with the same strategy at 3×. Leverage multiplies the return and the volatility equally, so it leaves the Sharpe ratio unchanged.
In code, from daily returns:
import numpy as np
def sharpe(daily_returns, risk_free_annual=0.0, periods=252):
excess = np.asarray(daily_returns) - risk_free_annual / periods
return np.sqrt(periods) * excess.mean() / excess.std(ddof=1)
For the risk-free rate, use a short-term government rate in the currency you trade: a 91-day Treasury bill rate for rupee strategies, for example, or a 3-month T-bill rate for dollar strategies. Using zero flatters every strategy, and the effect is larger when rates are high.
The √252 shortcut and when it fails
Annualising by multiplying a daily Sharpe by √252 assumes daily returns are independent. Many strategies break that assumption:
- Trend-following and slow mean-reversion often have positively autocorrelated returns. Gains cluster, and √252 then overstates the annual Sharpe.
- Strategies on illiquid or stale prices look smoother than they really are. Prices that update slowly make returns appear autocorrelated and volatility appear low.
Andrew Lo (2002) gives a correction for autocorrelated returns. A simpler check: compute the Sharpe ratio on weekly or monthly returns and annualise those. If the result is much lower than the daily-based figure, the daily number is flattering you.
One estimate, wide uncertainty
A Sharpe ratio from a backtest is an estimate, and it is far noisier than most people assume. For independent, normally distributed returns, Lo's approximation for the standard error of a per-period Sharpe ratio is:
standard error ≈ sqrt((1 + SR² / 2) / T)
where SR is the per-period Sharpe and T is the number of periods.
Worked example. Take a strategy with an annual Sharpe of 1.0 measured over three years of daily data:
- The daily Sharpe is 1.0 / √252 ≈ 0.063, and T = 756 days.
- The daily standard error is √((1 + 0.063² / 2) / 756) ≈ 0.036.
- Annualised, that is 0.036 × √252 ≈ 0.58.
A rough 95% confidence interval is therefore 1.0 ± 1.13, or about −0.1 to 2.1. Three years of data cannot rule out that the true Sharpe is zero. That is sobering, and it is why a single backtest number should never decide on its own whether a strategy is real. It is also why the number of strategies you tried matters so much: see our guide on how not to overfit a backtest.
The probabilistic Sharpe ratio (Bailey and López de Prado, 2012) builds on this idea. It estimates the probability that the true Sharpe exceeds a benchmark, taking account of the track record's length, skewness and fat tails.
Where the Sharpe ratio misleads
It treats all volatility as risk
Large gains raise volatility just as large losses do, so a strategy with occasional big winners is penalised for them. The Sortino ratio fixes this by dividing by downside deviation only.
It ignores the shape of returns
The Sharpe ratio uses only the mean and the standard deviation. Two strategies with the same Sharpe can have completely different tails. Option-selling strategies are the classic case: they collect small premiums for months, show a smooth curve and a high Sharpe, then give back years of gains in a single sharp move. Always check skewness (negative is the dangerous kind) and kurtosis (fat tails) next to the Sharpe.
It says nothing about the path
Volatility does not tell you how deep the losses went or how long they lasted. A trader who cannot survive a 30% drawdown psychologically or financially needs to know about it, whatever the Sharpe says.
It can be gamed
Smoothing returns, selling tail risk, marking positions at stale prices or reporting only the best period all raise the Sharpe ratio without making the strategy any better.
What to read next to it
def sortino(daily_returns, periods=252):
r = np.asarray(daily_returns)
downside = np.sqrt(np.mean(np.minimum(r, 0) ** 2))
return np.sqrt(periods) * r.mean() / downside
def max_drawdown(daily_returns):
equity = np.cumprod(1 + np.asarray(daily_returns))
peak = np.maximum.accumulate(equity)
return (equity / peak - 1).min()
def calmar(daily_returns, periods=252):
r = np.asarray(daily_returns)
annual_return = (1 + r).prod() ** (periods / len(r)) - 1
return annual_return / abs(max_drawdown(r))
A useful minimum set of numbers for any strategy:
- Sharpe ratio, computed honestly and annualised from weekly or monthly returns as a check.
- Sortino ratio, to see whether volatility comes mostly from gains or from losses.
- Maximum drawdown and its duration: how deep, and how long to recover.
- Calmar ratio: annual return divided by maximum drawdown.
- Skewness and kurtosis of returns.
- Number of trades and the length of the test, which together set how much the other numbers can be trusted.
What is a "good" Sharpe?
It depends on the strategy and the data behind it. As rough context, broad equity indices have historically delivered long-run Sharpe ratios well below 1. An honest, after-cost, out-of-sample Sharpe consistently above 1 is uncommon for a single strategy.
So a backtest showing a Sharpe of 3 or more deserves suspicion before celebration. Check for look-ahead bias, unrealistic fills, missing costs, a short or cherry-picked test period, or a large number of discarded variants. Very high Sharpe ratios do exist, mostly in high-frequency market making with capacity limits and serious infrastructure, but they are rarely what a daily-bar backtest has found.
Summary
The Sharpe ratio is a good first summary of return per unit of risk, and a poor last word. Measure it honestly, remember how wide its uncertainty is, check how it changes when you annualise from weekly or monthly returns, and always read it next to drawdowns, the shape of the return distribution and the number of trades.
This article is for education only and is not investment advice.