The idea
The Sharpe ratio treats all variation as risk, which means an unusually profitable week lowers your score. Traders find that backwards: nobody is harmed by upside.
Sortino keeps the structure and replaces the denominator. Instead of the deviation of all days, it uses the deviation of the losing days only:
Sortino = (mean daily result ÷ downside deviation) × √252
Everything else matches our Sharpe implementation — daily sums of net P&L, currency rather than returns, no risk-free rate subtracted, and the days you did not trade absent from the series entirely. Those three assumptions are explained on the Sharpe page and they apply here unchanged.
The disagreement: what you divide by
Downside deviation is a root-mean-square of the negative days. The dispute is the count underneath:
Convention A — divide by all periods.
downside deviation = √( Σ (negative days)² ÷ N total days )
Convention B — divide by losing periods only.
downside deviation = √( Σ (negative days)² ÷ N losing days )
Because the losing days are a subset, convention B always divides by the smaller number. That makes the downside deviation larger, and therefore the Sortino ratio smaller, whenever there was at least one winning day.
The gap is not cosmetic. On a series where a third of days lose, convention B's denominator is roughly 1.7 times convention A's, and the reported ratio is about 40% lower from exactly the same trades.
Ours uses convention B — the average is taken over losing days. It is the more conservative reading, and it answers a question a trader can actually feel: on a bad day, how bad is bad, relative to what a typical day earns. Convention A instead blends that with how often bad days happen, which is information the ratio does not need because the mean in the numerator already carries it.
Neither is a mistake. What is a mistake is comparing a figure from one convention against a figure from the other, which happens constantly because most tools state neither.
The target is zero
Both conventions need a threshold below which a day counts as downside. The general definition allows any minimum acceptable return; ours uses zero — a losing day is a day that lost money.
Setting the target above zero (say, a required daily gain) turns break-even days into downside and lowers the ratio. That is a legitimate variant and a different measurement, and it is worth knowing that a ratio quoted without a stated target is ambiguous.
The edge case: no losing days
If the account has no losing days, the denominator is zero and the ratio is undefined. The three ways of handling that are the same three that profit factor faces, and the choice is identical here: ours returns no value rather than infinity or a large placeholder.
This comes up more than expected on short samples. A first week of four profitable days produces no Sortino ratio at all, and that is the honest output — four days is not evidence of anything, and a number would imply otherwise.
Reading it against Sharpe
The two together say something neither says alone:
- Sortino much higher than Sharpe — your variation is mostly on the winning side. Large winners, contained losers. Usually a good sign, occasionally a sign that one outsized winner is carrying the record.
- Sortino close to Sharpe — losses and gains vary about equally.
- Sortino below Sharpe — the variation is concentrated in the losses. Under convention B this needs care, since the conservative denominator pushes the figure down on its own; check whether the losing days are genuinely more scattered than the winning ones before reading it as a finding.
Neither ratio sees order. A run of losses arriving consecutively scores the same as the identical losses spread across a year, and only maximum drawdown and the losing streak view read the sequence.