Вы находитесь на странице: 1из 44

1

Mean-variance portfolio theory


Reading
Luenberger, Chapter 6 and parts of Chapter 8
Campbell, Lo and McKinlay
Grinold and Kahn
Goals
Learn how to design optimal security portfolios
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 2
Asset portfolios
Portfolio return
Consider a portfolio composed of n assets with total value
x =

n
i=1
x
i
, where x
i
is the value of asset i today
Let w
i
=
x
i
x
be the constant fraction of the portfolio value
invested in asset i so

n
i=1
w
i
= 1
For a xed horizon, let r
i
be the random rate of return on
asset i
The rate of return on the portfolio is r =

n
i=1
w
i
r
i
The expected rate of return on the portfolio is
E[r] =

n
i=1
w
i
E[r
i
]
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 3
Asset portfolios
Portfolio variance
The variance of the portfolio return is
Var [r] = E[(r E[r])
2
] =
n

i=1
n

j=1
w
i
w
j
Cov [r
i
, r
j
]
The return covariance is given by
Cov [r
i
, r
j
] = E[(r
i
E[r
i
])(r
j
E[r
j
])]
= E[r
i
r
j
] E[r
i
]E[r
j
]
and we note that Cov [r
i
, r
i
] = Var [r
i
]
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 4
Asset portfolios
Covariance
The covariance measures the degree of linear dependence
between two random variables
If it is 0 we say the variables are uncorrelated
Note that uncorrelated variables are not independent in general
(take X N(0, 1) and Y = X
2
, for example)
It neglects any nonlinear dependence that might be present
The covariance of X and Y satises |Cov [X, Y ]| SD[X]SD[Y ]
Dene Z = Var [X]Y Cov [X, Y ]X and consider Var [Z]
The covariance is the natural measure of dependence for joint
elliptical variables (e.g. normal)
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 5
Asset portfolios
Linear correlation
The linear correlation coecient is the normalized covariance
Corr [X, Y ] =
Cov [X, Y ]
SD[X]SD[Y ]
[1, 1]
assuming that X and Y have nite variances (Cauchy?)
Corr [X, Y ] is invariant under strictly increasing linear
transformations
Independence: Corr [X, Y ] = 0
Perfect linear dependence, i.e. Y = a +bX for b R \ {0} and
a R: Corr [X, Y ] {1, 1}
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 6
Asset portfolios
Classical assumption
From now on we measure
Risk of returns by standard deviation (variance); therefore we
penalize upside uctuations
Dependence of returns by covariance (linear correlation)
This is without loss of generality if returns are jointly elliptically
distributed (it is not enough that the marginals are elliptical)
If returns are not elliptical, then the standard deviation will
underestimate downside risk, and the covariance will not capture
the complete dependence any more
Alternatives are AVaR and rank correlation, for example
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 7
Asset portfolios
Diversication reduces variance (=risk)
This idea goes back at least to Bernoulli (1738), but even
Shakespeare knew it (see The Merchant of Venice)
Consider a portfolio of n equally weighted assets with iid returns
r
i
, which has E[r] = E[r
1
] and Var [r] =
1
n
Var [r
1
]; in the limit
there is no risk any more (strong LLN!)
Now consider a portfolio of n equally weighted assets with
identically distributed returns r
i
that have common pairwise
covariance
12
0, which has E[r] = E[r
1
] and the Var [r] is
n

i=1
w
2
i
Var [r
i
] +
n

i=1
n

j=1,j=i
w
i
w
j
Cov[r
i
, r
j
] =
1
n
Var [r
1
] + (1
1
n
)
12
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 8
Asset portfolios
Portfolio diagram
Consider a two asset portfolio with weights 1 a and a [0, 1]
The expected portfolio return is E[r] = (1 a)E[r
1
] +aE[r
2
]
The portfolio variance is

2
= (1 a)
2

2
1
+ 2a(1 a)
12
+a
2

2
2
Since |
12
|
1

2
we get the upper bound
(a)
_
(1 a)
2

2
1
+ 2a(1 a)
1

2
+a
2

2
2
= (1 a)
1
+a
2
and the lower bound
_
(1 a)
2

2
1
2a(1 a)
1

2
+a
2

