Sortino ratio in trading: formula and what a good value is
The Sortino ratio formula with a worked example, the calculation slip that halves it, how it differs from the Sharpe ratio, what a good value is and how to get it out of MT5.

The Sortino ratio is a strategy's average return above a target, divided by its downside deviation, which measures how far the returns fell below that target. Traders usually set the target to zero. Unlike the Sharpe ratio, it ignores swings above the target, so a big winning month doesn't count as risk. As a rough guide, an annual Sortino ratio above 2 is good, and it usually comes out higher than the Sharpe ratio for the same returns.
The MT5 Strategy Tester doesn't report it, so you'll usually work it out yourself from monthly returns. A spreadsheet formula for that is in the worked example below.
The Sortino ratio formula
Sortino ratio = (average return − target return) ÷ downside deviation
The ratio is named after Frank Sortino. The target return, also called the minimum acceptable return, is the line below which a period counts as a loss. Traders testing a strategy usually set it to zero, so every losing month counts. A fund manager might use the interest rate on cash instead.
The downside deviation is worked out like a standard deviation, with two changes: it is measured from the target, not from the average, and every period at or above the target counts as zero.
- Take each period's return minus the target. Where the result is above zero, use zero.
- Square the results and add them up.
- Divide by the number of periods, all of them, including the ones that counted as zero.
- Take the square root.
The ratio comes out in the unit of the returns you used. To scale a monthly figure to a year, multiply it by the square root of 12, as with the Sharpe ratio. That shortcut assumes one month doesn't depend on the last, but it's what most published figures use.
A worked example
Take the same 12 monthly returns as in our Sharpe ratio guide: 3, −1, 2, 4, −2, 1, 2, −3, 5, 1, 0 and 2 percent. The target is zero.
- Average monthly return: 14 ÷ 12 = 1.17%.
- Losing months: −1, −2 and −3. Their squares are 1, 4 and 9, which add up to 14. The other nine months count as zero.
- Downside deviation: √(14 ÷ 12) = 1.08%.
- Monthly Sortino ratio: 1.17 ÷ 1.08 = 1.08.
- Annual Sortino ratio: 1.08 × √12 (3.46) = 3.74.

The Sharpe ratio for the same months is 1.71. The Sortino ratio is more than twice that because nine of the twelve months are at or above zero, and it leaves all of them out.
In Excel or Google Sheets, with the monthly returns in B2:B13 and a target of zero, the formula is =AVERAGE(B2:B13)/SQRT(SUMPRODUCT((B2:B13<0)*B2:B13^2)/COUNT(B2:B13))*SQRT(12).
The slip that halves it
It's easy to divide by the number of losing months instead of all the months. In the example that gives √(14 ÷ 3) = 2.16% instead of 1.08%, and the annual Sortino ratio drops from 3.74 to 1.87.
Running a standard deviation over the losing months alone is also off, for a different reason: it measures how the losses differ from each other, not how far below zero they went. Three losing months of −5% each would give a standard deviation of zero.
So before you compare a Sortino ratio from a website, a report or a forum post with your own, find out how it was worked out, because the versions give very different numbers.
Sharpe ratio vs Sortino ratio
The Sharpe ratio divides by the standard deviation of all returns. A month far above the average raises it as much as a month the same distance below. The Sortino ratio only counts the months below the target.
Here are two made-up strategies, both averaging +1% a month over a year:
- Few big wins: 6, −1, −1, 5, −1, −2, 7, −1, −1, −2, 5 and −2. Annual Sharpe 0.97, annual Sortino 2.91.
- Many small wins: 3, 2, 3, 2, −7, 3, 2, 3, 2, −6, 3 and 2. Annual Sharpe 0.98, annual Sortino 1.30.

Their Sharpe ratios are almost the same. The Sortino ratio separates them: the first strategy's big moves are its winning months, and the second one's are two losing months. The second strategy lost 7% in a single month. The first one's worst fall from a high was about 4%, spread over three months.
Read the two side by side. If the Sortino ratio is far above the Sharpe ratio, most of the swings were gains. If it's only a little higher, losses make up much of the swings, and the drawdown needs a closer look.

