The Model
! Scenario portfolio model;
SETS:
SCENE/1..12/: PRB, R, DVU, DVL;
STOCKS/ ATT, GMT, USX/: X;
SXI( SCENE, STOCKS): VE;
ENDSETS
DATA:
TARGET = 1.15;
! Data based on original Markowitz example;
VE =
1.300 1.225 1.149
1.103 1.290 1.260
1.216 1.216 1.419
0.954 0.728 0.922
0.929 1.144 1.169
1.056 1.107 0.965
1.038 1.321 1.133
1.089 1.305 1.732
1.090 1.195 1.021
1.083 1.390 1.131
1.035 0.928 1.006
1.176 1.715 1.908;
! All scenarios happen to be equally likely;
PRB= .08333;
ENDDATA
! Compute expected value of ending position;
AVG = @SUM( SCENE: PRB * R);
! Target ending value;
AVG >= TARGET;
@FOR( SCENE( S):
! Compute value under each scenario;
R( S) = @SUM( STOCKS( J): VE( S, J) * X( J));
! Measure deviations from average;
DVU( S) - DVL( S) = R(S) - AVG
);
! Budget;
@SUM( STOCKS: X) = 1;
! Our three measures of risk;
[VARI] VAR = @SUM( SCENE: PRB * ( DVU + DVL)^2);
[SEMI] SEMIVAR = @SUM( SCENE: PRB * (DVL) ^2);
[DOWN] DNRISK = @SUM( SCENE: PRB * DVL);
! Set objective to VAR, SEMIVAR, or DNRISK;
[OBJ] MIN = VAR;
Model: PRTSCEN