Sub topic 1
Risk and return: what diversification trades off
Diversification is often called the only free lunch in investing. That phrase is shorthand, and it hides a trade-off. This chapter defines the terms that trade-off is stated in. It then shows what diversification gives up, what it keeps, and what it cannot touch. Later chapters apply the idea to companies, sectors, and countries.
Prerequisites
This chapter assumes you already know the following:
- What stocks, funds, and ETFs are, and that a fund holds many securities at once.
- How to compute a percentage return and a simple average of returns.
- That higher expected return usually comes with higher risk. You do not need to know why yet.
- Basic Python, enough to read short functions and loops. The code needs only the standard library.
You do not need calculus or statistics beyond the idea of an average and a spread around it.
Expected return and risk, defined
Two numbers describe an investment in this framework.
- Expected return is the average outcome you would anticipate over many possible futures. It is an estimate, not a promise. A stock with a 8% expected annual return may return -25% in one year and +40% in the next.
- Volatility is the standard deviation of returns. It measures how widely returns scatter around their average. A volatility of 20% a year means that, roughly two years out of three, the return lands within 20 percentage points of the average. (That two-in-three figure assumes a bell-shaped distribution. Real returns are not exactly bell-shaped.)
Variance is volatility squared. You will see it in formulas because variances combine more simply than volatilities do.
Volatility is a convenient proxy for risk, but it is not the same thing as risk. Volatility counts large gains and large losses equally. A real investor cares more about the losses, and also about the risk of needing money at a bad moment. Keep this gap in mind. Several limits of diversification, covered in the final chapter, come from it.
The basic trade-off
Investors are compensated for bearing risk, at least on average. Cash-like holdings have low volatility and low expected return. Stocks have higher volatility and higher expected return. Among stocks, small and young companies tend to scatter more than large and established ones.
The simple rule is that, for a single holding, you buy more expected return by accepting more volatility.
Diversification changes this picture because expected return and volatility combine differently when you hold several assets together:
- The expected return of a portfolio is the weighted average of its holdings' expected returns.
- The volatility of a portfolio is at most the weighted average of the holdings' volatilities. It is usually less.
The gap between those two rules is the benefit. You can keep the average return and lose some of the scatter. Both rules need weights, which are the fractions of your money in each holding and add up to 1.
What diversification trades off
Spreading money out is not literally free. It costs you three things.
- The chance of an extreme win. A portfolio with a single stock can multiply in value. A portfolio of 500 stocks almost never does. You give up the lottery-like tail on the upside in exchange for losing the matching tail on the downside.
- Simplicity and sometimes fees. Holding many positions takes more effort, or a fund, and funds charge fees. Broad index funds charge little, but the cost is not zero.
- The ability to be right in a big way. If you correctly identify the one company that beats the market, concentration pays far more. Most people cannot identify such a company in advance, so on average the concentrated bet is a gamble, not an edge.
What diversification does not cost, in theory, is expected return. If two assets have the same expected return, mixing them does not lower it. The combined portfolio has the same expected return and lower volatility.
The split behind the free lunch
Risk in a stock has two sources. Part comes from the company's own circumstances: a product failure, a lawsuit, a good quarter. Part comes from forces that move all stocks together, such as interest rates, recessions, and shifts in investor mood. The next chapter treats these properly. For now, the key fact is that the first kind averages out across many holdings and the second does not.
This is the logic behind the claim that markets pay you for systematic risk but not for idiosyncratic risk. If you could earn extra return by holding risk that others could remove for free, everyone would remove it, and the extra return would vanish. So the risk you can remove cheaply tends not to be rewarded, and removing it costs you little.
Seeing it in numbers
The function below combines two assets that each have an expected return of 8% and a volatility of 20%. It varies the correlation between them. Correlation, covered in its own chapter, is a number from -1 to 1 describing how closely two holdings move together. The code also computes a Sharpe ratio and an approximate compound growth rate. Both are explained after the output.
import math
def portfolio_stats(weights, returns, vols, rho):
w1, w2 = weights
r1, r2 = returns
s1, s2 = vols
exp_ret = w1 * r1 + w2 * r2
variance = (w1 * s1) ** 2 + (w2 * s2) ** 2 + 2 * w1 * w2 * s1 * s2 * rho
return exp_ret, math.sqrt(variance)
risk_free = 0.03
for rho in (1.0, 0.5, 0.0):
ret, vol = portfolio_stats((0.5, 0.5), (0.08, 0.08), (0.20, 0.20), rho)
sharpe = (ret - risk_free) / vol
growth = ret - vol ** 2 / 2
print(f"rho={rho}: return={ret:.3f} vol={vol:.4f} "
f"sharpe={sharpe:.3f} growth={growth:.4f}")
# rho=1.0: return=0.080 vol=0.2000 sharpe=0.250 growth=0.0600
# rho=0.5: return=0.080 vol=0.1732 sharpe=0.289 growth=0.0650
# rho=0.0: return=0.080 vol=0.1414 sharpe=0.354 growth=0.0700Read the output line by line:
- The expected return stays at 8% in every row. Only volatility changes.
- At a correlation of 1.0 the two assets move in lockstep, so mixing them achieves nothing. Volatility stays at 20%.
- At lower correlations volatility falls to 17.3% and then 14.1%, with no loss of expected return.
The Sharpe ratio
The Sharpe ratio is excess return per unit of volatility: (portfolio return - risk-free rate) / volatility. The risk-free rate is the return on a very safe holding such as short-term government bills. Here it is set to 3%. A higher Sharpe ratio means you earn more compensation for each unit of risk. Going from 0.250 to 0.354 means the same two assets, combined well, deliver about 40% more return per unit of risk. That is the "free lunch" stated in numbers.
Why compound growth improves too
Expected return above is an arithmetic average. Your wealth grows at the compound, or geometric, rate, which is lower. A useful approximation is:
geometric return ≈ arithmetic return - variance / 2
This gap is called volatility drag. A portfolio that loses 50% and then gains 50% is down 25%, even though the arithmetic average of the two returns is zero. Lower volatility shrinks the drag. In the output, the growth column rises from 6.0% to 7.0% as correlation falls, while the arithmetic expected return never moved. So diversification can raise the rate at which your actual wealth compounds, not just make the ride smoother. The approximation works best for modest volatilities. It is a rule of thumb, not an exact law.
Common errors
- Treating the expected return as guaranteed. The numbers above are assumptions. Real expected returns and correlations must be estimated from data, and the estimates are noisy and change over time.
- Equating volatility with the chance of permanent loss. A diversified stock portfolio can fall sharply for years. Volatility describes the scatter, not whether you can wait out a drawdown.
- Assuming more holdings always means lower risk. Fifty stocks in one industry can be less diversified than ten stocks across ten industries. What counts is how differently the holdings move, not how many there are.
- Expecting diversification to raise returns. At best it improves return per unit of risk and reduces drag. A diversified portfolio will lag its best single holding in most periods.
- Forgetting the risk you cannot remove. After diversifying, you still own market-wide risk. If stocks as a whole fall 40%, a well-diversified stock portfolio falls with them.
How this chapter connects to the rest
The trade-off here is the foundation for the sequence that follows. The next two chapters separate systematic from idiosyncratic risk and explain correlation. After that, the formulas in the code above are derived in general. Then the tutorial applies the idea level by level, from companies to sectors to countries, and finishes with measuring concentration, fund choices, rebalancing, and the limits of the whole approach.
Exercise
Two assets each have an expected return of 6% and a volatility of 15%. You hold them 50/50 and their correlation is 0.2. Without running code, what is the portfolio's expected return? Is its volatility above, below, or equal to 15%, and why?
Show answer
The expected return is the weighted average, so 0.5 × 6% + 0.5 × 6% = 6%. The volatility is below 15%. Correlation is less than 1, so the two assets do not move in lockstep and part of each one's scatter cancels. The exact value is sqrt(0.5² × 0.15² + 0.5² × 0.15² + 2 × 0.5 × 0.5 × 0.15 × 0.15 × 0.2) = sqrt(0.005625 + 0.005625 + 0.00225) = sqrt(0.0135), which is about 11.6%.
Exercise
A portfolio has an expected return of 7%, a volatility of 12%, and the risk-free rate is 2%. Compute its Sharpe ratio and its approximate compound growth rate using the variance / 2 rule.
Show answer
Sharpe ratio = (7% - 2%) / 12% = 0.05 / 0.12, about 0.417. Variance is 0.12² = 0.0144, so volatility drag is about 0.0144 / 2 = 0.0072, or 0.72%. Approximate compound growth is 7% - 0.72% = 6.28%.
Exercise
A friend says, "I hold 40 stocks, so I'm fully protected from risk." Name two reasons this claim is wrong.
Show answer
First, the 40 stocks may be highly correlated, for example all in the same sector or country, so the benefit is small. Second, even a perfectly spread stock portfolio keeps systematic (market-wide) risk, which diversification cannot remove. A broad market decline will still reduce its value.