Glossary
What Is the Sharpe Ratio?
The Sharpe ratio is a strategy's average excess return over a risk-free rate, divided by the standard deviation of its returns, and usually annualized. Higher means more return per unit of volatility. TradingLead shows Sharpe only after you enter the samples per year, the expected interval and a risk-free rate; it does not assume 252 trading days.
What it means
The Sharpe ratio asks how much return a strategy produced for each unit of volatility it took on:
Sharpe = (average return − risk-free return) / standard deviation of returns
It is usually annualized by multiplying by the square root of the number of return samples per year. A higher Sharpe means smoother return per unit of risk, as measured by volatility.
Pitfalls
- Annualization choice matters. Daily, hourly or 5-minute returns need different multipliers, and markets don't trade around the clock.
- Volatility isn't all of risk. Rare large gaps, illiquidity and fat tails can be under-represented. Check drawdown too.
- Short samples are noisy. A high Sharpe over a few months of data says little.
- Optimized Sharpe is biased upward. The best of many tested settings usually looks better than it will later.
How TradingLead calculates it
TradingLead's backtesting analytics treat Sharpe as opt-in:
- Annualization starts disabled with empty fields. You must enter samples per year, the expected interval between samples and an annual risk-free rate (default 0).
- Returns are interval returns of candle-close equity. The initial-capital pseudo-interval is excluded, and at least two real intervals are needed.
- Every interval must match the expected spacing. Irregular or session-gapped samples make Sharpe unavailable; they are not resampled or zero-filled. An optional user-assumed session schedule supports 1-240 minute session-aligned bars.
- The formula uses the sample standard deviation (n − 1) and converts the annual risk-free rate to a per-sample rate:
rf_sample = (1 + riskFreeRateAnnual)^(1 / samplesPerYear) − 1
sharpe = (mean(r) − rf_sample) / stdev(r) × √samplesPerYear
If returns have zero variance, Sharpe is unavailable. Annualized volatility and the Sortino ratio use the same assumptions. Absolute return, P&L and drawdown are always available without them.
Reading it well
Compare Sharpe only between runs with the same sampling assumptions, look at it alongside drawdown and profit factor, and treat a backtest Sharpe as a description of the past, not a forecast.
Limitations
- Assumes volatility captures risk; tail and gap risk can be missed.
- Sensitive to sampling frequency and sample size.
Frequently asked questions
- Why doesn't my TradingLead backtest show a Sharpe ratio?
- Annualization is off by default. Enter samples per year, the expected interval between samples and a risk-free rate. Sharpe also needs at least two regular intervals, and it stays unavailable if the samples are irregular, for example across session gaps.
- Why not just use 252 trading days?
- The right annualization depends on the interval and the trading calendar of the data. TradingLead makes you choose it explicitly instead of silently applying 252, which would be wrong for many intraday or irregular series.
- Does TradingLead show the Sortino ratio?
- Yes, under the same explicit sampling assumptions. Sortino uses downside deviation instead of total standard deviation.
Related
Last updated: