In one sentence
The Sharpe ratio divides your average return by how much your returns swing, and the Sortino ratio divides it by how much they swing downwards only, so you can compare strategies on return per unit of risk.
How it works
Two strategies that both make 20% in a year are not equal if one did it smoothly and the other lurched through three nasty months. Sharpe and Sortino put a number on that difference.
The Sharpe ratio uses the standard deviation of all returns, so big winning months count as "risk" as well as losing ones. The Sortino ratio only counts the months below a target, usually zero, which fits how punters feel about risk.
Both come from finance, where a risk-free interest rate is subtracted from returns first. For a betting bank that rate is small and often left out, but say so when you quote the figures.
The maths
- r bar is the average return per period, for example per month.
- r with subscript f is the risk-free rate, taken as zero here.
- σ is the standard deviation of all period returns.
- σ with subscript d is the downside deviation: only losing periods count, and winning periods count as zero.
- n is the number of periods.
In plain English: how much you earn for each unit of wobble, with Sortino only counting the wobbles that hurt.
Worked betting example
A Betfair football trading bank returns these monthly percentages, after commission, over a year (illustrative figures):
+4.0, −2.5, +6.0, +1.5, −3.0, +5.5, +2.0, −1.0, +3.5, −4.0, +7.0, +1.0
- Total: +20.0 percentage points. Average: 1.67% a month.
- Standard deviation (sample): 3.69%.
- Monthly Sharpe: 1.67 ÷ 3.69 = 0.45. Annualised: 0.45 × √12 ≈ 1.57.
- Downside deviation: square the four losing months (6.25, 9, 1, 16, total 32.25), divide by 12 to get 2.69, and take the square root to get 1.64%.
- Monthly Sortino: 1.67 ÷ 1.64 = 1.02. Annualised: about 3.52.
The Sortino ratio is more than double the Sharpe ratio because much of the swing in this record comes from big winning months, which Sortino does not penalise.
Where it's good
- Comparing strategies, bots or tipsters with different stake sizes and turnover.
- Tracking a trading bank month by month to see if performance is getting smoother or rougher.
- Feeding a mean-variance allocation between strategies.
- Sortino in particular for betting, where returns are lopsided and upside swings are welcome.
Limitations and pitfalls
- Twelve months is a tiny sample. The ratio itself has a large margin of error, and a lucky year can show a high Sharpe with no real edge.
- Sharpe assumes swings are roughly symmetric and bell-shaped. Betting returns, especially at long odds or in lay strategies, often are not, and a strategy that makes small steady gains then blows up can look excellent right up to the blow-up.
- The √12 annualisation assumes months are independent and similar, which rarely holds with changing stakes and seasons.
- Results depend on the period chosen: daily, weekly and monthly ratios are not directly comparable.
- Returns must be measured after commission and on a consistent bank definition, or comparisons are meaningless.
- Neither ratio tells you about drawdown depth or length; check those separately.
How to build it
- pandas and numpy: compute period returns, mean, standard deviation and downside deviation in a few lines.
- Use the bootstrap (resampling months) to put a confidence interval around the ratio.
- Data: at least monthly returns after commission, ideally two or more years.
- Practical tip: always quote the period, whether it is annualised and the risk-free rate used.
Related methods
- Drawdown analysis – the risk measure Sharpe misses.
- Mean-variance optimisation – allocation built on the same idea.
- Value at risk – focuses on the bad tail.
- Hypothesis testing – checking whether a ratio is more than luck.
- Bootstrapping – confidence intervals for the ratio.