Sub topic 10
Risk-adjusted return with the Sharpe ratio
This chapter assumes you can already compute period and cumulative returns, know the difference between price and total return, and are comfortable with mean, standard deviation and covariance. The earlier chapters on active return, tracking error and the information ratio are useful background, because the Sharpe ratio is easy to confuse with the information ratio.
Why return alone can mislead
A portfolio that earned 9% in a year looks better than one that earned 8%. If the first portfolio swung twice as hard to get there, it is less clear which one is better. The investor who owns the first portfolio had to sit through larger losses on the way.
A risk-adjusted return measure puts return and risk into one number so that portfolios with different volatility can be compared. The Sharpe ratio is the most common of these measures. It answers one question: how much return above a risk-free investment did you earn for each unit of total volatility?
The definition
The Sharpe ratio is the mean excess return divided by the standard deviation of excess returns. Excess return is the portfolio return minus the risk-free return for the same period.
Sharpe = mean(Rp - Rf) / stdev(Rp - Rf)Three details matter:
- The numerator is an arithmetic mean of periodic excess returns, not a compounded return.
- The denominator is the sample standard deviation (
ddof=1) of the same excess returns. It measures total risk, including market risk that you cannot diversify away. - Rf is the risk-free rate for each period. A Treasury bill or money market rate matched to your currency and period length is typical.
A Sharpe ratio of 0.5 means the portfolio earned half a percentage point of excess return per percentage point of volatility. Higher is better, and a negative value means the portfolio did worse than cash.
Annualizing correctly
Monthly data is the usual input, and results are usually quoted per year. The mean scales with time and the standard deviation scales with the square root of time, so the Sharpe ratio scales with the square root of the number of periods:
Sharpe_annual = Sharpe_monthly * sqrt(12)Never annualize the mean by one rule and the volatility by another and then divide, unless you apply the same scaling shown above. Mixing a compounded annual return with an annualized volatility gives a number that is not a Sharpe ratio. It will usually be close, but it will not be comparable with figures reported elsewhere.
The risk-free rate must also be converted to the period frequency. An annual rate of 3% corresponds to a monthly rate of (1.03) ** (1/12) - 1, which is about 0.247%, not 0.25% by simple division. For short series the difference is small, but it is a common source of mismatches between tools.
A reusable implementation
The code below computes the annualized Sharpe ratio and its approximate standard error. It uses simulated returns so that it runs as shown.
import numpy as np
def sharpe_ratio(returns, rf=0.0, periods_per_year=12):
"""Annualized Sharpe ratio from periodic returns.
rf can be a scalar or an array with one risk-free return per period.
"""
excess = np.asarray(returns, dtype=float) - np.asarray(rf, dtype=float)
sd = excess.std(ddof=1)
if sd == 0:
return float("nan")
return excess.mean() / sd * np.sqrt(periods_per_year)
def sharpe_standard_error(sharpe_annual, n_periods, periods_per_year=12):
"""Approximate standard error, assuming independent, roughly normal returns."""
sr_period = sharpe_annual / np.sqrt(periods_per_year)
se_period = np.sqrt((1 + 0.5 * sr_period**2) / n_periods)
return se_period * np.sqrt(periods_per_year)
rng = np.random.default_rng(42)
n = 60 # five years of monthly data
portfolio = rng.normal(0.008, 0.04, n)
benchmark = rng.normal(0.007, 0.035, n)
rf_annual = 0.03
rf_monthly = (1 + rf_annual) ** (1 / 12) - 1
sr_p = sharpe_ratio(portfolio, rf_monthly)
sr_b = sharpe_ratio(benchmark, rf_monthly)
print(f"Portfolio Sharpe: {sr_p:.2f} +/- {sharpe_standard_error(sr_p, n):.2f}")
print(f"Benchmark Sharpe: {sr_b:.2f} +/- {sharpe_standard_error(sr_b, n):.2f}")
print(f"Difference: {sr_p - sr_b:.2f}")The exact values depend on the simulated draws. Look at the size of the standard error relative to the difference between the two Sharpe ratios. That comparison is the next topic.
Comparing the portfolio with its benchmark
Computing the Sharpe ratio for both the portfolio and the benchmark gives a risk-adjusted comparison that complements the active return. The benchmark's Sharpe ratio is the hurdle. A portfolio that beats the benchmark on return but has a lower Sharpe ratio took more risk than the extra return justified.
| Portfolio | Annual return | Volatility | Risk-free | Sharpe |
|---|---|---|---|---|
| A | 10% | 14% | 3% | 0.50 |
| B | 8% | 8% | 3% | 0.625 |
Portfolio A has the higher return, but B earned more excess return per unit of risk. If an investor could lever B up by borrowing at the risk-free rate until its volatility matched A's, B would deliver more return than A at the same risk. Borrowing to hold 1.5 times B gives volatility of 12% and a return of 3% + 1.5 × 5% = 10.5%. The Sharpe ratio stays at 0.625, which is why it does not change with leverage or with mixing in cash.
How it differs from the information ratio
The Sharpe ratio and the information ratio have the same shape (average divided by volatility) but different inputs.
| Feature | Sharpe ratio | Information ratio |
|---|---|---|
| Return measured | Excess over the risk-free rate | Active return over the benchmark |
| Risk measured | Standard deviation of total returns | Tracking error |
| Question answered | Was risk rewarded compared with cash? | Was benchmark deviation rewarded? |
| Best used for | Stand-alone or whole-portfolio comparison | Judging an active manager against a mandate |
A benchmark-hugging fund can have a good Sharpe ratio in a strong market simply because the market was strong. Its information ratio will be near zero. Use both together: the Sharpe ratio for the investor's overall experience, the information ratio for the manager's skill relative to the mandate.
Common errors and limits
- Forgetting the risk-free rate. Dividing mean return by volatility is not a Sharpe ratio. It can overstate the ratio when rates are high.
- Price-only returns. Dividends belong in the numerator. Using price returns understates income-heavy portfolios.
- Short samples. With 36 months of data, the standard error of an annual Sharpe ratio near 0.5 is about 0.58. The measured value is then statistically indistinguishable from zero, and a gap of 0.2 between two portfolios is mostly noise.
- Smoothed returns. Illiquid assets such as private funds or appraisal-based real estate report smoothed prices. The smoothing lowers measured volatility and inflates the Sharpe ratio.
- Skewed returns and tail risk. Strategies that sell options collect small steady gains with rare large losses. Standard deviation hides the tail, so the Sharpe ratio looks excellent until the loss arrives. Pair it with drawdown measures.
- Negative excess returns. When mean excess return is negative, a higher volatility makes the ratio less negative, so the ranking reverses. Do not rank losing portfolios by Sharpe ratio alone.
- Changing risk. A single Sharpe ratio over a period when the strategy changed its leverage or mix describes none of the versions well. Compute rolling values to see the change.
Choosing the risk-free rate
Match the rate to the currency of the returns and to the period length. For a euro portfolio, use a euro short-term rate, not a US Treasury bill rate. If you use a constant rate over a multi-year period when actual short rates moved a lot, the Sharpe ratio will mismeasure excess return. Prefer a series with one value per period, as the function above accepts. Document which series you chose, because changing it changes the result.
Summary of the working model
The Sharpe ratio is a quick, comparable summary of reward per unit of total risk. It is reliable when returns are roughly symmetric, the sample is long enough, and both portfolio and benchmark are measured identically. It is unreliable for illiquid, option-like or short-history strategies. Treat it as one input to the periodic review alongside active return, tracking error, the information ratio and drawdowns.
Exercise
A portfolio returned 9% a year with 12% volatility. Its benchmark returned 8% with 10% volatility. The risk-free rate is 3%. Compute each Sharpe ratio and say which one looks better after adjusting for risk.
Show answer
Portfolio: (9% - 3%) / 12% = 0.50. Benchmark: (8% - 3%) / 10% = 0.50. Both are equal. The portfolio earned 1 percentage point more return, but it took proportionally more risk, so there is no risk-adjusted advantage.
Exercise
A fund has 36 months of data and an annualized Sharpe ratio of 0.5. Using the approximation SE = sqrt((1 + 0.5 * SR_period^2) / n) for the per-period ratio, estimate the standard error of the annualized Sharpe ratio. Is 0.5 clearly different from zero?
Show answer
SRperiod = 0.5 / sqrt(12) = 0.1443. SEperiod = sqrt((1 + 0.5 0.1443^2) / 36) = sqrt(1.0104 / 36) = 0.1675. Annualized: 0.1675 sqrt(12) = about 0.58. The estimate 0.5 is less than one standard error from zero, so it is not clearly different from zero.