2
2
= |(1 a)
1
a
2
| (a)
Draw the mean-standard deviation diagram as a function of a!
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 9
Mean-standard deviation diagram
Assume r
1
= 1%, r
2
= 7%,
1
= 0.05,
2
= 0.2, and
1,2
= 0.003
0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
0.01
0.02
0.03
0.04
0.05
0.06
0.07
Standard Deviation
E
x
p
e
c
t
e
d

R
e
t
u
r
n
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 10
Feasible set
Consider a portfolio with n assets and weights w
i
s.t.

n
i=1
= 1
By varying the weights we get portfolios with dierent means and
variances
2
; each such portfolio corresponds to a point (E[r], )
in the mean-standard deviation diagram
The set of all possible points is called the feasible set
If there are at least 3 assets with dierent expected returns and
|Corr[r
i
, r
j
]| < 1 then this set is a solid two-dimensional region
The feasible set is convex from the left because all 2 asset
portfolios with positive weights lie on or to the left of the line
connecting them
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 11
Feasible set
Minimum variance set and ecient frontier
The left boundary of the feasible set is called the minimum
variance set, since for any expected return value the feasible point
with the smallest variance is the corresponding left boundary point
The minimum variance point is the point with lowest possible
variance
Risk averse (less standard deviation is better than more for a
given mean) and nonsatiated (more money is better than less,
all else equal) investors will prefer the upper portion of the
minimum variance set, called the ecient frontier
This denition of risk aversion can be problematic...
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 12
Markowitz model
Finding the minimum variance portfolio with a given mean
Consider a portfolio with n assets and weights w
i
s.t.

n
i=1
w
i
= 1
Expected returns r
i
, variances
2
i
and covariances
ij
We want to nd the weights for a portfolio of minimum variance
that has a xed expected return r:
minimize
1
2
n

i=1
n

j=1
w
i
w
j

ij
subject to
n

i=1
w
i
r
i
= r
n

i=1
w
i
= 1
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 13
Markowitz model
Solving the Markowitz problem
The Lagrangian of the problem is given by
L =
1
2
n

i=1
n

j=1
w
i
w
j

ij

_
n

i=1
w
i
r
i
r
_

_
n

i=1
w
i
1
_
where and are the Langrange multipliers
Note that if we set = 0 (i.e. drop the expected return
constraint) then L describes the minimum variance point
We dierentiate L = L(w
1
, . . . , w
n
, , ) with respect to each of
the w
i
s and set the derivatives to zero
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 14
Markowitz model
Equations for the ecient set
The n weights and the 2 Langrange multipliers for an ecient
portfolio having expected return r satisfy the n+2 linear equations
n

j=1
w
j

ij
r
i
= 0, i = 1, 2, . . . , n
n

i=1
w
i
r
i
= r
n

i=1
w
i
= 1
Check these equations!
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 15
Markowitz model
Example
Consider a portfolio with 3 uncorrelated assets with expected
returns 1, 2 and 3 and unit variances
Find the equations for the ecient set based on an expected
portfolio return r!
Find the portfolio weights!
What is the minimum standard deviation for r = 2?
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 16
Markowitz model
Example
The Lagrangian is
L =
1
2
(w
2
1
+w
2
2
+w
2
3
)(w
1
+2w
2
+3w
3
r)(w
1
+w
2
+w
3
1)
The equations for the ecient set are
w
1
= 0
w
2
2 = 0
w
3
3 = 0
w
1
+ 2w
2
+ 3w
3
= r
w
1
+w
2
+w
3
= 1
The solution is w = (
4
3

r
2
,
1
3
,
r
2

2
3
)
For r = 2 we get =
_
w
2
1
+w
2
2
+w
2
3
= 1/

3
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 17
Markowitz model
Solving the linear equations numerically (MATLAB)
% The problem is of the form A*X = B
% X = [w1 w2 w3 lambda mu];
% Expected return
rbar = 2;
% Defining A and B
A = [1 0 0 -1 -1; 0 1 0 -2 -1; 0 0 1 -3 -1; 1 2 3 0 0; 1 1 1 0 0];
B = [0;0;0;rbar;1];
% The solution
X = A\B; % solution to A*X = B
v = sum(X(1:3).^2); sigma = sqrt(v) % portfolio standard deviation
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 18
Markowitz model
Non-negativity constraints
If we prohibit short selling, the problem is quadratic:
minimize
1
2
n

i=1
n

j=1
w
i
w
j

ij
subject to
n

i=1
w
i
r
i
= r
n

