What is the Sharpe ratio? Formula, meaning and a worked example
On this page
Key takeaways
- The Sharpe ratio asks how much return a portfolio earned for the bumpiness of the ride: the higher it is, the more return for each unit of ups and downs.
- It ranks portfolios by return per unit of risk, not by return: a calmer portfolio that grew more slowly can have the higher Sharpe ratio.
- Volatility counts gains and losses alike, so the ratio treats a large rise as risk; the Sortino ratio and the drawdown measures exist for that reason.
- MarketHeist measures it on monthly returns, quotes it as a yearly figure and does not subtract the interest earned on cash; when interest rates are high, that flatters bonds and cash-like holdings.
Definition
The Sharpe ratio is a measure of risk-adjusted return: a portfolio's average return in excess of a risk-free rate, divided by the standard deviation of that excess return. Introduced by William Sharpe in 1966 as the reward-to-variability ratio, it says how much return a portfolio earned for each unit of volatility it carried.
Also known as: Sharpe, reward-to-variability ratio, risk-adjusted return, return per unit of risk, annualized Sharpe ratio.
How it works
Two portfolios can end a decade with the same return after very different journeys: one climbs steadily, the other lurches up and down. The Sharpe ratio puts that difference into one number by dividing the return by the size of the swings. More return for the same swings, or the same return with smaller swings, both raise it.
The recipe has three steps. Take the portfolio's return in each period and subtract what a risk-free investment, usually short-term Treasury bills, paid over the same period. Average those excess returns. Divide the average by their standard deviation, the typical distance of a period's return from the average. On monthly data the result is a monthly ratio; multiplying by √12 turns it into the annualized figure people quote.
William Sharpe called it the reward-to-variability ratio in 1966 and restated it in 1994 with the benchmark made explicit: the numerator is the difference between the portfolio's return and any benchmark's, and the denominator is the standard deviation of that difference. With the risk-free rate as the benchmark, that is the familiar form. With a market index as the benchmark, the same formula gives what is now called the information ratio.
The ratio carries an idea from portfolio theory. If an investor can borrow or lend at the risk-free rate, any portfolio can be scaled up or down; scaling changes return and volatility in the same proportion and leaves the Sharpe ratio unchanged. So the portfolio with the higher ratio offers more return at any chosen level of volatility. A ratio is to a portfolio what fuel economy is to a car: it says nothing about how fast the car goes, only how much it gets out of what it burns.
That idea also marks the limits. Real borrowing costs more than the Treasury-bill rate, and volatility is a complete description of risk only for returns that are symmetric and well behaved. Returns with occasional large losses, which many strategies and most stock portfolios have, can show a respectable Sharpe ratio until the loss arrives.
Formula
- S
- Sharpe ratio per period
- Dₜ
- excess return in period t: the portfolio's return minus the risk-free return
- D̄
- average excess return over the period studied
- σ_D
- standard deviation of the excess returns
- Rₜ
- portfolio return in period t
- R_f,t
- risk-free return in period t, such as a Treasury bill
Replacing the risk-free return with a benchmark portfolio's return gives the information ratio: active return over tracking error.
- rₜ
- total return of month t (dividends reinvested)
- r̄
- arithmetic mean of the monthly returns
- s
- sample standard deviation of the monthly returns
- N
- number of months
- √12
- annualization factor for monthly data
- 12 r̄
- the mean monthly return times 12 (a simple, not compounded, annual average)
- √12 s
- the annualized volatility
The mean scales with time and the standard deviation with its square root, which is why the monthly ratio is multiplied by √12. The √12 rule assumes months are independent of each other; see the volatility guide.
Worked example
The classic stocks-and-bonds portfolio (60% SPY, 40% BND, rebalanced every December) and the S&P 500 alone (SPY), 477 monthly returns from Jan 1987 to Sep 2026.
The S&P 500 grew faster, at 11.2% a year against 9.1% for the 60/40 portfolio, and it swung more: its volatility was 15.1% against 9.6%.
Per unit of volatility, the 60/40 portfolio earned more. Its Sharpe ratio was 0.96, against 0.79 for the S&P 500. On MarketHeist's conventions the ratio is simply the annualized average return divided by the annualized volatility: 9.2% divided by 9.6% for the 60/40 portfolio, 11.9% divided by 15.1% for the S&P 500.
In Sharpe's framework, an investor who could borrow at the risk-free rate could have levered the 60/40 portfolio up to the S&P 500's volatility and had a higher average return than the S&P 500 at the same volatility. In practice borrowing costs more than that rate, and the ratio here leaves the risk-free rate out altogether, so the comparison is a statement about efficiency, not a promise of a higher return.
Both return streams were negatively skewed, -0.66 for the 60/40 portfolio and -0.69 for the S&P 500: their most extreme months were mostly falls. The Sharpe ratio charges for a large fall and a large rise alike, which is the gap the Sortino ratio fills.
Data through Sep 2026. Reproduce id 25cc61a78ab595ca (this guide, its lab setup and the data month).
Interactive lab
Sharpe ratio, volatility, compound growth and the shape of the returns for both picks over the same months. Switch portfolios to see when the faster-growing one also has the higher ratio, and when it does not.
| Measure | Classic Stocks & Bonds 60/40 | SPY |
|---|---|---|
| Sharpe ratio | 0.96 | 0.79 |
| Sortino ratio | 1.52 | 1.20 |
| Probabilistic Sharpe ratio (against 0.00) | 100.0% | 100.0% |
| Skewness of monthly returns | -0.66 | -0.69 |
| Excess kurtosis of monthly returns | 2.07 | 2.11 |
| Downside deviation (annualized) | 6.0% | 9.9% |
| Volatility (annualized) | 9.6% | 15.1% |
| Average return (mean monthly return x 12) | 9.2% | 11.9% |
| CAGR | 9.1% | 11.2% |
| Volatility drag (annualized) | 0.5% | 1.2% |
| Omega ratio (threshold 0%) | 2.04 | 1.80 |
| Months in the window | 477 | 477 |
Risk-free rate 0, 12 periods a year. The probabilistic Sharpe ratio is the probability that the true Sharpe ratio exceeds the benchmark, given the record's length, skewness and kurtosis. Volatility drag: 12 times the arithmetic mean monthly return minus the geometric mean monthly return. Omega ratio: the sum of the monthly gains over the sum of the monthly losses, at a threshold of 0% a month. Jan 1987 to Sep 2026.
How MarketHeist computes it
Every choice an implementation has to make, as the code makes it today. The page is checked against the code each time it is built.
| Choice | How it is computed | In the code |
|---|---|---|
| Data | Monthly total returns (dividends reinvested). Funds younger than the period shown are extended backward with older funds, spliced on returns, not prices. | |
| Window | The worked example and the lab use the common window of the two portfolios compared, Jan 1987 to Sep 2026 (477 months), ending at the data month of this page. Another pick in the lab is read over its own common window. | |
| Portfolio streams | A fund is its proxy-extended monthly return stream. A built-in portfolio is read as the MarketHeist MCP reads it: its composed stream with its own rebalancing rule and overlay. A custom mix is rebalanced yearly. | |
| Ratios | Risk-free rate 0, 12 periods a year. Sharpe: mean of the monthly returns over their sample standard deviation, times the square root of 12. Sortino: the same mean over the downside deviation, the root of the average squared negative return over all N months. The probabilistic Sharpe ratio uses the per-period Sharpe ratio, the skewness and the kurtosis of the monthly returns; the benchmark Sharpe ratio is divided by the square root of 12 first. | |
| Sharpe ratio | Mean of the period returns divided by their sample standard deviation (divides by N − 1), times √(periods per year). Returns 0 when the standard deviation is 0 or not finite. | sharpepackages/shared/engine/metrics.ts |
| Risk-free rate | 0. Nothing is subtracted from the returns, so the numerator is the plain mean return, not an excess return. Over periods when Treasury bills paid several percent a year, this raises every ratio, and raises those of bonds and other low-volatility holdings the most, because the cash return is a larger part of what they earned. | |
| Frequency and annualization | The portfolio app, the MCP tools and this page use monthly total returns (dividends reinvested) and √12. The backtester uses the returns of its bars and the factor of its bar frequency: √252 for daily bars, √52 for weekly, √12 for monthly. | periodsPerYearpackages/shared/types.ts |
| Portfolio metrics | A portfolio's Sharpe ratio is computed on the monthly returns of the simulated portfolio, after its rebalancing rule, over the common window of its holdings. | buildMetricspackages/portfolio/engine/portfolio.ts |
| Same function everywhere | The portfolio engine keeps an identical copy of the backtester's metric functions, so the app, the MCP tools and this page apply the same formula. | sharpepackages/portfolio/engine/metrics.ts |
| Mean shown on this page | The annualized average return in the lab is the arithmetic mean of the monthly returns times 12, so it divided by the annualized volatility reproduces the Sharpe ratio exactly. | ratiosSidecontent-engine/lab/compute.ts |
| Engine functions | The functions the portfolio app and the MarketHeist MCP tools run, called here on the same monthly returns. | sharpepackages/shared/engine/metrics.tssortinopackages/shared/engine/metrics.tsprobabilisticSharpeRatiopackages/shared/engine/metrics.tsskewnesspackages/shared/engine/metrics.tsexcessKurtosispackages/shared/engine/metrics.ts |
Sharpe ratio compared with its neighbours
| Ratio | Risk in the denominator | Counts upside as risk | Convention on MarketHeist |
|---|---|---|---|
| Sharpe ratio | Standard deviation of all returns | Yes | Risk-free rate 0, sample standard deviation, monthly, √12 |
| Sortino ratio | Downside deviation below a target | No | Target 0, divides by all N |
| Information ratio | Tracking error against a benchmark | Yes, relative to the benchmark | Not reported as a ratio |
| Calmar ratio | Maximum drawdown | No | CAGR over the absolute maximum drawdown, whole window |
| Probabilistic Sharpe ratio | Not a ratio: the probability that the true Sharpe ratio beats a benchmark | Inherits the Sharpe ratio's | Benchmark 0 for the app's caveat |
Limitations
- Volatility is the only risk it sees. Rare large losses, slow declines and long stretches below a previous high can all hide behind a good Sharpe ratio; read it beside a portfolio's maximum drawdown and time underwater.
- MarketHeist's risk-free rate of 0 makes the ratio return per unit of volatility. Subtracting a Treasury-bill rate lowers a bond fund's ratio much more than a stock fund's, and can reverse a ranking between them.
- It is an estimate from one sample of history. Over a few years of monthly data the error band is wide; the probabilistic Sharpe ratio turns the estimate into a confidence level.
- Annualizing by √12 assumes that one month's return says nothing about the next. Returns that trend or mean-revert from month to month, or smoothed returns from illiquid assets, make the annualized figure misleading.
- Long histories are extended backward with older funds or indexes where a fund is younger than the window, so early months approximate the fund rather than reproduce it.
Frequently asked questions
- What is a good Sharpe ratio?
- There is no universal cutoff: it depends on the risk-free rate used, the data frequency and the period. Compare portfolios only over the same window with the same conventions. A ratio far above what broad stock and bond portfolios have shown over decades, sustained over a long period, deserves suspicion before admiration: check the data, the costs and how many variants were tried.
- Why does MarketHeist use a risk-free rate of zero?
- So the number is simple to reproduce and the same in the backtester, the portfolio app and the MCP tools, with no choice of bill rate or date alignment involved. The cost is that the ratio is not an excess-return Sharpe ratio, which matters most when comparing holdings with very different volatility in years of high interest rates.
- How is the Sharpe ratio annualized?
- Multiply the ratio computed on monthly returns by √12, on daily returns by √252. The mean grows with the number of periods and the standard deviation with its square root, so their ratio grows with the square root. The rule assumes returns are independent from one period to the next.
- Can a portfolio with a lower return have a higher Sharpe ratio?
- Yes, and it is common. A stocks-and-bonds mix usually grows more slowly than stocks alone but swings much less, so its return per unit of volatility can be higher, as in the worked example above.
- What is the difference between the Sharpe ratio and the Sortino ratio?
- The Sharpe ratio divides by the standard deviation of all returns, so large gains count as risk. The Sortino ratio divides by the downside deviation, which counts only returns below a target. For roughly symmetric returns they rank portfolios alike; for skewed returns they can differ.
References
- Sharpe, W. F. (1966) Mutual Fund Performance. Journal of Business 39(1). Introduces the reward-to-variability ratio.
- Sharpe, W. F. (1994) The Sharpe Ratio. Journal of Portfolio Management 21(1). The ex ante and ex post definitions with a general benchmark.
- Lo, A. W. (2002) The Statistics of Sharpe Ratios. Financial Analysts Journal 58(4). Standard errors, and why annualizing by √12 is wrong when returns are serially correlated.
- Tobin, J. (1958) Liquidity Preference as Behavior Towards Risk. Review of Economic Studies 25(2). The separation result behind levering the highest-ratio portfolio.
- Bailey, D. H. and López de Prado, M. (2012) The Sharpe Ratio Efficient Frontier. Journal of Risk 15(2). The probabilistic Sharpe ratio.
Try it on your own holdings
Open the 60/40 portfolio and read its Sharpe ratio →
Or ask an assistant connected to the MarketHeist MCP server (https://marketheist.io/mcp), which computes the same figures:
Using MarketHeist.io, compare the Sharpe ratio, annualized return and volatility of a 60% SPY / 40% BND portfolio and SPY alone over the same months, and explain why the slower-growing one can have the higher Sharpe ratio
Ask an AI assistant
The prompt opens in a new tab, already filled in. An assistant without the MarketHeist connector answers from its own knowledge, not from the figures on this page.
Historical simulation, not advice. Computed by the MarketHeist portfolio engine from monthly total returns, data through Sep 2026. Markdown version of this page: sharpe-ratio.md.