"Don't put all your eggs in one basket" is old advice, but it took until 1952 for anyone to turn it into precise mathematics. That year Harry Markowitz, then a graduate student at the University of Chicago, published "Portfolio Selection", showing that the risk of a portfolio depends not only on the risk of each investment but on how the investments move together. His ideas, now called modern portfolio theory, earned him a share of the 1990 Nobel Memorial Prize in Economic Sciences and underpin how pension funds, mutual funds and banks invest today.
Measuring Return
For an uncertain investment, we describe possible outcomes with probabilities. The expected return is the probability-weighted average:
$$ E(R) = \sum_{i} p_i R_i $$
where \( p_i \) is the probability of scenario \( i \) and \( R_i \) is the return in that scenario. When working with historical data instead, we use the sample mean of past returns.
Measuring Risk
Risk is the uncertainty around the expected return. Markowitz measured it with variance and its square root, the standard deviation:
$$ \sigma^2 = \sum_i p_i \left(R_i - E(R)\right)^2, \qquad \sigma = \sqrt{\sigma^2} $$
A larger standard deviation means returns are more spread out and less predictable.
How Two Assets Move Together
The key new ingredient is covariance, which measures whether two returns tend to rise and fall together:
$$ \text{Cov}(R_A, R_B) = \sum_i p_i \left(R_{A,i} - E(R_A)\right)\left(R_{B,i} - E(R_B)\right) $$
Because covariance is hard to interpret on its own, we scale it to the correlation coefficient, which always lies between \( -1 \) and \( +1 \):
$$ \rho_{AB} = \frac{\text{Cov}(R_A, R_B)}{\sigma_A \sigma_B} $$
- \( \rho = +1 \): the assets move in perfect lockstep, so there is no diversification benefit.
- \( \rho = 0 \): no linear relationship.
- \( \rho = -1 \): they move in exactly opposite directions, and risk can be eliminated completely.
Portfolio Return and Risk
For a portfolio with weight \( w \) in asset A and \( 1-w \) in asset B, the expected return is simply the weighted average:
$$ E(R_P) = w\,E(R_A) + (1-w)\,E(R_B) $$
But the variance is not a weighted average. It includes a covariance term:
$$ \sigma_P^2 = w^2\sigma_A^2 + (1-w)^2\sigma_B^2 + 2w(1-w)\,\text{Cov}(R_A,R_B) $$
This one equation is the whole secret of diversification. If the covariance is small or negative, the last term pulls the portfolio's risk below the weighted average of the individual risks.
Worked Example 1: Two Stocks Under Three Scenarios
An analyst in Karachi studies a cement company (A) and a defensive utility company (B) under three economic scenarios:
| Scenario | Probability | Return on A | Return on B |
|---|---|---|---|
| Boom | 0.3 | 25% | 8% |
| Normal | 0.5 | 12% | 6% |
| Recession | 0.2 | −10% | 12% |
Step 1: Expected returns.
$$ E(R_A) = 0.3(0.25) + 0.5(0.12) + 0.2(-0.10) = 0.075 + 0.060 - 0.020 = 0.115 = 11.5\% $$
$$ E(R_B) = 0.3(0.08) + 0.5(0.06) + 0.2(0.12) = 0.024 + 0.030 + 0.024 = 0.078 = 7.8\% $$
Step 2: Deviations from the mean.
- Boom: A deviates by \( 0.135 \), B by \( 0.002 \).
- Normal: A deviates by \( 0.005 \), B by \( -0.018 \).
- Recession: A deviates by \( -0.215 \), B by \( 0.042 \).
Step 3: Variances and standard deviations.
$$ \sigma_A^2 = 0.3(0.135)^2 + 0.5(0.005)^2 + 0.2(-0.215)^2 = 0.0054675 + 0.0000125 + 0.009245 = 0.014725 $$
$$ \sigma_A = \sqrt{0.014725} = 0.1213 = 12.13\% $$
$$ \sigma_B^2 = 0.3(0.002)^2 + 0.5(-0.018)^2 + 0.2(0.042)^2 = 0.0000012 + 0.000162 + 0.0003528 = 0.000516 $$
$$ \sigma_B = \sqrt{0.000516} = 0.0227 = 2.27\% $$
Step 4: Covariance and correlation.
$$ \text{Cov} = 0.3(0.135)(0.002) + 0.5(0.005)(-0.018) + 0.2(-0.215)(0.042) $$
$$ \text{Cov} = 0.000081 - 0.000045 - 0.001806 = -0.00177 $$
$$ \rho = \frac{-0.00177}{0.1213 \times 0.0227} = -0.64 $$
The negative correlation makes sense: the utility does relatively well in a recession, exactly when cement suffers.
Worked Example 2: Building the Portfolio
Using the results above, find the expected return and risk of a portfolio with 20% in A and 80% in B.
Expected return:
$$ E(R_P) = 0.2(0.115) + 0.8(0.078) = 0.023 + 0.0624 = 0.0854 = 8.54\% $$
Variance:
$$ \sigma_P^2 = (0.2)^2(0.014725) + (0.8)^2(0.000516) + 2(0.2)(0.8)(-0.00177) $$
$$ \sigma_P^2 = 0.000589 + 0.00033024 - 0.0005664 = 0.00035284 $$
$$ \sigma_P = \sqrt{0.00035284} = 0.0188 = 1.88\% $$
Look at what happened. This portfolio has a higher expected return than stock B alone (8.54% versus 7.8%) and lower risk (1.88% versus 2.27%). Adding a slice of the risky cement stock actually made the portfolio safer, because its returns offset B's.
Check: the portfolio returns in the three scenarios are 11.4%, 7.2% and 7.6%. Computing their mean and standard deviation directly gives 8.54% and 1.88%, confirming the formula.
The Minimum Variance Portfolio
Differentiating \( \sigma_P^2 \) with respect to \( w \) and setting it to zero gives the weight in A that minimises risk:
$$ w^{*} = \frac{\sigma_B^2 - \text{Cov}}{\sigma_A^2 + \sigma_B^2 - 2\,\text{Cov}} $$
For our stocks:
$$ w^{*} = \frac{0.000516 + 0.00177}{0.014725 + 0.000516 + 0.00354} = \frac{0.002286}{0.018781} = 0.1217 $$
About 12.2% in A and 87.8% in B gives the lowest possible risk, a standard deviation of about 1.54%, with an expected return of 8.25%.
The Efficient Frontier
If you plot every possible combination of many assets on a graph of expected return against standard deviation, the best portfolios trace a curve called the efficient frontier. Each portfolio on it gives the highest return for its level of risk. A rational investor chooses a point on this frontier according to how much risk they can tolerate. Portfolios below the frontier are inefficient: another mix offers more return for the same risk.
Systematic and Unsystematic Risk
Diversification removes unsystematic risk, the risk specific to one company, such as a factory fire or a failed product. It cannot remove systematic risk, which affects the whole market: interest rate changes, inflation, elections or a global recession. This distinction leads directly to the Capital Asset Pricing Model, where only systematic risk is rewarded.
Doing It in Software
For historical data, Excel's COVARIANCE.S and CORREL functions, R's cov() and cor(), or Python's NumPy do the work instantly:
python
import numpy as np
w = np.array([0.2, 0.8])
cov = np.array([[0.014725, -0.00177], [-0.00177, 0.000516]])
print(np.sqrt(w @ cov @ w)) # 0.0188
The matrix form \( \sigma_P^2 = \mathbf{w}^T \Sigma \mathbf{w} \) extends the two-asset formula to any number of assets.
Did You Know?
- Markowitz later said that in his own retirement savings he simply split his money 50/50 between stocks and bonds rather than computing an optimal portfolio.
- With many equally weighted stocks, most unsystematic risk disappears once a portfolio holds a few dozen companies.
- Markowitz shared his Nobel prize with William Sharpe, the main creator of CAPM, and Merton Miller.
Key Takeaways
- Expected return is a weighted average; portfolio variance is not.
- Covariance and correlation measure how assets move together.
- Low or negative correlation lets a portfolio have less risk than its components.
- The minimum variance weight follows from calculus on the variance formula.
- Diversification removes unsystematic risk, but systematic risk remains.
Working on a portfolio theory assignment or thesis chapter? Amathify's experts and PhD scholars can provide step-by-step solutions and guidance. Contact us on WhatsApp or through the Ask a Question form.
Stuck on a problem or assignment?
Our experts and PhD scholars solve maths, physics and chemistry — step by step.