i=1
w
i
= 1
w
i
0, i = 1, 2, . . . , n
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 19
Markowitz model
Consider the previous example with short selling constraints
In matrix formulation, the problem is
min
1
2
w

w s.t. A w = b, lb w
Here, w

= [w
1
, w
2
, w
3
] is the weight vector, is the 3 3
identity covariance matrix, lb

= [0, 0, 0] and A is the 2 3


constraint matrix
A =
_
_
1 2 3
1 1 1
_
_
Since the assets are uncorrelated, w

w = w
2
1
+w
2
2
+w
2
3
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 20
Markowitz model
Solving the problem numerically (MATLAB)
% Function to minimize
function [variance] = f(w,sigmaMatrix);
variance = .5*w*sigmaMatrix*w;
% We are solving a problem of the form
% min W*Sigma*W st : r*w = rbar and sum (w)=1 and w>=0
% Defining parameters
rbar = 2; % expected portfolio return
initialW = zeros(3,1); % initial weights
r = [1;2;3]; % asset return vector
sigmaMatrix = eye(3); % covariance matrix (3x3 identity matrix)
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 21
% Defining the constraints
Aeq = [r;ones(1,3)]; % matrix of equality constraints
Beq = [rbar;1];
lb = zeros(3,1); % lower bound
% Optimization
[W,feval,exitflag]
=fmincon(@variance,initialW,[],[],
Aeq,Beq,lb,[],[],options,sigmaMatrix);
% Finding the value of sigma
y = sum(W(1:3).^2); sigma = sqrt(y)
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 22
Input data
We require estimates of the expected return vector ( r
1
, . . . , r
n
)

and the return covariance matrix = (


ij
)
As shown above, the estimation of expected return is dicult
and leads to noisy estimates
With m the sample size, the sample covariance is

ij
=
1
m1
m

i=1
(r
i
r
i
)(r
j
r
j
)
The estimation error inuences the optimal portfolio allocation
Focus on minimum variance portfolios
Robust formulation of the mean-variance optimization
Factor models are often used in practice to reduce the
dimensionality of the estimation problem
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 23
Robust mean-variance optimization
In practice, the expected returns r
i
and the covariances
i,j
for
1 i, j n are estimated with error
Suppose there are sets S
r
R
n
and S

R
nn
such that
R = ( r
1
, . . . , r
n
)

S
R
and = (
i,j
) S

S
R
and S

are uncertainty sets containing all possible estimates


of the expected return vector and the return covariance matrix
S
R
is a neighborhood of the true estimate of the expected return
vector, and S

is a neighborhood of the true estimate of the


return covariance matrix (think of condence intervals)
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 24
Robust mean-variance optimization
With estimation error, a portfolio w has worst case expected
return of r(w) = min
RS
R

n
i=1
w
i
r
i
and maximum variance of
V (w) = max
S

n
i,j=1
w
i
w
j

i,j
The robust minimum variance portfolio solves the problem
minimize V (w),
subject to r(w) r
n

