You are on page 1of 24

BMAN20072 Investment Analysis

Week 2-2: Markowitz Portfolio Optimisation

BKM Ch. 7.4, Appendix A


Overview

• How to design an optimal portfolio?


– Capital allocation
• Allocation between risk-free and risky assets.
[Week 1]
– Asset allocation [This week]
• Allocation across risky assets
• Markowitz procedure
– Two assets
– More than two assets [this video]
• How to apply Markowitz with real world data?
[this video]
1
Key terms

• Efficient frontier
– Minimum variance frontier, Global minimum variance
portfolio
• Markowitz procedure
– Expected excess returns
– Covariance matrix
• Numerical optimisation
– Excel Solver

2
Optimal Risky Portfolio
with Two Assets

• Solve the maximization problem:


𝐸 𝑟𝑃 − 𝑟𝑓
max 𝑆𝑃 =
𝑤𝐷 𝜎𝑃
subject to 𝑤𝐷 + 𝑤𝐸 = 1.

• Solution for two risky assets case:


2

𝐸 𝑅𝐷 𝐸 − 𝐸 𝑅𝐸 𝐶𝑜𝑣(𝑅𝐷 , 𝑅𝐸 )
𝜎
𝑤𝐷 =
𝐸 𝑅𝐷 𝜎𝐸2 + 𝐸 𝑅𝐸 𝜎𝐷2 − 𝐸 𝑅𝐷 + 𝐸 𝑅𝐸 𝐶𝑜𝑣(𝑅𝐷 , 𝑅𝐸 )
𝑤𝐸∗ = 1 − 𝑤𝐷∗
where R is excess return.
3
Generalise to many securities

• Unfortunately, with many securities, we cannot


solve for the optimal weights by hand.

• Numerical Optimisation: We let the computer do


by trial-and-error.

4
Risk-Return Analysis

• Risk-Return analysis:
– Analyse the assets to be included in the risky
portfolio, and derive estimates for Expected
Returns and Covariance Matrix.
– The estimates will be then used to find the
optimal Sharpe ratio.

5
Risk-Return Analysis

Suppose you have n securities:


• Expected returns of each security
– n estimates of 𝐸(𝑟𝑖 ) where 𝑖 = 1, 2, … , 𝑛.
• Set of estimates for the covariance matrix
– n diagonal elements are estimates of
variances, 𝜎𝑖2
– n x (n-1)/2 off-diagonal elements are the
estimates of the covariances between each
pair of securities, 𝐶𝑜𝑣(𝑟𝑖 , 𝑟𝑗 ) where 𝑖, 𝑗 =
1, 2, … , 𝑛 and 𝑖 ≠ 𝑗.
6
Covariance Matrix

Example: Covariance matrix of 5 assets

Asset A Asset B Asset C Asset D Asset E

Asset A 𝐶𝑜𝑣 𝑟𝐴 , 𝑟𝐴 𝐶𝑜𝑣 𝑟𝐴 , 𝑟𝐵 𝐶𝑜𝑣 𝑟𝐴 , 𝑟𝐶 𝐶𝑜𝑣 𝑟𝐴 , 𝑟𝐷 𝐶𝑜𝑣 𝑟𝐴 , 𝑟𝐸


= 𝑣𝑎𝑟 𝑟𝐴
Asset B 𝐶𝑜𝑣 𝑟𝐵 , 𝑟𝐴 𝐶𝑜𝑣 𝑟𝐵 , 𝑟𝐵 𝐶𝑜𝑣 𝑟𝐵 , 𝑟𝐶 𝐶𝑜𝑣 𝑟𝐵 , 𝑟𝐷 𝐶𝑜𝑣 𝑟𝐵 , 𝑟𝐸
= 𝑣𝑎𝑟 𝑟𝐵
Asset C 𝐶𝑜𝑣 𝑟𝐶 , 𝑟𝐴 𝐶𝑜𝑣 𝑟𝐶 , 𝑟𝐵 𝐶𝑜𝑣 𝑟𝐶 , 𝑟𝐶 𝐶𝑜𝑣 𝑟𝐶 , 𝑟𝐷 𝐶𝑜𝑣 𝑟𝐶 , 𝑟𝐸
= 𝑣𝑎𝑟 𝑟𝐶
Asset D 𝐶𝑜𝑣 𝑟𝐷 , 𝑟𝐴 𝐶𝑜𝑣 𝑟𝐷 , 𝑟𝐵 𝐶𝑜𝑣 𝑟𝐷 , 𝑟𝐶 𝐶𝑜𝑣 𝑟𝐷 , 𝑟𝐷 𝐶𝑜𝑣 𝑟𝐷 , 𝑟𝐸
= 𝑣𝑎𝑟 𝑟𝐷
Asset E 𝐶𝑜𝑣 𝑟𝐸 , 𝑟𝐴 𝐶𝑜𝑣 𝑟𝐸 , 𝑟𝐵 𝐶𝑜𝑣 𝑟𝐸 , 𝑟𝐶 𝐶𝑜𝑣 𝑟𝐸 , 𝑟𝐷 𝐶𝑜𝑣 𝑟𝐸 , 𝑟𝐸
= 𝑣𝑎𝑟 𝑟𝐸

