Risk Management


    {  Meanvar.mpl  }

    {  GAMS Model Library, http://www.gams.com/modlib/libhtml/meanvar.htm  }

    {  Financial Optimization: Risk Management, Quadratic Programming, model_var1:- Size: 2 x 8, model_var2:- Size: 1 x 7  }


#define model_var1
!#define model_var2

TITLE
    MeanVar;

Option
    Modeltype=Quadratic

INDEX
    s := (cn,fr,gr,jp,sw,uk,us,wr);
    i[s] := (cn,fr,gr,jp,sw,uk,us);
    j := i;

DATA
    Mu[i] := (0.1287, 0.1096, 0.0501, 0.1524, 0.0763, 0.1854, 0.0620, 0.0916);
    Q[i,j] := (
            !   cn      fr        gr      jp       sw       uk       us
    {cn}    42.18,       0,       0,       0,       0,       0,       0,
    {fr}    20.18,   70.89,       0,       0,       0,       0,       0,
    {gr}    10.88,   21.58,   25.51,       0,       0,       0,       0,
    {jp}     5.30,   15.41,    9.60,   22.33,       0,       0,       0,
    {sw}    12.32,   23.24,   22.63,   10.32,   30.01,       0,       0,
    {uk}    23.84,   23.80,   13.22,   10.46,   16.36,   42.23,       0,
    {us}    17.41,   12.62,    4.70,    1.00,    7.20,    9.90,   16.42);

    Mup := 0.115;

#ifdef model_var2
    R := 0.0979;
#endif

VARIABLE

#ifdef model_var1
    M;
#endif
    X[i] INITIAL 0;

MODEL

    MIN V = SUM(i,j: X[i] * Q * X[i:=j]);

SUBJECT TO

#ifdef model_var1
    Mbal:     M = SUM(i: Mu * X);

    Budget:   SUM(i: X) = 1;
#endif

#ifdef model_var2
    Riskless: SUM(i: Mu * X  - R * X) = Mup - R;
#endif

BOUNDS

#ifdef model_var1
    M = Mup;
#endif

    X <= 1;

FREE

#ifdef model_var1
    M;
#endif

END


Back To Top | Maximal Home Page | List of Models | Previous Page | Next Page