i=1
w
i
= 1
w
i
0, i = 1, 2, . . . , n
Minimize maximum variance, generate return of at least r
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 25
Robust mean-variance optimization
Example
Consider the example from slide 15: A portfolio with 3
uncorrelated assets with expected returns 1, 2 and 3 and unit
variances
Suppose is estimated without error (S

= {})
Suppose the expected returns are estimated with error and lie in
the uncertainty sets (condence intervals)
S
r
1
= [1, 3], S
r
2
= [1, 3], S
r
3
= [2.5, 3.5]
We determine the robust portfolio weights for r = 2
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 26
Robust mean-variance optimization
Example
Since is estimated without error and the assets are uncorrelated
with unit variances, the maximal variance is V (w) = w
2
1
+w
2
2
+w
2
3
The uncertainty set for every expected return is given by a
condence interval. Because of this, the worst case expected return
r(w) has to be attained at a boundary of the uncertainty sets
The inequality r(w) r can be rewritten in terms of the
boundaries of the uncertainty sets S
r
1
, S
r
2
, and S
r
3
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 27
Robust mean-variance optimization
Example
The robust minimum variance optimization problem becomes
minimize w
2
1
+ w
2
2
+ w
2
3
,
subject to 3w
1
+ 3w
2
+ 3.5w
3
2
3w
1
+ 3w
2
+ 2.5w
3
2
3w
1
+ w
2
+ 3.5w
3
2
3w
1
+ w
2
+ 2.5w
3
2
w
1
+ 3w
2
+ 3.5w
3
2
w
1
+ 3w
2
+ 2.5w
3
2
w
1
+ w
2
+ 3.5w
3
2
w
1
+ w
2
+ 2.5w
3
2
w
1
+ w
2
+ w
3
= 1
w
i
0, i = 1, 2, . . . , n
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 28
Robust mean-variance optimization
Example
The robust optimal portfolio for r = 2 is w = (0,
1
3
,
2
3
); the
minimum standard deviation is = 0.75
The worst case expected return of this portfolio is 2, such that the
target r is attained in the worst case where the estimates of the
returns r
i
were completely erroneous
Compare to the solution without any uncertainty: w = (
1
3
,
1
3
,
1
3
)
and = 0.58
The robust optimization moves away from asset 1 with the highest
estimation risk, and allocates more weight to asset 3 which has a
more accurately estimated expected return
Because of a more restrictive portfolio selection, the standard
deviation of the robust portfolio is higher
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 29
Robust mean-variance optimization
Solving the problem numerically (MATLAB)
% Function to minimize
function [variance] = f(w);
variance = w*w;
% We are solving a problem of the form
% min W*Sigma*W st : r*w >= rbar and sum (w)=1 and w>=0
% Defining parameters
rbar = 2*ones(8,1); % expected portfolio return
initialW = zeros(3,1); % initial weights
r = [1;2;3]; % asset return vector
sigmaMatrix = eye(3); % covariance matrix (3x3 identity matrix)
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 30
% Defining the constraints
A = [-3 -3 -3.5; -3 -3 -2.5; -3 -1 -3.5; % inequality
-3 -1 -2.5; 1 -3 -3.5; 1 -3 -2.5; 1 -1 -3.5; 1 -1 -2.5];
B = -[rbar];
Aeq = [1 1 1 ]; % equality
Beq = [1];
lb = zeros(3,1); % lower bound
% Optimization
[W,feval,exitflag]
=fmincon(@f,initialW,A,B,Aeq,Beq,lb,[]);
% Finding the value of sigma
y = sum(W(1:3).^2); sigma = sqrt(y)
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 31
Markowitz model
Generalizations
Minimize VaR or AVaR given target expected return
No closed-form solutions anymore
Incorporate higher moments
Mean-variance-skewness optimization: maximize mean and
skewness and minimize variance, subject to the constraint
In general, maximize odd moments and minimize even
moments, subject to the constraint
Caveat: problem may not have a solution that satises all
optimizations simultaneously
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 32
Markowitz model
Polynomial Goal Program
With w the vector of weights, for risk preference parameters
, , 0 we solve
min
w
Z = (1 +d
1
(w))

+ (1 +d
2
(w))

+ (1 +d
3
(w))

such that d
k
(w) = (1)
k+1
(Z

k
Z
k
(w)), k = 1, 2, 3
where
Z

