Metrics

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.

StartSame endpointStrategy A (smooth) -- Sharpe: 2.12Strategy B (volatile) -- Sharpe: 0.85
Both strategies earn the same return, but Strategy A gets there with far less volatility. The Sharpe ratio rewards the smoother ride.

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.

Sharpe Ratio
Sharpe = (mean candle return / std dev of candle returns) * sqrt(candles per year)

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.

What is standard deviation?
Standard deviation measures how spread out a set of numbers is. If every candle returned exactly 2%, the standard deviation would be zero -- no spread at all. If candle returns range from -5% to +8%, the standard deviation is large. A higher standard deviation means the returns were more unpredictable.
Annualization and risk-free rate
Simula annualizes the Sharpe ratio so that results from different timeframes (daily, hourly, etc.) can be compared on the same scale. The annualization factor depends on the asset and timeframe -- for example, 252 for daily stocks. The traditional Sharpe formula subtracts a "risk-free rate" (like a government bond yield) from the returns before dividing. Simula uses a risk-free rate of zero, which is standard for backtesting tools where the goal is to evaluate the strategy on its own merits.

Worked Examples

How standard deviation works

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.

Why divide by n - 1 instead of n?
When calculating variance from a sample (as opposed to an entire population), you divide by n - 1 instead of n. With 5 returns, that means dividing by 4. This is called "sample variance" and it produces a slightly larger standard deviation, which gives a more conservative estimate. Simula uses this convention.
Full Sharpe ratio calculation

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.

Same return, different Sharpe

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.

Below 0
The strategy lost money on average. A negative Sharpe ratio means the mean return was negative.
0 to 0.5
Low return for the risk taken. The strategy made money, but the gains were small relative to the volatility.
0.5 to 1.0
Moderate risk-adjusted returns. Positive, but not particularly efficient at converting risk into return.
1.0 to 2.0
Good risk-adjusted returns. The strategy earned a meaningful return without excessive volatility.
2.0 to 3.0
Very good. This level of risk-adjusted performance is difficult to sustain over long periods.
Above 3.0
Exceptional. Rarely seen in extended live trading. On short backtests, a very high Sharpe may reflect a favorable stretch rather than a durable edge.

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.

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.