Sharpe Ratio
The industry-standard risk-adjusted return metric -- formula, assumptions, and common pitfalls.
What is the Sharpe Ratio?
The Sharpe ratio measures how much return a strategy earned for the amount of risk it took. "Risk" here means volatility -- how much the strategy's returns bounced around from candle to candle.
Think of two drivers who both arrive at the same destination at the same time. One drove on a smooth highway. The other swerved through traffic, narrowly avoiding accidents. They got the same result, but the highway driver's journey was far less stressful. The Sharpe ratio rewards the smooth ride -- higher returns with less volatility produce a higher Sharpe ratio.
How It's Calculated
The Sharpe ratio is calculated in two steps. First, divide the average candle return by the standard deviation of candle returns. This gives you the per-candle Sharpe ratio -- how much return you earned per unit of volatility on each candle. Then, multiply by the square root of the number of candles per year to annualize it.
In plain English: take the average return across all candles and divide it by how spread out those returns were. Then scale the result up to a yearly figure. The more consistent the returns (lower standard deviation), the higher the Sharpe ratio for a given level of return.
Worked Examples
Before calculating the Sharpe ratio, you need to understand standard deviation. Here are 5 candle returns:
+3%, +1%, +3%, +1%, +2%
Step 1: Find the mean return.
(3 + 1 + 3 + 1 + 2) / 5 = 10 / 5 = 2%
Step 2: Find how far each return is from the mean, then square those differences.
Deviations from mean: +1, -1, +1, -1, 0
Squared deviations: 1, 1, 1, 1, 0
Step 3: Average the squared deviations (dividing by n - 1 = 4), then take the square root.
Variance: (1 + 1 + 1 + 1 + 0) / 4 = 4 / 4 = 1
Standard deviation: sqrt(1) = 1%
The standard deviation of 1% means these returns stayed within about 1 percentage point of the mean on a typical candle. A larger standard deviation would mean the returns were more spread out.
A strategy runs for 252 daily candles on a stock. Stock markets are open roughly 252 days per year, so 252 daily candles is about one trading year. Across all 252 candles, the mean return is 0.05% per candle and the standard deviation is 0.8% per candle.
Step 1: Divide the mean by the standard deviation.
0.05 / 0.8 = 0.0625
Step 2: Annualize by multiplying by the square root of candles per year. For daily stock candles, that is sqrt(252) = 15.87.
Sharpe = 0.0625 * 15.87 = 0.99
A Sharpe ratio just under 1.0. The strategy earned a positive return, but the return was modest relative to how much the returns bounced around from candle to candle.
Two strategies both run for 252 daily candles and both average +0.08% per candle. But their volatility is very different:
- Strategy A (steady): standard deviation of 0.6% -- returns stayed close to the mean
- Strategy B (volatile): standard deviation of 1.5% -- returns swung widely above and below the mean
Strategy A: (0.08 / 0.6) * 15.87 = 2.12
Strategy B: (0.08 / 1.5) * 15.87 = 0.85
Both strategies earned the same average return, but Strategy A did it with far less volatility. The Sharpe ratio captures this difference: achieving a return is more valuable when the ride is smoother.
Reading Your Results
The Sharpe ratio is a single number. Higher values indicate better risk-adjusted performance. The ranges below provide rough orientation, but what counts as "good" varies by asset, timeframe, and strategy type.
Things to Watch Out For
Sharpe penalizes upside volatility
Standard deviation treats large gains and large losses the same -- both increase volatility. A strategy that occasionally has very large winning candles will have a higher standard deviation, which lowers the Sharpe ratio, even though those large gains are desirable. The Sortino ratio addresses this by measuring only downside volatility.
Short backtests inflate the Sharpe ratio
Annualization multiplies the per-candle ratio by the square root of candles per year. If the backtest covers only a few candles and happens to catch a favorable stretch, the annualized Sharpe can be extremely high. Longer backtests produce more stable and realistic Sharpe ratios. Walk-forward analysis can reveal whether a high Sharpe persists across multiple time periods or was confined to one favorable stretch.
Sharpe assumes returns are normally distributed
The Sharpe ratio uses standard deviation as its measure of risk, which works best when returns are roughly evenly spread around the mean. In practice, financial returns can have occasional extreme moves (fat tails) that standard deviation understates. The Sharpe ratio does not capture the risk of rare, large losses.
Leverage changes the Sharpe ratio
If your strategy uses leverage, both returns and volatility are amplified. In theory, the Sharpe ratio should stay the same because both the numerator and denominator scale equally. In practice, leverage can cause portfolio wipeouts that truncate the return series, changing the Sharpe ratio. Simula calculates the Sharpe ratio for each leverage level separately.
Related Metrics
Sortino Ratio -- similar to the Sharpe ratio but uses only downside volatility in the denominator. This avoids penalizing strategies for large gains.
Calmar Ratio -- divides annualized return by max drawdown instead of volatility. Where the Sharpe ratio measures return per unit of volatility, the Calmar ratio measures return per unit of worst-case decline.
Volatility -- the standard deviation of returns, annualized. This is the denominator of the Sharpe ratio. A strategy with high volatility needs proportionally higher returns to achieve the same Sharpe ratio.