V.A. Babaitsev, A.V. Brailov, V.Y. Popov
description
Transcript of V.A. Babaitsev, A.V. Brailov, V.Y. Popov
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.pdfSpringer Verlag will publish soon (November) a book “Handbook of Portfolio Construction.Contemporary Applications of Markowitz Techniques”
with this paper .
Markowitz problem
Notations• n assets;• V – an (n×n) positive definite covariance matrix;• μ – n vector of assets expected returns;• X – n vector of assets weights;• 1 – n unit vector: • μ – portfolio expected return;• D – variance, σ – standard deviation (risk).
1,1, ,1 ;T1
2 min
,
1 1,0
T
T
T
D V
X Xμ X
XX
Some assumptions1. Assets are ordered by increasing of expected
returns, more over
Minimal frontier in coordinates 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.
, D
1 2
1 2
n
n
Niedermayers’ algorithm1. Start from turning point with initial portfolio
. 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.
3. Algorithm ends when reaching final turning pointand final portfolio .
21 1 1,P
1 1, 0, , 0X
2,m n nP 0, 0, ,1m X
PerformanceWe 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:
Solution:
4 1 4
10,12,14 1 8 114 11 26
V
μ
2 2123
2 212
3314 0, 0,1 51 27814
3 1 710.5 , , 0 75 4044 4 2
10 1, 0, 0
D
X
Example plot
• Green line – minimal frontier
• Light red – • Red – • have
common tangent point
23
123, 23, 13
14, 26P
13
σ
μ
Example for n = 4
Left end:
is positively defined.
Adjacent turning points and
1, 2, 3, 4μ1 1 3 51 9 3 53 3 25 55 5 5 49
V
1 1, 0, 0, 0X
271 52 1360, , ,
363 121 363
X
GeneralizationWe can construct similar examples for larger value of n.
Adjacent turning points will be P(0, 0, …, 0, 1) and , whereIt is sufficient to choose matrix V with conditions:
which provides common tangent point for minimal frontiers:
Good news: set of Markowitz problems with the satisfied condition 2 is dense in set of all such problems.
1 2 1, , , , 0nQ x x x 1 2 10, 0, , 0.nx x x
, 1 , 2 1
1 2 1
,nn n n nn n n nn n
n n n n n
v v v v v v
, 1 , 2 ,1, , , .n n n n n
Some basic formulasFor two adjacent turning points equation of minimal
frontier is
where
S – subset of {1, 2, …, n} non-zero assets.
22 2
,S S S
S
1 1 1
2
, , ,
0, 0, 0.
T T TS S S S S S S S S S S S
S S S S S S
V V V
1 1 μ 1 μ μ
Geometry of minimal frontierLemma. Two parabolas with equations
have common tangent point if and only if
First condition of lemma is true when expanding the frontier one asset, second condition is not satisfied generally.
2 1 22 1 2 1 2 1
1 2
, .
2 22 21 1 1 2 2 2
1 2
2 2,
ExampleCitation 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 03
3 11, , 3 , 0 0 .2 2
0 0 1
V
μ
Example (continued)
Vector has a constant second component.
– green line.
– red line.
1235 1 1 7 1 .4 2 3 12 2
X
μ
σ2 213
113
2 2123
11 112 3
Three parabolas lemma
P
y
x1x0x
1y
2y
Three parabolas lemmaTwo parabolas with equations:
intersect in point P. Third parabola has common tangent points with
Let
Then coefficients of third parabola will be:
As consequence and if
2 21 1 1 1 2 2 2 22 , 2y A x B x C y A x B x C
1,x x
22 1 2 1 2 1
2 1 1 1
, 0.A A C C B B
D Dy x y x
2,x x 1 2.x x
21 1 1 1 1, , .A A D B B Dx C C Dx
1 1,A A C C 1 10, .x B B
Quality of minimal frontierResampling 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 ;• finding a set of K optimal portfolios for every value of
• 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.
μ
V̂
, 1, ..., ;k k K min 1 ;k k h max min ;1
hK
μ̂
From “Implementing Models in Quantitative Finance” Fusai, Gianluca, Roncoroni, Andrea: Springer Finance 2008, p. 277
MICEX ExampleMICEX is Russian stock
market. We choose 9 top assets and use monthly returns for 5 years (2004-2008). 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
6
7
8
9
10
2.6 2.8 3 3.2 3.4 3.6 3.8 4x
Adding asset i Removing asset i
5 1, 2, 4, 3, 6 -32,91
5, 1 4379,01 1, 4, 3, 6 -46,855, 1, 2 2871,35 4, 3, 6 -55,36
5, 1, 2, 4 139,55 3, 6 -80,82
5, 1, 2, 4, 3 78,64 6 -224,15
Concluding remark55 5
5
i
i
v v
6 66
6
i
i
v v
Markowitz vs. Index
Blue – MICEX Index
Green – Markowitz portflio
time
return