k
= max{(1)
k+1
Z
k
(w) :

i
w
i
= 1}
is the optimal kth moment under the capital constraint
Natural extension to higher moments
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 33
Two-fund theorem
Consider two solutions (w
1
,
1
,
1
) and (w
2
,
2
,
2
) to the
Markowitz problem
The portfolio formed by taking of the rst portfolio and 1
of the second portfolio is also a solution to the Markowitz problem
As varies over (, +), the portfolios gotten this way sweep
out the entire minimum variance set
It follows that 2 ecient portfolios (funds) can be established so
that any ecient portfolio can be duplicated (in terms of mean
and variance) as a combination of these two
In other words, investors seeking ecient portfolios need only
invest in combinations of these two funds
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 34
Two-fund theorem
Practical implications
Two mutual funds could provide ecient investment service for
everyonethere is no need to buy individual stocks separately
Note however, that this is based on a restrictive set of
assumptions:
Investors care only about mean and variance of returns
Everyone estimates the same mean vector and covariance
matrix
There is a xed investment horizon (buy and hold)
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 35
Including a risk-free asset
Suppose there is a risk-free asset available for investment
The risk-free return r
f
on this asset is constant
Positive weight corresponds to lending money at r
f
Negative weight corresponds to borrowing money at r
f
Consider a 2 asset portfolio with a invested in the risk-free asset
and 1 a invested in some risky asset
If a = 1 we get a point on the mean axis given by r
f
If a = 0 we get a point in the feasible set corresponding to the
risky asset
As a varies, the point representing the portfolio traces out a
straight line in the r- plane
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 36
Including a risk-free asset
Now consider portfolios consisting of some combination of n risky
assets (long only) and the risk-free asset (long or short)
For each asset/portfolio on the feasible region, we form
combinations with the risk-free asset
These combinations trace out an innite straight line
originating at the risk-free point and passing through the risky
asset/portfolio
Since there is a line for every feasible portfolio, all these lines form
a triangularly shaped feasible region when a risk-free asset is
available
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 37
One-fund theorem
With a risk-free asset, the ecient set consists of a single straight
line (the top of the triangular feasible region)
This line is tangent to the ecient set of the risky assets
Any portfolio on the line can be expressed as a combination of the
risk-free asset and the tangent portfolio F
Hence, there is a single fund F of risky assets such that any
ecient portfolio can be constructed as a combination of F and
the risk-free asset
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 38
Appendix
Perfect dependence in the general case
Suppose the random variables X and Y are continuous
Perfect positive dependence (comonotonicity) means that
Y = f(X) for f = F
1
Y
F
X
increasing
If X and Y are comonotone and F
X
= F
Y
then X = Y
Perfect negative dependence (countermonotonicity) means that
Y = f(X) for f = F
1
Y
(1 F
X
) decreasing
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 39
Appendix
Perfect dependence in the general case
Assume X and Y have nite and strictly positive variances
The set of all possible correlations Corr[X, Y ] is a closed interval
[
min
,
max
] and for the extremal correlations
min
0
max
The extremal correlation Corr[X, Y ] =
min
is attained if and only
if X and Y are countermonotonic; Corr[X, Y ] =
max
is attained
if and only if X and Y are comonotonic.

min
= 1 i X and Y are of the same type;
max
= 1 i X
and Y are of the same type
Recall that X and Y are of the same type if we can nd a > 0
and b R so that Y = aX +b, i.e. the variables are perfectly
linearly dependent
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 40
Appendix
Copula describes dependence structure
A copula is a joint distribution function with standard uniform
marginals
For any joint distribution function F with marginals F
i
there is an
associated copula C such that
F(x
1
, . . . , x
n
) = C(F
1
(x
1
), . . . , F
n
(x
n
))
where C is unique if each F
i
is continuous
In the continuous case, we can construct C from F via
C(u
1
, . . . , u
n
) = F
_
F
1
1
(u
1
), . . . , F
1
n
(u
n
)
_
C is invariant under strictly increasing transformations
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 41
Appendix
Two standard copulas
Gaussian copula
C
Ga

(u
1
, . . . , u
n
) =
n

(
1
(u
1
), . . . ,
1
(u
n
))
where
n

is the n-variate standard normal distribution function


with correlation matrix , and
1
is the inverse of the standard
normal distribution function
t-copula
C
t
,
(u
1
, . . . , u
n
) = t
n
,
(t
1

(u
1
), . . . , t
1

(u
n
))
where t
n
,
is the n-variate standard t-distribution function with
correlation matrix and degrees of freedom, and t
1

is the
inverse of the standard t-distribution function with degrees of
freedom
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 42
Appendix
Frechet bounds
As a joint distribution function, a copula satises
max(u +v 1, 0) C(u, v) min(u, v)
for all u and v in [0, 1]
Upper bound: comonotonicity
Lower bound: countermonotonicty
C(u, v) = uv if and only if the variables are independent
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 43
Appendix
Frechet copulas
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
1
0
0.25
0.5
0.75
1
0
0.2
0.4
0.6
0.8
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
1
0
0.25
0.5
0.75
1
0
0.2
0.4
0.6
0.8
Kay Giesecke
MS&E 242H: Mean-variance portfolio theory 44
Appendix
Measures of monotonic dependence
Spearmans rank correlation:
S(X
1
, X
2
) = Corr [F
1
(X
1
), F
2
(X
2
)]
= 12
_
1
0
_
1
0
_
C(u, v) uv
_
dudv [1, 1]
Scaled version of the volume enclosed by C and the
independence copula
Invariant under increasing transformations
S(X
1
, X
2
) = +1 i the variables are comonotonic
S(X
1
, X
2
) = 1 i the variables are countermonotonic
Kay Giesecke

Вам также может понравиться