What is a good Sortino ratio?
There's no official scale. Because the Sortino ratio usually comes out higher than the Sharpe ratio, the Sharpe ratio's cut-offs don't carry over. This is how we read an annual Sortino ratio, with a target of zero, on an EA backtest run on real ticks with realistic costs:
- Below 0: the strategy lost money in that test.
- 0 to 1: the losing months were large for what the strategy earned.
- 1 to 2: worth taking further, into out-of-sample tests and a demo account.
- 2 and up: good. If it sits far above the Sharpe ratio of the same test, make sure the losses haven't simply stayed open (see below).
Compare a Sortino ratio only with one worked out the same way: the same target, the same return period and the same scaling to a year, and over the same dates when you compare two strategies.
When we test an EA, we work out the Sharpe and Sortino ratios from the monthly equity of a real-tick test with realistic spread and commission and read them together. If the Sortino ratio is barely above the Sharpe ratio, the big moves in that test were losses, so we look at the largest losing months and the equity drawdown before anything else.
Where to find the Sortino ratio in MT5 and MT4
- MT5 Strategy Tester: the report lists Sharpe Ratio, Profit Factor, Recovery Factor, Expected Payoff and more, but no Sortino ratio. The full list is in the MT5 testing report help.
- MT4 Strategy Tester: there's no Sortino or Sharpe ratio in the report.
- To work it out yourself, take the deals from the test into a spreadsheet, note the balance at the end of each month, turn the changes into monthly returns in percent and use the formula above.
- During optimisation: MT5 has no Sortino criterion. Its Custom max criterion ranks the passes by the value the EA returns from its OnTester() function, as the MT5 optimisation help describes. An EA can work out its own Sortino ratio from its deal history at the end of a test and return it there. If we build an EA for you, we can add that (custom EA development).
When a high Sortino ratio misleads
Losses that are still open
A grid or martingale EA closes small winners and holds its losing positions open. Month after month ends with closed profits, so the downside deviation of the balance stays near zero and the Sortino ratio looks excellent. If a strategy holds trades across month ends, work the returns out from equity rather than balance. Our article on grid and martingale EA risks explains how these systems fail.
Too few losing months
The downside deviation rests on the losing months alone, and the worked example had three. Change the −3% month to −6% and the annual Sortino ratio falls from 3.74 to 1.72. A test with no losing months gives no Sortino ratio at all, because it divides by zero. Use more years of data, or weekly returns, before you trust the figure.
Settings tuned on the same data
Optimised settings give their best Sortino ratio on the data they were tuned on. Read it from the out-of-sample periods of a walk-forward optimization instead.
Sortino, Sharpe, profit factor and drawdown
Profit factor compares what the winning trades made with what the losing trades cost. The Sharpe and Sortino ratios look at how the returns arrived over time, one counting all the swings and the other only the falls. The maximum drawdown is the worst fall you'd have sat through, and a Monte Carlo simulation of the trades shows how much deeper it could get. For an EA you're thinking of buying, our guide on how to judge an Expert Advisor lists the other checks.
FAQ
Is a Sortino ratio of 2 good?
As an annual figure with a target of zero, yes, as long as it holds on data the settings weren't tuned on and the test used realistic costs. Look at the Sharpe ratio of the same test as well.
Can the Sortino ratio be negative?
Yes. It's negative when the average return is below the target. With a target of zero, that means the strategy lost money over the period.
Why is the Sortino ratio higher than the Sharpe ratio?
It leaves out the swings above the target, so for most strategies it divides by a smaller number. The bigger the gap between the two, the more of the swings were winning months.
Is a higher Sortino ratio always better?
Between two honest tests worked out the same way, yes. A very high value from a short test, optimised settings or a grid EA usually means the losses haven't shown up in the closed returns yet.
Keep reading: the Sharpe ratio, profit factor, the MT5 Strategy Tester guide and how to judge an Expert Advisor.
Risk note: trading forex carries a high level of risk and may not be suitable for everyone. This article is for education only and is not financial advice.
Have a strategy you want automated?
We turn trading rules into tested Expert Advisors for MT4 and MT5. Tell us how you trade and we'll send a specification and a quote.
More articles

Trading expectancy: formula, worked example and good values
The expectancy formula with a worked example in R, how spread and commission eat it on tight stops, how many trades you need, where MT5 shows it and what a good value is.
Read article
Sharpe ratio in trading: formula and what a good value is
The Sharpe ratio formula with a worked example, what a good value is, where MT5 shows it and how it rates it, and why smooth grid EAs and short tests can fake a high one.
Read article
Monte Carlo simulation in trading: how to run and read it
What a Monte Carlo simulation does to a backtest, reshuffling vs resampling, how to run one on an MT5 trade list, a worked 200-trade example, and what it can't fix.
Read article