$*************************************************************
$ A Quadraic Programming model for Portfolio analysis
$
$ A. S. Manne, "GAMS/MINOS: Three examples", Department of
$ Operations Research, Stanford University, May 1986.
$
$ Integer variables have been added to restrict the number of
$ securities selected resulting in an MINLP problem.
$
$ Optimal Solution: 2.925
$*************************************************************
DECLARATIONS {{
INDEX {i,j};
SET I = |1:4|; #Securities
SET J = |1:4|; #Securities
#Mean annual returns on individual securities
PARA mean(I) = {8,9,12,7};
#variance-covariance array (%-squared annual return)
PARA v(I,J) = { 4,3,-1,0,
3,6, 1,0,
-1,1,10,0,
0,0, 0,0};
#Target mean annual return on portfolio (%)
PARA target = 10;
XVAR {x(I)}; #fraction of portfolio invested in asset i
YVAR {activ(I)}; #whether or not asset is in portfolio
POSI {x(I)};
UBDS x(I) = *;
BINA {activ(I)};
}}
MODEL {{
MIN: << i E I| << j E J| v(i,j)*x(i)*x(j) >> >> ;
fsum: << i E I| x(i) >> =e= 1.0;
mean: << i E I| mean(i)*x(i) >> =e= target;
log(i E I): x(i) =l= activ(i);
maxa: << i E I| activ(i) >> =l= 3;
}}
*