Portfolios and linear programming 6

From UBC Wiki

Toy Model

There are four kinds of investments, each with an associated return and risk (1-4, 1 is the best).

Investment Return(%) Risk
Stock A 4 1
Stock B 5 2
Bond A 10 3
Bond B 20 4

Alice invests $1000 in stocks and bonds, the goal is to maximize the total return. The following requirements have to be satisfied.

a. The total risk should be no greater than 3000.

b. The total amount of money being invested should not exceed $1000.

c. The amount in stock A and in stock B minus bond A should be no greater than $500.

Decision Variables

X1= stock A

X2= stock B

X3= bond A

X4= bond B

Objective function

Maximize: Z=0.04X1+0.05X2+0.1X3+0.2X4

Constraints

X1+X2+X3+X4<= 1000

X1+2X2+3X3+4X4<=3000

X1+X2-X3<=500

X1, X2, X3<=0

Slack Variables

X5=1000-X1-X2-X3-X4

X6=3000-X1-2X2-3X3-4X4

X7=500-X1-X2+X3

Last dictionary

X4=750-0.25X1-0.5X2-0.75X3-0.25X6

X5=250-0.75X1-0.5X2-0.25X3+0.25X6

X7=500-X1-X2+X3

Z=150-0.01X1-0.05X2-0.05X3-0.05X6

Solution X1=0, X2=0, X3=0, X4=750, X5=250, X6=0, X7=500. The optimal value of Z is 150.

Dual problem

Objective function

Minimize: W=1000Y1+3000Y2+500Y3

Constraint

Y1+Y2+Y3>=0.04

Y1+2Y2+Y3>=0.05

Y1+3Y2-Y3>=0.1

Y1+4Y2>=0.2

Y1, Y2, Y3, Y4>=0

Solution

Y1=0, Y2=0.05, Y3=0. The optimal value of W is 150, it is the same as the toy model.


Results

The optimal value is 150, when X1=0, X2=0, X3=0, X4=750. This means when puting $750 in Bond B, it reaches the maximal profit, which is $ 150.

Y1: it refers to the first constraint. The first constraint is the upper bound of the total amount of investment. If we increase $1 to the investment, the maximal profit does not change.

Y2: it refers to the second constraint, which is the upper bound of the total risk. If we increase the total risk by 1, the maximal profit increase $0.05.

Y3: it refers to the third constraint. If we increase the third constraint by 1, the maximal profit does not change.


Actual Portfolio

Variable Name Risk YTD Return
x1 HSBC MSCI Brazil ETF 4 -3.21
x2 HSBC MSCI Brazil ETF EUR 4 -4.64
x3 HSBC EURO STOXX 50 ETF 4 13.45
x4 HSBC EURO STOXX 50 ETF EUR 4 13.40
x5 HSBC EURO STOXX 50 ETF EUR 4 11.64
x6 HSBC EURO STOXX 50 ETF GBP 4 12.29
x7 HSBC EURO STOXX 50 ETF USD 4 11.87
x8 HSBC FTSE 100 ETF 3 12.87
x9 HSBC FTSE 100 ETF EUR 3 11.77
x10 HSBC FTSE 100 ETF EUR 3 12.40
x11 HSBC FTSE 100 ETF USD 3 12.19
x12 HSBC FTSE 250 ETF 2 21.08
x13 HSBC FTSE EPRA/NAREIT Developed ETF 4 5.57
x14 HSBC FTSE EPRA/NAREIT Developed ETF EUR 4 4.94
x15 HSBC FTSE EPRA/NAREIT Developed ETF GBP 4 4.29
max    -3.21x1-4.64x2+13.45x3+13.4x4+11.64x5+12.29x6+11.87x7+12.87x8+11.77x9+12.4x10+12.19x11+21.08x12+5.57x13+4.94x14+4.29x15
                            
  st     x1+x2+x3+x4+x5+x6+x7+x8+x9+x10+x11+x12+x13+x14+x15<=5000
      
          4x1+4x2+4x3+4x4+4x5+4x6+4x7+3x8+3x9+3x10+3x11+2x12+4x13+4x14+4x15<=15000

Results

Using Lindo to solve the problem

LP OPTIMUM FOUND AT STEP 0

       OBJECTIVE FUNCTION VALUE
       1)      105400.0
 VARIABLE        VALUE          REDUCED COST
       X1         0.000000         24.290001
       X2         0.000000         25.719999
       X3         0.000000          7.630000
       X4         0.000000          7.680000
       X5         0.000000          9.440000
       X6         0.000000          8.790000
       X7         0.000000          9.210000
       X8         0.000000          8.210000
       X9         0.000000          9.309999
      X10         0.000000          8.680000
      X11         0.000000          8.890000
      X12      5000.000000          0.000000
      X13         0.000000         15.510000
      X14         0.000000         16.139999
      X15         0.000000         16.790001


      ROW   SLACK OR SURPLUS     DUAL PRICES
       2)         0.000000         21.080000
       3)      5000.000000          0.000000
NO. ITERATIONS=       0

The maximal total profit is $104500.