Professional Documents
Culture Documents
The Mean Variance Portfolio Theory 2017 - August
The Mean Variance Portfolio Theory 2017 - August
Introduction
In this topic we seek to explore the risk and return provided by portfolios.
Ultimately we want to be able to establish portfolios that different clients with different
risk profiles would be comfortable with. Basically, we want to explain how point Z in
Figure 1 is reached.
U4
U3
U2
E( Rp ) U1
rf
Minimum variance opportunity set
0 p
Rp = w1R1+w2R2, where wi’s are the portfolio weights and w1+w2 = 1. (For a portfolio
n
with more than two assets we get: R p wi Ri ).
i 1
1
Please beware of mistakes!!!!!!!
1
n
More generally we get E ( R p ) wi E ( Ri ) …………………………………….……..[2]
i 1
Let :
12 Var ( R1 ) , 22 Var ( R2 ) , 12 Cov( R1 , R2 ) , Var (R p ) and 12 12
2
p 1 2
The variance of a portfolio return is:
n n
More generally, p wi w j ij
2
i 1 i 1
n n n
p wi2 i2 w w
2
i j ij (for the case of n-assets)……………….………...…….[4]
i 1 i 1 i 1, j i
Example
Consider a portfolio composed of assets X and Y with the following attributes:
Return on X Return on Y Probability (pi)
11 -3 0.2
9 15 0.2
25 2 0.2
7 20 0.2
-2 6 0.2
Assume the portfolio is split equally between the two assets (i.e., wi=0.5).
Calculate portfolio return and portfolio variance:
2
N
x2 var( X ) pi [ X i E ( X )]2 0.0076
i 1
N
y2 pi [Yi E (Yi )]2 0.00708
i 1
p 4.97%
A portfolio opportunity set (POS) is a set of all feasible portfolios with different
combinations of X and Y.
3
Case 1: The case where ρ12 = +1
Recall:
12
12 12 12 1 2
1 2
So:
w1212 w22 22 2w1 w212
2
p
The expected portfolio return equation can be expressed as a function of the portfolio
variance. After doing that you can differentiate the E(Rp) with respect to the portfolio
variance and show that in the case of positive perfect correlation the portfolio opportunity
set is a straight line.
dE ( R p )
dE ( R p ) dw E ( R1 ) E ( R2 )
slope cons tan t …………..….......….......…………[6]
d p d p 1 2
dw
Example:
dE ( R p )
Use the following information to calculate
d p
E(R1)=20%
E(R2)=16
4
Variance of asset 1=75%
Variance of asset 2=50%
Correlation coefficient = 100%
dE ( R p )
dE ( R p ) E ( R1 ) E ( R2 ) 0.2 0.16
dw 0.16 16%
d p d p 1 2 0.75 0.5
dw
How do you interpret the slope?
Thus the portfolio opportunity set when ρ12 = +1 is linear. There are no benefits to
diversification since as you change the weights there is a constant relationship between
risk and return, i.e., it is not possible to sacrifice risk without sacrificing some return. XY
line below is a straight line whose points are established by changing the weights wi. At
point X the portfolio is made up of only asset 1 (that is w1 = 1 and w2 = 0). As one
changes the portfolio composition by moving from X to Y, w1 gradually goes down as w2
gradually goes up. Eventually point Y is reached and the whole portfolio is composed of
asset 2 (w1 = 0 and w2 = 1).
E( Rp )
Y(6;14)
X (3;8)
0 p
The straight line of the portfolio opportunity set when ρ12 = +1 can be calculated as
follows.
Recall:
E ( Rp ) w1E ( R1 ) (1 w1 ) E ( R2 ) ……………………………………………………….[7]
5
p w11 w2 2 w11 (1 w1 ) 2 ………………………………………………...[9]
To calculate the portfolio opportunity set we solve for w1 in equation [9] to get:
p 2
w1 ………………………………………………………………………...…[10]
1 2
p 2 p 2 r r r r
rp 1 1
r r2 r2 2 1 2 1 2 p ………...……[11]
1 2 1 2 1 2 1 2
rp a b p ………………………………………………………………………….[12]
r r r r
Where: a r2 2 1 2 and b 1 2
1 2 1 2
Example:
Expected return Standard deviation
Asset 1 14 6
Asset 2 8 3
To calculate the portfolio opportunity set substitute the respective values into equation
(11) and get:
r r 14 8
a r2 2 1 2 8 3 2
1 2 63
r r 14 8
b 1 2 2
1 2 6 3
rp 2 2 p
6
Case 2: The case where ρ12 = -1
Thus p w1 1 w2 2
We have to establish two equations for the opportunity set: One equation when
p w1 1 w2 2 and rp w1r1 (1 w1 )r2 (let us call this case, Scenario A) and the
other when p w1 1 w2 2 and rp w1r1 (1 w1 )r2 (let us call this case, Scenario
B).
Scenario A
p w1 1 w2 2 w1 1 ( 1 w1 ) 2 ……………………………………….……[15]
and rp w1r1 (1 w1 )r2 ……………………………………………………………..…[16]
We can now use [15] and [16] to derive a relationship between rp and p as follows:
From [15] you can solve for wi to get:
2
w1 p
1 2
r r r r
rp a b p , where a r2 2 1 2 and b 1 2
1 2 1 2
7
Example:
Expected return Standard deviation
Asset 1 14 6
Asset 2 8 3
r r 14 8
a r2 2 1 2 8 3 10
1 2 63
r1 r2 14 8 6 2
b
1 2 6 3 9 3
2
Thus: rp a b p 10 p
3
Scenario B
p w1 1 w2 2 and rp w1r1 (1 w1 )r2
We shall use the two equations to get the portfolio opportunity set.
Try this case and show that the equation of the opportunity set is:
r r r r
rp r2 2 1 2 1 2 p …………………………………………….….[18]
1 2 1 2
r r r r
rp a b p , where a r2 2 1 2 and b 1 2
1 2 1 2
Using the figures from the above example we calculate the portfolio opportunity set as
follows:
r r 14 8
a r2 2 1 2 8 3 10
1 2 63
r1 r2 14 8 6 2
b
1 2 63 9 3
2
Thus: rp a b p 10 p
3
8
2
Thus if 12 1 the POS would have two segments: rp a b p 10 p
3
The POS in this particular case is as shown in the following figure.
10 2
rp a b p 10 p
3
X
(3;8)
0 p
Equation [19] and [20] can be used to calculate the relationship between portfolio
expected return and the portfolio variance. The opportunity set is no longer a straight line
but a hyperbola; which you can get by making w1 (from equation 19) the subject and then
plugging it into (20). You get rp f ( p2 ) .
We can however find the minimum risk portfolio for the case where 12 0 . To do that
we differentiate equation [19] with respect to w1 and equate the derivative to zero.
d p
.2w
1
1 2 2
w1 1 (1 w12 ) 22 2 2
1 1 2(1 w1 ) 22 0 …………………………...[21]
dw1 2
22 12
w 2 *
and w2 2
*
1 22 1 22
1
9
w1* and w2* are the portfolio weights that generate the minimum variance portfolio,
when 12 0 .
12 6 2
w1*
1 2 9 3
2 2
12 3 1
w2*
1 2 9 3
2 2
The other points of the POS can be derived by changing the weights giving us a curve
depicted by XBY in the following figure.
If 0 < 12 < 1 then we have the POS lying between XBY and XY. One such example
being XAY.
If -1 < 12 < 0 then we have the POS lying between XBY and XZY. One such example
being XCY.
10
The Portfolio Opportunity Set for different 1 2
values
E( Rp )
Y
12 1 (6;14)
(0;10) Z 12 0
C
B
A
12 1
X
(3;8)
0 p
Portfolio Opportunity Set: The Case of One Risky Asset and One Risk-free Asset
Let asset 1 be the risky asset and the other asset be the risk-free asset. Let the return from
the risk-free asset be rf . Note that the mean and variance of the risk-free asset have a
subscript f.
But for the risk-free asset variance is zero (σf = 0), so:
p2 w12 12
1
Which implies that p w12 12 2 w1 1 ………………………………...……………[22]
As before we can use equations [21] and [22] to derive the equation for the POS. To do
that we make w1 in [22] the subject and substitute it into [21] as follows;
p w12 12 2 w1 1
1
p
w1
1
Substituting w1 into 21 yields:
p
rp rf w1 (r1 rf ) rf r r ………………………………..……………...… [23]
1 1 f
11
The resultant POS is a straight as shown in equation [23]. It has an intercept equal to the
r r
risk free rate (rf) and a slope equal to 1 f . See the following figure for the
1
diagrammatic representation.
p
E( Rp )
Slope of POS =
r r
1 f
1
rf
0 p
R p w1 Rx 1 w1 Ry
xy
p w12 x2 (1 w1 ) 2 y2 2w1 (1 w1 ) xy , but xy xy xy x y
2
x y
We minimize the portfolio variance by setting the first derivative with respect to w1 equal
to zero:
12
d
2
dw1
y2 xy x y
w1 * 2
x y2 2 xy x y
Use the information in the following table to calculate the minimum variance portfolio?
Var(X) = 0.0076
Var (Y)=0.00708
Cov(X,Y) = -0.0024
0.00708 (0.33)(0.0872)(0.0841)
w1* 0.487
0.0076 0.00708 2(0.33)(0.0872)(0.0841)
Thus 48.7% of the investor’s wealth should be invested in asset X and the remainder
(51.3%) in Y.
w12 12 (1 w1 ) 22 2w1 (1 w1 ) 2 12
2
p
13
The point [ p , E ( Rp )] (4.956, 8.974%) in the mean-variance plane is just one point of
the minimum variance opportunity set. We can get several points of the opportunity set
by looking for combinations of risk and return offered by portfolios of risky assets that
yield minimum variance for a given rate of return.
Up to now we have learnt how to compute the mean-variance frontier in the following
cases:
a) Portfolios made up of two risky assets
b) Portfolios made up of two assets (one is risky and the other is risk-free)
How do we compute the mean variance frontier when dealing with a portfolio with more
than two assets (i.e., the N-assets portfolio case, with N>2)?
That is:
n
min var (Rp) s.t. E (Rp) = μ and wi 1 ……………………………..…………..…[24]
i 1
Carry out a separate minimization for each given value of E(Rp), so that as E(Rp) changes
the frontier is traced out.
n n
R p wi Ri and w i 1 ………………………………………………………….[25]
i 1 i 1
The w’s are portfolio weights; they express what fraction of your wealth goes into each
asset. Thus, they sum to 1. Thus, you choose portfolio weights to do the minimization.
It is much easier to do all this with matrix notation. Let:
w1 R1 1
. R2 1
W= . ; R = . ; 1= .
. . .
w R 1
N N
14
The above column vectors can be transposed to get W, R and 1 as follows:
1 = 1 1 1...........1 1
N
R p wi Ri = w1R1 w2 R2 .................... wn RN
i 1
w
i 1
i w1 w2 w3 ............... wN 1 …………………………….……………….[27]
w1
.
1 = 1 1 1...........1 1 = 1 W …………………………………………….[28]
.
.
w
N
N
R p wi Ri = w1R1 w2 R2 .................... wn RN ………….……………………[29]
i 1
Recall:
N
R p wi Ri = WR
i 1
n
E ( R p ) wi E ( Ri ) = w1E( R1 ) w2 E( R2 ) ...................... wN E( RN )
i 1
15
E ( R1 )
= w1 w2 ........... wN
.
= W E(R) = W E……….[30]
.
.
E ( R )
N
The last equality just simplifies notation. The vector of mean returns shows up so much
that I will call it E instead of carrying E(R) around.
2
p
E ( Rp E ( Rp ))2 = EW R W E = E (W ( R E ))2
2
= EW ( R E )( R E)W = WE( R E)( R E)W W W
Where:
Please note that w’s are numbers and R’s are random so the numbers can come out of the
expectation sign E.
Now, let’s restate our problem with this notation. Minimizing the variance is the same as
minimizing 1/2 the variance, so we want to choose weights to:
1
min W W s.t. WE ; W 1 1
W 2
1
L W W (W E ) (W 1 1)
2
L
W E 1 0 …………………………………………………………….FOC1
W
L
W E 0 …………………………………………………………………FOC2
L
W 1 1 0 ………………………………………………………………….FOC3
16
W 1 (E 1 ) …………………………………………………………..………….[31]
We want to solve the following two equations for two unknowns, and . So we can
write them as:
E1E E11
11E 111 1
1
E 1E E 11
1
1 E 1 11 1
1
E 1
1 E 1
1
Now that we know what the multipliers are, we can go back and find the weights. From
[31] we know that:
W 1 (E 1 ) 1 E 1
But
1
E 1
1 E 1 so we can plug
1 into the weights equation to get:
17
1
E
W E 1 1E 1
1
1 1
P2 W W
1
E
p 1 1 1 E 1 1
2
A B E 1
Let E 1
B C 1
1
A B C B
p
2
1
1
B C 1 AC B 2 1 B A 1
C B
1
1 B A 1
AC B 2
1
C B B A
AC B 2
1
C 2 2 B A
AC B 2
Thus the variance is a quadratic function of the mean. We used the notation μ = E(Rp)
This is the reason why we draw bow-shaped frontiers all the time!!!!
The above derivation is more general and abstract. We now want to present a more
practical approach to solving the Markowitz optimization problem.
18
Markowitz Optimization Problem: A More Practical Approach
The Case of N-risky Assets
k k
Min w w C n m mn s.t. wn 1 and wn rn r
n 1 n 1
Where wm is the weight of the mth asset in the portfolio, wn is the weight of the nth asset in
the portfolio and Cmn is the covariance between the returns of assets m and n.
k k k
Min
w
wn wmCnm s.t. wn 1 and wnrn r
n,m1 n 1 n 1
Before going any further we need clarity on how to differentiate the following term of the
objective function:
1 k
wn wmCmn
2 n,m1
wn wmCmn p wi w j ij
2
n ,m 1 i 1 i j
3 3
p wi w j ij
2
i 1 i j
3
wi w1 i1 wi w2 i 2 wi w3 i 3
i 1
3 3 3
wi w1 i1 wi w2 i 2 wi w3 i 3
i 1 i 1 i 1
19
n n
p wi w j ij
2
i 1 i j
p2 n
2 w j 1 j
w1 j 1
Now, going back our optimization problem. First, we formulate the Lagrange function
and then calculate the first order conditions as follows:
1 k k k
L
2 n ,m1
w w C
n m mn
n1
wn 1
n 1
wn rn r
L k
wnC1n r1 0
w1 n 1
L k
wnC2 n r2 0
w2 n 1
.
.
.
L k
wnCkn rk 0
wk n 1
L k
wn 1 0
n 1
L k
wn rn r 0
n 1
To help see how the above system can be transformed into matrix notation we rewrite the
above first order conditions as follows:
20
w1C11 w2C12 w3C13 ....... wk C1k r1 0
w1C21 w2C22 w3C23 ....... wk C2 k r2 0
.
.
w1Ck1 w2Ck 2 w3Ck 3 ....... wk Ckk rk 0
w1 w2 w3 ...................... wk 1
w1r1 w2 r2 ......................... wk rk r
If A is invertible then the unique solution to our optimization problem would be:
w1 0
w2 0
.
.
. .
A 1
. .
w 0
k
1
r
21
Case 2: MVF - Many risky assets (with a risk free)
In the presence of any risk-free asset and any number of risky assets the set of efficient
portfolios is a straight line. The minimization problem in the presence of a risk-free asset
is a little bit different. The objective function is as in equation (24). The constraint that
portfolio expected return must be equal to a certain return can now be expressed as
follows:
E ( R p ) w1 E ( R1 ) w2 E ( R2 ) ..... wn E ( Rn ) r f w0
n
r f w0 E ( Ri )
i 1
Where w0 is the weight of the risk-free asset. And rf is the return on the risk-free asset.
The constraint that the sum of the weights must equal 1 is now given as follows:
n
w0 wi 1
i 1 .
n n
min var (Rp) s.t. r f w0 E ( Ri ) and w0 wi 1 …………………..…[24]
i 1 i 1
That is, for a given expected return μ you carry out a separate minimization problem so
that as μ changes the efficient set is traced out.
1. First construct the minimum variance frontier (see the GG frontier in the
following figure) for risky assets alone.
Points along this ray show the expected return and risk for portfolios comprising the risk
free asset and the portfolio of risk assets given by the chosen point on the GG frontier.
For a given level of risk, high levels of expected return can be attained by pivoting the
ray through rf to higher points along the GG frontier. This can be done until the ray is
tangent to GG (at point Z).
The set of efficient portfolios for all assets including the risk free asset is then the ray
formed from rf to E, that is rfZE.
22
Efficient Portfolios with Risk-Free Asset
E( Rp ) E
G
Z
rZ
rf
G
0 Z p
k k k
n , m0
wnCov(rn , rn ) wm s.t wn 1 and wn rn r
n 0 n 0
But since variance of the risk-free asset is zero and the covariance of the returns between
the risk-free asset and other asset returns is also zero the objective function becomes:
w Cov(r , r )w
n , m 1
n n n m
k k k
n ,m1
wnCov(rn , rn ) wm s.t wn 1 and wnrn r
n 0 n 0
23
1 k k k
L
2 n ,m1
w w C
n m mn
n 0
wn 1
n 0
wn rn r
L
r0 0
w0
L k
wnC1n r1 0
w1 n 1
L k
wnC2 n r2 0
w2 n 1
.
.
.
L k
wnCkn rk 0
wk n 1
L k
wn 1 0
n 1
L k
wn rn r 0
n 1
r0 0
w1C11 w2C12 w3C13 ....... wk C1k r1 0
w1C21 w2C22 w3C23 ....... wk C2 k r2 0
.
.
w1Ck1 w2Ck 2 w3Ck 3 ....... wk Ckk rk 0
w1 w2 w3 ........................... wk 1
w1r1 w2 r2 w3r3 ............. wk rk r
24
0 0 0 0... 0 1 r0 w0 0
0
0
C11 C12 C13... C1k 1 r1 w1
.
. . .... . . . .
. . .... . . . . .
. . .... . . . . .
0 Ck 1 Ck 2 Ck 3 ... Ckk 1 rk wk 0
1 1 1 1... 1 0 0 1
r0 r1 r2 r3 ... rk 0 0 r
w0 0
w1 0
. .
A 1
wk 0
0
1
k
1
Min
2
wn wmCmn s.t. wn 1
n 1
We formulate the Lagrangean function and calculate the first order conditions as follows:
25
1 k k
L
2 n ,m1
w w C
n m mn
n1
wn 1
L k
wnC1n 0
w1 n 1
L k
wnC2 n 0
w2 n 1
.
.
.
L k
wnCkn 0
wk n 1
L k
wn 1 0
n 1
As done previously, to help see how we can transform the above system into matrix
notation we rewrite the above first order conditions as follows:
If A is invertible then the unique solution to our optimization problem would be:
26
w1 0
w2 0
A .
. 1
.
wk 0
1
C AA C AB C AC 1 1 4 1 2
C CBA CBB CBC 1 4 2 3 4
CCA CCB CCC 1 2 1 4 3
Calculate the expected return and variance for the minimum variance portfolio.
1 3 3
L
2 n ,m1
w w C
n m mn
n 1
wn 1
L k
wnC1n 0...................( FOC1)
w1 n 1
L k
wnC2 n 0...................( FOC 2)
w2 n 1
L k
wnC 33n 0..................( FOC 3)
w3 n 1
L k
wn 1 0..................( FOC 4)
n 1
As done previously, to help see how the above system can be transformed into matrix
notation we rewrite the above first order conditions as follows:
27
w1C11 w2C12 w3C13 0
w1C21 w2C22 w3C23 0
w1C31 w2C32 w3C33 0
w1 w2 w3 1
BUT
C AA C AB C AC 1 1 4 1 2
C CBA CBB CBC 1 4 2 3 4
CCA CCB CCC 1 2 1 4 3
So:
1 1 4 1 2 1 1 0
w
1 4 2 3 4 1 w2 0
w3 0
1 2 3 4 3 1
1
1 1 1 0
w1 0
w 0
2 1
w3 A 0
1
Now we need to calculate the expected return and the variance for the MVP.
28
E (rA )
E (rp ) wA E (rA ) wB E (rB ) wC E (rC ) wA wB wC E (rB )
E (rC )
1 2
0.6538 0.2692 0.0769 1
3 2
0.7115
1 1 4 1 2 0.6538
W CW 0.6538 0.2692 0.07691 4 2 3 4 0.2692 0.7595
2
p
T
1 2 3 4 3 0.0769
P2 0.875
1
N 2
2
p
N2
1 2
2
p
N
1 2 1
p
N
N
Thus as N increases the portfolio standard deviation or risk goes down.
29
This is because as more and more uncorrelated risks are pooled together, total risk is
reduced. This is known as the insurance principle: insurance companies like to take on
more and more uncorrelated risk.
n n
1 1
p wi w j ij N 2 2 N 2 N Cov
2
2
i 1 i j N N
1 2
N
1
N
N 1Cov
2 ( N 1)
Cov
N N
2 1
Cov Cov
N N
Lim Cov
2
p
N
Thus as N increases portfolio variance approaches covariance. The risk associated with
each asset comes from unique/diversifiable risk and market/systematic risk. As N
increases diversifiable risk is eliminated and the risk of the portfolio is only explained by
market risk, which in this case comes from the covariance term. If the asset returns for a
given portfolio are perfectly unrelated then Cov = 0 and so the risk for that portfolio
would be zero.
n n
p wi w j ij
2
i 1 i j
Note that variance is a special type of covariance. Variance is the covariance of an asset
with itself. That is, ii i .
2
Separating the above expression into variance and covariance terms yields:
30
n n n
p wi2 i2 w w
2
i j ij
i 1 i 1 i j , j i
Note that a 2-asset portfolio has 2 variance and 2 covariance terms. A 3-asset portfolio
has 3 variance and 6 covariance terms. An N-asset portfolio has N variance terms and
N2-N covariance terms. We shall assume that the portfolio is equally weighted:
wi = wj = 1/N.
2
1 2 1 n n
n
p i1 N i N 2
ij
2
i 1 i j , j i
n n n
1 1
p i2
2
ij
N2 i 1 N2 i 1 i j , j i
Suppose that the largest individual asset variance is L. The first term (the variance terms)
is less than or equal to:
1 n 1 N 1 L
2 2
i
2
L 2 NL
N i 1 N i 1 N N
So as the number of assets in the portfolio increases this term approaches zero. That is;
L
Lim N 0
N
1 n n 1
2 ij
2 ( N 2 N ) ij ij ij
N i 1 i j , j i N N
1
lim 2 ( N 2 N ) ij ij
N N
As we increase the number of assets in a portfolio the covariance terms become more
important (see handouts and the different textbooks on this).
31
Required Reading
1. Markowitz, H. (1952). Portfolio selection, Journal of Finance 7, 77-91.
32