Skip to content
← Back to all metrics

Metrics / Sharpe

Sharpe Ratio

2 min read · Metric

In everyday words

How much you gained for each bump in the road. Two trips can end in the same place, and one can be far rougher.

An example in pounds

You put in £1,000 and a year later have £1,080. A savings account would have paid £20, so the rule earned £60 more. On the way its value swung up and down by about £120. That is £60 for £120 of swinging: a score of 0.5.

The short version

The growth above what cash paid, divided by how bumpy the ride was.

DrawingA drawing of the idea, not a real result.
  • A smooth ride
  • A bumpy ride
The two lines start and end in the same place. The smooth one has the higher Sharpe ratio, because it bounced around less on the way.

What it is

Two tests can end with the same gain. One climbs steadily. The other lurches up and down on the way. The Sharpe ratio is one number that tells them apart.

It starts with the return above what the money would have earned sitting in cash. Then it divides that by how much the value bounced around. More return for each bounce gives a higher number. The size of the bouncing has a name: volatility.

A worked example

Rule A grew 8% in a year. Cash paid 2%. So the rule earned 6% above cash. Its value bounced around by 12% over the year. 6 divided by 12 is 0.5.

Rule B also earned 6% above cash. Its value bounced around by 6%. 6 divided by 6 is 1.0.

The same extra return, half the bouncing, twice the Sharpe ratio.

What it does not tell you

  • How far it fell. A rule can have a high Sharpe ratio and still have lost a third of its value at some point. The worst fall is a separate figure.
  • Which way the bounces went. A sudden jump up counts against the rule as much as a sudden drop. The Sortino ratio counts only the drops.
  • How much of it is luck. On a year or two of prices, luck alone can move the number a long way.
  • What comes next. It describes the dates tested and nothing after them.

This leaves out how the bouncing is measured and how daily figures become a yearly one. The exact version is below.

On a Quantis result

The Sharpe ratio sits beside two checks on luck. The first is called PSR. It asks how firmly the Sharpe ratio stands above zero, given how many days of prices it was measured on. The second is called DSR. It asks the same after counting every setting of the rule that the test worked out. Neither is a forecast.

Sharpe, PSR and DSR side by side explains both.

The exact mathsFor anyone who wants the detail. Nothing above depends on reading it.

The formula

# Daily returns, annualised
sharpe = (mean(r_daily) - r_f_daily) / std(r_daily) * sqrt(252)

# Monthly returns, annualised
sharpe = (mean(r_monthly) - r_f_monthly) / std(r_monthly) * sqrt(12)

# r_f is the risk-free rate over the same period

The risk-free rate is what cash earned over the same period. The standard deviation is the usual measure of how spread out the returns were: it is the bouncing in the example above. The sqrt(N) term annualises: it turns a figure from daily or monthly returns into a yearly one, so the two can be compared. A daily Sharpe of 0.07 is about 1.1 as a yearly figure (times the square root of 252).

On a Quantis result the returns are per bar (one day of prices, or one month on monthly data), the standard deviation is the sample one (dividing by n minus 1), and the returns include interest on idle cash, so time in cash is not free of return.

Why the number is less firm than it looks

  • It is measured on a sample. A short test gives a wide margin of error, and the margin narrows as the test gets longer.
  • The frequency matters. Daily and monthly returns can give different Sharpe ratios for the same test. Turning a daily figure into a yearly one treats each day as independent of the one before. When good days tend to follow good days (common in trend-following rules), the figure from daily returns reads too high.
  • The shape of the returns matters. Two tests with the same Sharpe ratio can be very different. One has many small gains and a rare large loss (negative skew). The other has many small losses and a rare large gain (positive skew). Sharpe does not tell them apart.

What sits beside it on a result

Quantis shows Sharpe alongside PSR (the probabilistic Sharpe ratio: how firmly the measured Sharpe stands above zero given the number of returns and their shape) and an in-run DSR (the same measure against what the best of the configurations run in that run would be expected to show with no skill). Neither is a forecast. The “Could it be luck?” line goes further and deflates against every test of the same idea in your history. On a small sample, a Sharpe of 1.5 with PSR 70% is much weaker evidence than the headline implies. The PSR and DSR pills are the checks on the headline; they are not the headline.

Read next