V.A. Babaitsev

Download Report

Transcript V.A. Babaitsev

V.A. Babaitsev, A.V. Brailov,
V.Y. Popov
On Niedermayers' algorithm of
efficient frontier computing
Two Internet papers with common title
“Applying Markowitz's Critical Line Algorithm”
have appeared in 2006-2007.
Two young Suiss economists
Andras and Daniel Niedermayer
presented fast algorithm of getting efficient frontier
for Markowitz portfolio problem.
http://www.vwl.unibe.ch/papers/dp/dp0602.pdf
Springer Verlag will publish soon (November) a book
“Handbook of Portfolio Construction.
Contemporary Applications of Markowitz Techniques”
with this paper .
Markowitz problem
D   2  XTVX  min
μT X  ,
T
1 X  1,
X  0

Notations
• n assets;
• V – an (n×n) positive definite covariance matrix;
• μ – n vector of assets expected returns;
• X – n vector of assets weights;
T
• 1 – n unit vector: 1  1,1, ,1 ;
• μ – portfolio expected return;
• D – variance, σ – standard deviation (risk).
Some assumptions
1. Assets are ordered by increasing of expected
returns, more over
1  2   n
1   2    n
Minimal frontier in coordinates  , D  consists of
finite number of parabola divided by turning
points.
2. Moving along minimal border from left to right
over turning point only one asset added or
removed to (from) portfolio.
Niedermayers’ algorithm


1. Start from turning point P1 1,  1 with initial portfolio
X1  1, 0, , 0 .
2. When moving from a turning point to the next higher one two
situations must occur: either one non-zero asset becomes
zero or a formerly zero asset becomes non-zero.
Algorithm considers both situations and chooses case with
minimum possible derivative value.
2
3. Algorithm ends when reaching final turning point Pm n ,  n
and final portfolio Xm   0, 0, , 1.
2


Performance
We have checked algorithm performance.
Prof. Victor Popov has developed the
program in C++ for this algorithm.
Prof. Andrey Brailov has used his own
developed program envelope MatCalc
(miniMATLAB).
For 201 assets execution time was 1 sec.
(Pentium 4, 2.66 GHz, 256 Mb)
Minimal frontier for 201 assets


■ Turning points
Counterexample
Condition 2 is not true generally. Example:
μ  10, 12, 14 
Solution:

X
14
 0, 0, 1
3 1 
10.5  , , 0 
4 4 
10
1, 0, 0 
 4 1 4 
V   1 8 11 


 4 11 26 


D
33 2
  51  278
14
7
 122   2  75  404
2

2
 123

Example plot
• Green line – minimal
frontier
• Light red –  13
• Red –  23
•  123 ,  23 ,  13 have
common tangent
point P 14, 26 
σ
5
4.5
4
3.5
3
2.5
2
1.5
10
11
12
13
14
μ
Example for n = 4
Left end: μ  1, 2, 3, 4 
 1 1 3 5 
 1 9 3 5 

V 
 3 3 25 5 



5
5
5
49


is positively defined.
Adjacent turning points X1  1, 0, 0, 0 and
 71 52 136 
X2   0,
,
,

363
121
363


Generalization
We can construct similar examples for larger value of n.
Adjacent turning points will be P(0, 0, …, 0, 1) and
Q  x1, x2 , , xn 1, 0  , where x1  0, x2  0, , xn1  0.
It is sufficient to choose matrix V with conditions:
vnn  vn,n 1
n  n 1

vnn  vn,n  2
n  n  2

vnn  vn1

,
n  1
which provides common tangent point for minimal
frontiers:  n,n1,  n,n2, ,  n,1.
Good news: set of Markowitz problems with the satisfied
condition 2 is dense in set of all such problems.
Some basic formulas
For two adjacent turning points equation of minimal
frontier is
where
2


 2S    S
2
S
 
,
S
S  1TSVS11S , S  μTSVS11S ,  S  μTSVS1μS ,
S  0,  S  0, S  S S    0.
2
S
S – subset of {1, 2, …, n} non-zero assets.
Geometry of minimal frontier
Lemma. Two parabolas with equations
2
2



2






 2 2    2
2
2
1
1
1
2
 
, 
1
2
have common tangent point if and only if
2  1  2   1    2  1 
2
1 2
,

