Sub topic 5
Expected Return and Risk of a Portfolio
This chapter assumes you can compute an asset's expected return, variance, standard deviation, covariance and correlation from the earlier chapters. It also assumes you can work with decimals and squares on a financial calculator. Here you combine those inputs into the return and risk of a portfolio. Diversification, the efficient frontier and CAPM all rest on this calculation.
Portfolio expected return
Portfolio expected return is the weighted average of the expected returns of its holdings:
E(Rp) = w1·E(R1) + w2·E(R2) + ... + wn·E(Rn)
The weights wi are each position's market value divided by the portfolio's total value. They sum to 1. A short position has a negative weight, so the other weights can sum to more than 1.
Correlation does not appear in this formula. Two portfolios with the same weights and the same expected returns have the same expected return, however the assets move together. Only risk depends on correlation.
Portfolio variance and standard deviation
For two assets, the variance of the portfolio is:
σp² = w1²σ1² + w2²σ2² + 2·w1·w2·Cov(1,2)
Because Cov(1,2) = ρ12·σ1·σ2, the same formula in correlation form is:
σp² = w1²σ1² + w2²σ2² + 2·w1·w2·σ1·σ2·ρ12
The standard deviation is the square root of this variance. Each piece has a meaning:
- The first two terms are each asset's own variance, scaled by the square of its weight.
- The last term is the interaction. It grows when the assets move together and shrinks when they move in opposite directions.
For n assets, the formula sums over every pair of positions, including each asset paired with itself:
σp² = Σi Σj wi·wj·Cov(i,j)
Asset paired with itself gives Cov(i,i) = σi², which recovers the variance terms. There are n variances and n(n−1)/2 distinct covariances. With 2 assets there is 1 covariance. With 20 assets there are 190. As n grows, the covariances dominate the portfolio's risk.
Worked example
Asset 1 has E(R) = 10% and σ = 20%. Asset 2 has E(R) = 6% and σ = 10%. The portfolio holds 60% in asset 1 and 40% in asset 2, and ρ = 0.3.
- Expected return: 0.6 × 10% + 0.4 × 6% = 8.4%.
- Asset 1 term: (0.6 × 0.20)² = 0.0144.
- Asset 2 term: (0.4 × 0.10)² = 0.0016.
- Interaction term: 2 × 0.6 × 0.4 × 0.20 × 0.10 × 0.3 = 0.00288.
- Variance: 0.0144 + 0.0016 + 0.00288 = 0.01888.
- Standard deviation: √0.01888 ≈ 13.74%.
The portfolio's risk (13.74%) is below the weighted average of the two standard deviations (0.6 × 20% + 0.4 × 10% = 16%). That gap is the diversification benefit.
How correlation changes the result
The code below repeats the calculation for three correlations. Expected return stays the same and only the risk changes.
from math import sqrt
def portfolio_stats(w1, r1, r2, s1, s2, rho):
w2 = 1 - w1
exp_return = w1 * r1 + w2 * r2
variance = (w1 * s1) ** 2 + (w2 * s2) ** 2 + 2 * w1 * w2 * s1 * s2 * rho
return exp_return, sqrt(variance)
# 60% in asset 1 (E[R]=10%, sd=20%), 40% in asset 2 (E[R]=6%, sd=10%)
for rho in (1.0, 0.3, -1.0):
ret, sd = portfolio_stats(0.6, 0.10, 0.06, 0.20, 0.10, rho)
print(f"rho={rho:+.1f} E[R]={ret:.2%} sd={sd:.2%}")The output is:
rho=+1.0 E[R]=8.40% sd=16.00%
rho=+0.3 E[R]=8.40% sd=13.74%
rho=-1.0 E[R]=8.40% sd=8.00%The diagram below plots the same portfolio's standard deviation across the full range of correlations.
Three results from this example are worth remembering for the exam:
- At ρ = +1, portfolio risk equals the weighted average of the standard deviations: 0.6 × 20% + 0.4 × 10% = 16%. This is the only case where that shortcut is valid, and there is no diversification benefit.
- At any ρ < +1, portfolio risk is below that weighted average.
- At ρ = −1, risk can fall to zero with the right weights. Here that weight is w1 = σ2 / (σ1 + σ2) = 10 / 30 = 1/3. Check: (1/3)(20%) − (2/3)(10%) = 0.
Using a covariance matrix for any number of assets
The double-sum formula translates directly into code. The covariance matrix holds variances on the diagonal and covariances elsewhere. This version reproduces the two-asset result, with Cov = 0.3 × 0.20 × 0.10 = 0.006:
from math import sqrt
def portfolio_stats_n(weights, returns, cov):
n = len(weights)
exp_return = sum(w * r for w, r in zip(weights, returns))
variance = sum(weights[i] * weights[j] * cov[i][j]
for i in range(n) for j in range(n))
return exp_return, sqrt(variance)
cov = [[0.04, 0.006],
[0.006, 0.01]]
ret, sd = portfolio_stats_n([0.6, 0.4], [0.10, 0.06], cov)
print(f"E[R]={ret:.2%} sd={sd:.2%}") # E[R]=8.40% sd=13.74%Many assets: why covariance dominates
Suppose n assets each have σ = 20%, every pair has correlation ρ = 0.3, and the weights are equal at 1/n. The portfolio variance simplifies to:
σp² = σ²·[1/n + (1 − 1/n)·ρ]
| Number of assets | Portfolio standard deviation |
|---|---|
| 1 | 20.00% |
| 2 | 16.12% |
| 10 | 12.17% |
| 100 | 11.08% |
| Very large | 10.95% |
The 1/n term is the part of the variance from individual assets, and it vanishes as n grows. What remains is σ²·ρ, the average covariance. Adding assets helps quickly at first and then very little. The floor of 10.95% is the risk that diversification cannot remove, which leads to the next chapters on diversification and on systematic risk.
Common errors and edge cases
- Adding standard deviations. Standard deviations do not add, except in the special case ρ = +1. Always combine variances and take the square root at the end.
- Forgetting to square the weights. The variance terms use w², and the covariance term uses w1·w2. The covariance term also carries the factor 2, because the pair (1,2) and the pair (2,1) both contribute.
- Mixing units. Do not enter σ = 20 and σ = 0.20 in the same calculation. If you use percentages, variance comes out in percent squared. Convert to decimals first.
- Weights that do not sum to 1. Check this before you start. A cash position has a weight, a return and zero variance.
- Confusing covariance with correlation. If the question gives covariance, use it directly. Do not multiply by σ1σ2 again. If it gives correlation, convert it first.
- Short positions. A negative weight is allowed in the formulas. The squared terms stay positive, but the interaction term changes sign when only one weight is negative.
- Expected versus realized returns. The weighted-average formula applies to expected returns. A portfolio's historical return over a period is also the weighted average of the assets' returns, but only if the weights are the beginning-of-period weights and nothing is rebalanced during the period.
Exercise
A portfolio holds 70% in asset A (E(R) = 12%, σ = 18%) and 30% in asset B (E(R) = 5%, σ = 9%). The covariance between A and B is 0.0081. Find the expected return and standard deviation of the portfolio, and the correlation between the assets.
Show answer
Expected return = 0.7 × 12% + 0.3 × 5% = 9.9%. Correlation = 0.0081 / (0.18 × 0.09) = 0.0081 / 0.0162 = 0.5. Variance = (0.7 × 0.18)² + (0.3 × 0.09)² + 2 × 0.7 × 0.3 × 0.0081 = 0.015876 + 0.000729 + 0.003402 = 0.020007. Standard deviation = √0.020007 ≈ 14.14%. This is below the weighted average of the standard deviations (0.7 × 18% + 0.3 × 9% = 15.3%), as expected for a correlation below 1.
Exercise
Two assets have σ1 = 30% and σ2 = 10% and are perfectly negatively correlated (ρ = −1). What weight in asset 1 gives a portfolio with zero standard deviation?
Show answer
At ρ = −1 the portfolio standard deviation is |w1σ1 − w2σ2|. Setting it to zero gives w1σ1 = (1 − w1)σ2, so w1 = σ2 / (σ1 + σ2) = 10 / 40 = 25%. Check: 0.25 × 30% = 7.5% and 0.75 × 10% = 7.5%, so the two terms cancel.
Exercise
An equally weighted portfolio holds n assets, each with σ = 20% and every pairwise correlation equal to 0.3. What standard deviation does the portfolio approach as n becomes very large, and why?
Show answer
The variance is σ²·[1/n + (1 − 1/n)·ρ]. As n grows, 1/n goes to 0 and the variance approaches σ²·ρ = 0.04 × 0.3 = 0.012. The standard deviation approaches √0.012 ≈ 10.95%. The risk from individual assets is diversified away, and only the average covariance between assets remains.