Home › Guides › Sortino Ratio

TESTING TRAPFREENO ACCOUNTAUTOMATED TRADE BOTSSortino RatioWhy a good backtest can lieEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on sortino ratio. Education only, with example numbers labelled.
TESTING TRAP

Sortino Ratio

Short answer

The Sortino ratio is the average return divided by the downside deviation: a measure of how far returns fall below a target, usually 0 or the return on a safe deposit. Swings above the target are not counted as risk.

Sharpe counts every swing as risk. Sortino counts only the swings below a target. The difference matters most for bots whose wins are lumpy.

The page explains the idea in plain words, works through the arithmetic with a table, and shows how it hits grid, martingale and DCA bots, then tells you what to check before you run one.

  • A worked example with real arithmetic
  • How it hits grid, martingale and DCA bots
  • How to check for it before you run a bot
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Next: work out the Sharpe ratio too

The Sharpe ratio calculator takes your returns and gives the ratio, so you can compare it with the Sortino.

Reading time4 minutes
Worked exampleExact arithmetic
Tools linked1 on this page
Reviewed28 Oct 2026

What is included

  • What it is, in plain words
  • The formula or mechanism, with exact arithmetic
  • How it hits grid, martingale and DCA bots
  • A check you can run before you switch a bot on

Who it is for

  • People who run or plan to run a trading bot
  • Anyone reading a backtest or a bot sales page
  • Readers who want the numbers, not the pitch
  • Not advice, and not a signal service
Sharpe and Sortino ratios of two made-up bots, monthly, no annualising0.66Bot XSharpe3.13Bot XSortino0.66Bot YSharpe0.90Bot YSortinoTwelve made-up monthly returns each, safe rate and target 0. Calculated by us on 29 Oct 2026, exact.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • The Sortino ratio is the average return divided by the downside deviation: a measure of how far returns fall below a target, usually 0 or the return on a safe deposit. Swings above the target are not counted as risk.
  • The Sharpe ratio divides by the standard deviation of all returns, so a big win raises the divisor as much as a big loss does.
  • In the worked example, bot X averaged 3.5% a month with a worst month of -2%, and bot Y averaged 2.08% with a worst month of -8%. Sharpe gave X 0.66 and Y 0.66. Sortino gave X 3.13 and Y 0.90 (calculated by us on 29 Oct 2026, exact).
  • The two bots have the same Sharpe ratio, 0.66, and very different Sortino ratios. X's volatility is mostly gains and Y's is mostly one loss, and Sortino separates them.
  • Neither ratio says a bot is safe. Both are computed from a past record, and a short record says little.

The formula

Sharpe = (average return - safe rate) / standard deviation of all returns
Downside deviation = square root of the average of (the return below the target, or 0)^2
Sortino = (average return - target) / downside deviation

The downside deviation squares only the returns below the target and counts every other month as 0. So a month of +10% adds nothing to it, and a month of -8% adds 64 to the sum. In the table the target and the safe rate are both 0, so the sums stay visible. Real versions use the safe rate and a minimum acceptable return, and annualise by multiplying a monthly ratio by the square root of 12, which is about 3.46.

A worked example with two bots

Bot X wins big and loses small: 8, -1, 9, -2, 7, -1, 10, -2, 8, -1, 9, -2 (percent a month). Bot Y gains a little every month and then loses a lot: 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -8.

Average returnStandard deviationDownside deviationSharpeSortinoWorst month
Bot X3.50%5.28%1.12%0.663.13-2%
Bot Y2.08%3.18%2.31%0.660.90-8%

Bot X has a large standard deviation, 5.28%, because its wins are far from its average. Sharpe counts that as risk. But none of its losing months loses more than 2%, and its downside deviation is just 1.12%. Its Sortino of 3.13 is much higher than its Sharpe of 0.66, and the same Sharpe as bot Y. Bot Y moves very little in most months, so its standard deviation is 3.18%, but the single -8% month dominates its downside deviation, 2.31%. Its Sortino is 0.90, against a Sharpe of 0.66.

That is the whole point of the measure. It asks "how bad were the bad months compared with the average", and ignores how good the good months were. For a bot with lumpy wins, such as a trend-following rule, it is fairer than Sharpe. For a bot that takes small gains and hides rare large losses, such as a martingale or a short option seller, a short record can show a high ratio of either kind until the loss arrives.

Sharpe and Sortino ratios of two made-up bots, monthly, no annualising0.66Bot XSharpe3.13Bot XSortino0.66Bot YSharpe0.90Bot YSortinoTwelve made-up monthly returns each, safe rate and target 0. Calculated by us on 29 Oct 2026, exact.
Bot X looks more volatile than Bot Y by standard deviation and much safer by downside deviation. Which ratio you read changes the story.

Where the Sortino ratio misleads

  • A short record. Twelve months that contain no bad month give a downside deviation near zero and a huge ratio. Bot Y's ratio would be unbounded if its bad month were left out. See survivorship bias.
  • The choice of target. A target of 0 and a target of 1% a month give different answers for the same returns. Compare ratios only if the target is the same.
  • Fitting the record. A bot tuned to a past period can post a high ratio on it and a low one later. See overfitting.
  • Frequency. A daily ratio and a monthly ratio are not the same number, and annualising assumes returns are independent from period to period.
  • Ignoring the depth. Neither ratio shows how long a fall lasted or how deep it got. Read it with max drawdown.

How to use it

Calculate both ratios on the same returns and look at the gap. A Sortino far above the Sharpe says the volatility is mostly on the upside. A Sortino close to the Sharpe, or below it, says the risk is in the losses. The Sharpe ratio calculator does the first half, and the backtest analyzer describes a list of trades. Then ask whether the record is long enough to mean anything.

What this page does not tell you

It does not say which ratio is better, or what a good value is. The returns are made up, the safe rate is set to 0, and this is education, not advice.

FAQ

Frequently Asked Questions

What is the Sortino ratio?

A risk-adjusted return measure: the average return divided by the downside deviation, which counts only returns below a target. It does not treat large gains as risk.

What is the difference between the Sharpe and the Sortino ratio?

Sharpe divides by the standard deviation of all returns, so big gains count as risk. Sortino divides by the downside deviation, so only returns below the target count.

How do you calculate the Sortino ratio?

Subtract the target from the average return, then divide by the square root of the average of the squared shortfalls, where every return above the target counts as zero.

What is a good Sortino ratio?

There is no single good value. It depends on the target, the period, the number of observations and whether the record was fitted to the past. Compare like with like.

Can a high Sortino ratio be misleading?

Yes. A short record with no bad month gives a very high ratio, and strategies that hide rare large losses can look strong until the loss arrives.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It is general education about a calculation. The returns are made up and it does not consider your situation.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss