-
Notifications
You must be signed in to change notification settings - Fork 1
/
Mean Absolute Deviation Portfolio Optimization.txt
62 lines (47 loc) · 1.45 KB
/
Mean Absolute Deviation Portfolio Optimization.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
reset;
set ASSETS ordered;
set NOLEV = {t in ASSETS: ord(t) < ord(last(ASSETS),ASSETS)};
param Tmin integer;
param Tmax integer;
param rets {Tmin .. Tmax, ASSETS};
param R;
param M>=0;
var mu {ASSETS};
var y {t in Tmin.. Tmax} >= 0;
var z {t in Tmin.. Tmax} >=0;
var x {ASSETS} >= -.6;
minimize mad: sum {t in Tmin.. Tmax} (z[t] + y[t]);
subject to abs_trick {t in Tmin .. Tmax}: y[t]-z[t] = sum {a in ASSETS} x[a] * (rets[t,a] - mu[a]);
subject to cap {a in ASSETS}: x[a] <= M;
subject to avg {a in ASSETS}: sum {t in Tmin..Tmax} rets[t,a] = (Tmax - Tmin + 1) * mu[a];
subject to full: sum{a in ASSETS} x[a]=1;
subject to target: sum{a in ASSETS} mu[a] * x[a] >= R;
subject to lev {a in NOLEV}: x[a] >=0;
data;
set ASSETS := st bd mm;
param Tmin := 1991;
param Tmax := 2003;
param rets: st bd mm :=
1991 30.7 19.4 4.4
1992 7.6 7.3 2.9
1993 10.1 13.1 3.0
1994 1.3 -7.3 5.5
1995 37.6 26.0 5.6
1996 22.9 0.1 5.3
1997 33.4 12.0 5.5
1998 28.6 14.5 4.7
1999 21.0 -7.5 5.3
2000 -9.1 17.2 6.4
2001 -11.9 5.5 1.8
2002 -22.1 15.2 1.2
2003 28.7 0.5 1.0 ;
param R:= 12;
param M:= 0.8;
option solver loqo;
solve;
printf: "\nOptimal Portfolio Construction : \n";
printf {a in ASSETS}: "%10.7f ", x[a];
printf: "\n\nTarget Return: \n%10.7f \n",
sum{a in ASSETS} mu[a] * x[a];
printf: "\nmu port \n",
sum{a in ASSETS} mu[a];