7
Risky portfolio with n securities

• The rate of return of a risky portfolio with n


securities:
𝑛

𝑟𝑃 = ෍ 𝑤𝑖 𝑟𝑖
𝑖=1
𝑟𝑖 : return on security i.
𝑤𝑖 : proportion invested in security i.

• Expected return: 𝐸(𝑟𝑃 ) = σ𝑛𝑖=1 𝑤𝑖 𝐸(𝑟𝑖 )


• Variance: 𝜎𝑃2 = σ𝑛𝑖=1 σ𝑛𝑗=1 𝑤𝑖 𝑤𝑗 𝐶𝑜𝑣(𝑟𝑖 , 𝑟𝑗 )
8
Opportunity set with n securities

Opportunity Set of
Risky Assets

9
The Efficient Frontier

Minimum Variance Frontier


(BOTH solid and dotted)
Solid curve

10
CALs with various portfolios

11
CALs with various portfolios

12
Complete Portfolio

We can generalise to many risky securities, not


just two.
1. Identify the risk-return combinations available
from the set of risky assets.
2. Identify the optimal portfolio of risky assets by
finding the portfolio weights that result in the
highest Sharpe ratio, i.e. steepest CAL.
3. Choose an appropriate complete portfolio by
mixing the risk-free asset with the optimal risky
portfolio.
13
Markowitz with Excel

Markowitz_example.xlsx
• Example with five stocks BWY, SDRY, SAFE,
BVIC, and SMIN

We need estimates of Expected excess returns


and Covariance matrix:
– Expected excess returns: Give expected excess
return for each stock.
– Covariance matrix: sample covariance matrix from the
five years monthly data.
14
Expected excess returns

Example:
• BWY: 0.0287
• SDRY: 0.0281
• SAFE: 0.0541
• BVIC: 0.0286
• SMIN: 0.0654

15
Covariance matrix

• Use Excel covariance function


– Data > Data analysis > Covariance.
– The function only provides the lower triangle
of the matrix. Fill in the upper triangle.
– Covariance function does not adjust for
degree of freedom. So, we need to multiply all
the elements of the Covariance Matrix by
60/59. (degree of freedom = 60 -1 = 59.)

16
Covariance Matrix

17
Optimal Risky Portfolio

• Solve the maximization problem:


𝐸 𝑟𝑃 − 𝑟𝑓 𝐸 𝑅𝑃
max 𝑆𝑃 = =
𝑤𝑖 𝜎𝑃 𝜎𝑃
subject to σ𝑖 𝑤𝑖 = 1.
• Expected excess return:
𝑛
𝐸(𝑅𝑃 ) = ෍ 𝑤𝑖 𝐸(𝑅𝑖 )
𝑖=1

• Standard dev. : 𝜎𝑃 = σ𝑛𝑖=1 σ𝑛𝑗=1 𝑤𝑖 𝑤𝑗 𝐶𝑜𝑣(𝑅𝑖 , 𝑅𝑗 )


18
Optimisation with Excel Solver

• Use Excel Solver to find the optimum weights:


– Load the Solver Add-in
– Data > Solver
– Load setting for [c. Find Optimal Portfolio]
from “6. Solver parameters” in the spread
sheet.

19
Optimal Risky Portfolio

20
Efficient Frontier & Optimal CAL

• Use Excel Solver to find the Efficient Frontier


and the optimal CAL:
1. Find the Global Minimum Variance Portfolio,
G. Load the setting [a. Find Min Variance
Portfolio].
2. Complete the efficient frontier. Load the
setting [b. Efficient frontier].
3. Calculate the optimal CAL.

21
Efficient Frontier & Optimal CAL

22
Efficient Frontier & Optimal CAL

23

You might also like