.
1  2
First condition of lemma is true when expanding the
frontier one asset, second condition is not satisfied
generally.
Example
Citation from A.D. Ukhov “Expanding the frontier one asset at a time”,
Finance Research Letters, 3 (2006), 194-206: “It is well-known
property of the portfolio problem that for each asset there is one
minimum-variance portfolio in which it has a weight zero. Therefore,
on the frontier constructed with (n + 1) assets there will be one point
that has a weight of zero for the new asset.”
Example.
1

0
0
3



3
1


μ   1, , 3  , V   0
0 .


2
 2 
 0 0 1




Example (continued)
Vector has a constant
second component. X123   5  1  1  7  1   .
11
1
2
3
12 2 
4 2
 123

    2 – green
12
3
σ
line.
1
2
 13
 1    2
– red
3
line.
1
0.9
0.8
0.7
0.6
0.5
μ
0.4
1
1.2
1.4
1.6
1.8
2x
2.2
2.4
2.6
2.8
3
Three parabolas lemma
y
y1
y2
P
x0
x1
x
Three parabolas lemma
Two parabolas with equations:
y1  A1x2  2B1x  C1, y2  A2 x2  2B2 x  C2
intersect in point P. Third parabola has common
tangent points with x  x1, x  x2 , x1  x2 .
2
A2  A1 C2  C1    B2  B1 
Let

D
, D  0.
y 2  x1   y1  x1 
Then coefficients of third parabola will be:
A  A1  D, B  B1  Dx1, C  C1  Dx12.
As consequence A  A1, C  C1 and if
x1  0, B  B1.
Quality of minimal frontier
Resampling technique was originally proposed by
R.Michaud and R.Michaud in 1998. It requires:
• collecting T historical returns on a set of Z assets;
• computing sample means μ
ˆ and covariance matrix Vˆ ;
• finding a set of K optimal portfolios for every value of
max  min
k , k  1,..., K; k  min   k  1 h;
h
K 1
;
• simulating N independent draws for asset returns from
multivariate normal distribution with mean and variance
matrix equal to sample ones;
• for each simulation re-estimating a new set of
optimization input μ and V and finding new set of K
optimal portfolios.
From “Implementing Models in Quantitative Finance” Fusai,
Gianluca, Roncoroni, Andrea: Springer Finance 2008, p. 277
MICEX Example
MICEX is Russian stock
market. We choose 9 top
assets and use monthly
returns for 5 years (20042008). Then input data for
Markowitz problem were
calculated. After
analyzing of covariance
matrix we have reduced
number of assets to 6
because 3 assets were
not included in any
portfolio.
Mu
AFLT
GMKN
LKOH
MSNG
RTKM
URSI
4,08
83,19
12,07
11,28
-10,04
19,01
18,20
4,07
12,07
86,06
29,28
4,97
28,52
31,46
2,94
11,28
29,28
67,93
28,28
20,53
17,24
3,53
-10,04
4,97
28,28
142,81
32,43
23,75
4,10
19,01
28,52
20,53
32,43
111,57
51,50
2,56
18,20
31,46
17,24
23,75
51,50
102,07
Results
• 10 turning points are on
minimal frontier.
• Coefficients of parabolas
are decreasing with
increasing of number of
assets. Minimal
coefficients are for
maximum number of
assets - 6. Statistical
stability is predicted for
minimal coefficients.
350815,50
-2868618,87
5864232,20
161006,55
-1314341,09
2682375,50
531,45
-4201,63
8338,51
52,40
-391,29
761,71
21,79
-156,99
313,45
26,82
-191,18
371,45
47,30
-317,92
567,56
208,50
-1216,84
1820,72
946,18
-5301,75
7475,83
10
9
8
7
6
2.6
2.8
3
3.2
x 3.4
3.6
3.8
4
Concluding remark
Adding asset i
5
v55  vi 5
5  i

Removing
asset i
1, 2, 4, 3, 6
vi 6  v66
i  6
-32,91
5, 1
5, 1, 2
4379,01 1, 4, 3, 6
2871,35 4, 3, 6
-46,85
-55,36
5, 1, 2, 4
139,55
3, 6
-80,82
5, 1, 2, 4, 3
78,64
6
-224,15
Markowitz vs. Index
return
time
Blue – MICEX Index
Green – Markowitz portflio