TL;DR
The Sharpe ratio measures excess return per unit of total volatility: the strategy's return minus the risk-free rate, divided by the standard deviation of returns. The Sortino ratio is similar but divides by downside deviation only, so it penalises harmful volatility and ignores upside swings.
Both are standard ways to compare risk-adjusted performance. Both can mislead when returns are skewed, autocorrelated or measured over short periods.
Key points
- Sharpe = (return minus risk-free rate) divided by volatility.
- Sortino = (return minus target return) divided by downside deviation.
- Annualise daily Sharpe by multiplying by the square root of the number of trading periods, often about 252 days.
- A high Sharpe on a short or overfitted backtest proves very little.
The Sharpe ratio
Sharpe ratio = (Rp − Rf) / σp
Where Rp is the portfolio return, Rf is the risk-free rate, and σp is the standard deviation of portfolio returns over the same period. The measure was introduced by William F. Sharpe.
The Sortino ratio
Sortino ratio = (Rp − T) / σd
Where T is a target or minimum acceptable return (often zero or the risk-free rate), and σd is downside deviation: the standard deviation calculated using only returns below the target.
Worked example
A strategy returns 12% a year with 16% annual volatility. The risk-free rate is 4%, and the downside deviation below a 4% target is 10%.
| Measure | Calculation | Result |
|---|---|---|
| Sharpe ratio | (12% − 4%) / 16% | 0.50 |
| Sortino ratio | (12% − 4%) / 10% | 0.80 |
The Sortino ratio is higher because much of the strategy's volatility comes from upside moves, which Sortino does not penalise.
Annualising
If you calculate Sharpe on daily returns, multiply by the square root of the number of trading days, commonly about 252. For monthly data, multiply by the square root of 12. This scaling assumes returns are independent from period to period; autocorrelated returns make it inaccurate.
When each ratio misleads
Skewed returns. Strategies that earn small, steady gains and occasionally lose heavily, such as selling options, can show a high Sharpe until the loss arrives.
Short samples. Sharpe estimates are noisy. Under simplifying assumptions, the standard error of an annualised Sharpe estimate shrinks only with the square root of the number of years observed, so a few years of data leave wide uncertainty.
Overfitting. Testing many strategy variants and reporting the best one inflates Sharpe. Out-of-sample testing and adjustments for multiple testing matter.
Capacity. High-frequency strategies can show very high Sharpe ratios on small capital that do not survive scaling.
Downside deviation choices. Sortino results change with the target return and calculation method, so comparisons require the same definition.
Sharpe versus Sortino
| Sharpe ratio | Sortino ratio | |
|---|---|---|
| Risk measure | Total volatility | Downside deviation |
| Treats upside volatility as risk | Yes | No |
| Best for | Roughly symmetric returns, broad comparisons | Asymmetric returns, downside-focused investors |
| Main weakness | Penalises good volatility; hides tail risk | Sensitive to target choice; fewer data points below target |
Questions quant interviewers ask
- How would you annualise a Sharpe ratio calculated on daily returns, and what assumption does that rely on?
- A backtest shows a Sharpe of 4. What would you check before believing it?
- Why might a short-volatility strategy have a high Sharpe but be dangerous?
- When would you prefer Sortino over Sharpe?
- How does leverage affect the Sharpe ratio, ignoring financing costs?
- How confident are you in a Sharpe of 1.5 estimated from two years of monthly data?
A useful answer to question 5: scaling returns and volatility by the same leverage factor leaves Sharpe unchanged before costs, which is why it is used to compare strategies of different sizes.
Why this matters for quant careers
Risk-adjusted return is part of everyday language in quant research and portfolio management. Interviewers use these ratios to test whether candidates understand estimation error and overfitting, not just formulas. See the skills firms assess in the HFT skills matrix.
Calculating Sharpe from daily returns, step by step
- Collect daily returns for the strategy over the period.
- Subtract the daily risk-free rate from each return to get excess returns.
- Calculate the mean and standard deviation of the excess returns.
- Divide the mean by the standard deviation to get the daily Sharpe ratio.
- Multiply by the square root of 252 to annualise.
If average daily excess return is 0.05% and daily standard deviation is 1%, the daily Sharpe is 0.05. Annualised, that is about 0.05 × 15.87, or roughly 0.79.
```python import numpy as np
def sharpe(returns, rf_daily=0.0, periods=252): excess = np.asarray(returns) - rf_daily return excess.mean() / excess.std(ddof=1) * np.sqrt(periods)
def sortino(returns, target_daily=0.0, periods=252): r = np.asarray(returns) downside = np.minimum(r - target_daily, 0) dd = np.sqrt((downside ** 2).mean()) return (r.mean() - target_daily) / dd * np.sqrt(periods) ```
The Sortino function above uses one common definition of downside deviation: the root mean square of shortfalls below the target, calculated across all periods. Other definitions exist, so always state which one you use.
Related risk-adjusted measures
| Measure | Formula idea | When it is used |
|---|---|---|
| Information ratio | Active return over a benchmark divided by tracking error | Judging managers against a benchmark |
| Treynor ratio | Excess return divided by beta | Portfolios that are part of a diversified whole |
| Calmar ratio | Annualised return divided by maximum drawdown | Strategies where drawdowns matter most, such as managed futures |
| Omega ratio | Probability-weighted gains above a threshold relative to losses below it | Non-normal return distributions |
| Deflated Sharpe ratio | Sharpe adjusted for the number of strategies tried and non-normal returns | Guarding against overfitting in research |
The deflated Sharpe ratio, introduced by David Bailey and Marcos López de Prado, is especially relevant to quant research because it penalises the selection bias that comes from testing many variants.
How practitioners use these ratios
Researchers use Sharpe to compare signals, but combine it with turnover, capacity and costs. A signal with a lower Sharpe but much higher capacity may be more valuable.
Portfolio managers watch rolling Sharpe and drawdowns to detect when a strategy stops working, and to size positions.
Allocators and CIOs compare managers on Sharpe, Sortino and drawdown together, and ask how results were produced before trusting them. See how this shapes investment leadership hiring.
Model answers to common interview questions
How confident are you in a Sharpe of 1.5 from two years of monthly data? Not very. With 24 observations the estimate has wide uncertainty, and under simple independence assumptions the standard error of an annualised Sharpe estimate is roughly the square root of one divided by the number of years, which is about 0.7 here. The true Sharpe could plausibly be far lower.
A backtest shows a Sharpe of 4. What do you check? Look-ahead bias, survivorship bias in the data, realistic transaction costs and slippage, capacity, the number of variants tested, out-of-sample and live results, and whether returns are autocorrelated or dependent on a single period.
Why can a short-volatility strategy show a high Sharpe? Its returns are negatively skewed: frequent small gains and rare large losses. Standard deviation over a calm sample understates tail risk until a large loss occurs.
Frequently asked questions
Is a higher Sortino ratio always better than a higher Sharpe ratio?
No. They measure different things. A strategy can have a strong Sortino but a weak Sharpe if most volatility is upside. Compare strategies using the same measure, calculated the same way.
What is a good Sharpe ratio?
It depends on the strategy, horizon and capacity. Long-only equity portfolios and high-frequency strategies have very different typical ranges, so compare like with like and always consider the sample length.
Does leverage change the Sharpe ratio?
Before financing costs, scaling returns and volatility by the same factor leaves Sharpe unchanged. In practice, financing costs, margin constraints and non-linear risks can reduce it.
