What this calculator shows
Paste or type a list of periodic returns in percent, one per line or separated by commas, up to 600 of them. Choose whether each return covers a month, a week, a trading day or a year, and enter a yearly risk-free rate and, if you like, a yearly target return for the Sortino ratio. The calculator returns the count, the mean, the sample standard deviation, the downside deviation, the Sharpe and Sortino ratios per period and annualised, and the largest drawdown. It has no market data: every number is one you type in.
How the numbers are worked out
- Yearly rates are divided by the periods in a year, so 3% a year is 0.25% a month.
- Standard deviation is the sample version: squared gaps from the mean, summed, divided by n − 1, then the square root.
- Downside deviation keeps only shortfalls below the target, squares and sums them, divides by all n periods (not only the losing ones), then takes the square root.
- Sharpe = (mean − risk-free rate) ÷ standard deviation. Sortino = (mean − target) ÷ downside deviation.
- The annualised ratio is the per-period ratio × √(periods a year), an approximation.
- Max drawdown compounds the returns and finds the largest fall from a peak.
When every return is the same, the standard deviation is 0 and the Sharpe ratio is shown as "n/a". When no period falls below the target, the Sortino ratio is "n/a" for the same reason.
Worked example (hypothetical)
The defaults are six monthly returns: 2, −1, 3, 1, −2 and 3, with a 3% yearly risk-free rate. The mean is 1% and the excess return 0.75%. The standard deviation is about 2.0976, so the Sharpe ratio is about 0.3575 a month, or 1.2386 annualised. The downside deviation is about 1.0508, so the Sortino ratio is about 0.7137, or 2.4725 annualised. The largest drawdown is 2%.
Limits of this model
- A higher or lower ratio is not a verdict. Short samples move the ratios a lot, few shortfalls make the Sortino ratio fragile, and returns with rare large losses can look calm until the loss arrives.
- The √ rule assumes independent periods and ignores compounding. The method comes from Sharpe and Sortino ratios, explained, and losses from a peak are covered in drawdown and concentration.
- This is education, not a recommendation about any security.
For educational purposes only. This material does not provide investment advice.