Sharpe Ratio Calculator
The Sharpe ratio divides return above a cash rate by the standard deviation of those returns, giving one number for how much reward a strategy produced per unit of volatility. It treats upside and downside volatility identically, so a strategy with violent gains is penalised the same as one with violent losses.
Return per unit of volatility
Defaults are a 12% return against a 4% cash rate, with a 15% standard deviation.
The cash rate matters more than people expect. A 12% return looks very different against a 1% cash rate than against a 5% one, and the same strategy’s Sharpe ratio moves without the strategy changing at all.
Runs entirely in your browser. Nothing you type is sent anywhere or stored.
How the number is built
One subtraction and one division. The subtraction is the part most people skip and it changes the answer more than they expect.
Sharpe = (return − cash rate) ÷ standard deviation
The cash rate is subtracted because holding cash was always available. A strategy returning 4% when cash pays 4% has produced no excess return, and its Sharpe ratio is correctly zero.
A worked example
Take the defaults: a 12% return, a 4% cash rate and a 15% standard deviation.
The excess return is 12 − 4 = 8%.
And 8 ÷ 15 = 0.533.
Ignoring the cash rate would give 12 ÷ 15 = 0.800 — half again as flattering, for exactly the same performance.
Read it the other way and it becomes concrete: 1.875 points of volatility were carried for every point of excess return. That framing tends to communicate more than the ratio itself.
The flaw worth understanding
Standard deviation does not care about direction. A month that gained 20% raises the denominator just as much as a month that lost 20%, so a strategy is penalised for the outcomes it exists to produce.
Which is why a strategy with a few enormous winners can score badly against one that grinds out small consistent returns and then loses everything in a single event that the sample did not include.
Measures built only on downside answer a different question. On this site’s shared series the
ulcer index — depth and duration below prior peaks — is 1.67% against a 3.61% finish, a ratio of 0.44.
That figure ignores upside entirely, which is the correction the Sharpe ratio does not make. The
figures are in research/series-measurements.json.
The window decides the answer
A Sharpe ratio without a stated period is not a measurement. Six months of a one-directional market produces a large number from an unremarkable strategy, because the denominator had no opportunity to grow.
Volatility is not stable either. On this site’s shared series, bar ranges run 0.17 at the tenth percentile and 1.101 at the ninetieth — a 6.5-fold spread — with a median of 0.493. A single standard deviation summarising that hides most of what happened.
Annualising compounds the problem. A monthly Sharpe multiplied by the square root of twelve assumes returns are independent month to month, and they are not.
What is not in the denominator
Fees and trading costs come out of the return. On this site’s shared series a round trip measures about 2% of the median bar range — so a gross Sharpe ratio and a net one can differ substantially on anything that trades frequently.
Something that rarely reprices reports low volatility, which raises its Sharpe ratio without reducing any real risk. Infrequent marking is a measurement artefact, not a property of the investment.
What counts as a good one
There is no threshold, and the honest reading is comparative. A Sharpe ratio only means something against another strategy measured over the same window with the same frequency and the same cash rate.
The defaults illustrate why. At 0.533 the strategy carried 15 points of volatility for 8 points of excess. Halving the volatility to 7.5 while keeping the return doubles the ratio to 1.067 — and so does raising the return to 20% while keeping volatility at 15, which gives 1.067 as well.
Those two are the same number describing entirely different strategies. One found a way to be calmer and the other found a way to earn more, and the ratio cannot tell them apart. Which is why the two components are worth quoting alongside it: excess return and standard deviation separately say more than their quotient does.
The original data
Of the 24,971 unique videos in research/search-study-corpus.jsonl, 5 have an instruction-shaped
title about the Sharpe ratio, at a median of 26,440 views across 5 channels — and 0% are
calculator-shaped. Portfolio beta appears in 4 at 313 and drawdown recovery in 7 at 3,813. The
counts come from site/rank_tools2.py, which deduplicates by video id.
Five videos at a 26,440 median. The most widely quoted number in institutional performance reporting has essentially no instructional coverage aimed at the people who keep encountering it in fund factsheets.
The answer to the question on that chart is that six months is too short to say. A high ratio over a short window most often means the window contained no adverse event rather than that the strategy handles them well. Ask how long the measurement ran, what the worst drawdown inside it was, and whether the strategy has ever met a market that moved against it — a ratio is a summary, and those three questions are what it summarised away.
When it fails
The structural failure is a strategy that collects small regular gains and carries a rare large loss. Selling options against a quiet market, or any short-volatility position, produces exactly the return shape the Sharpe ratio rewards: high mean, low dispersion, no adverse observations. The number is genuinely high right up until the event that the sample never contained, and nothing in the calculation warns that the distribution has a tail it has not yet sampled.
The second failure is quoting one without its period. The window is half the measurement.
A third is comparing ratios computed on different frequencies. Daily and monthly are not interchangeable.
A fourth is using a gross return. Costs belong in the numerator.
A fifth is applying it to an illiquid holding. Infrequent pricing suppresses the denominator.
And a sixth is treating it as a risk measure. It measures volatility, which is not the same thing.
Related
Volatility is the denominator and why it is not risk. Drawdown is the downside-only measure the Sharpe ratio leaves out. And expectancy is the per-trade version of the same question.
The habit worth keeping is refusing to accept a Sharpe ratio without the window it was measured over. Over six months, in a market that only went one way, a very ordinary strategy produces an impressive one. The number is not wrong; it is answering a question about a period nobody should care about.
— Michael Whitman
This page is educational, not financial advice. Test every idea on your own charts before risking money.