Você está na página 1de 12

USING SOLVER TO REPRODUCE UNCONSTRAINED

FRONTIER PORTFOLIOS
Asset Data
T-Bills
Bonds
Stocks

Exp Ret
Std Dev
0.60%
4.30%
2.10%
10.10%
9.00%
20.80%

Correlation Matrix T-Bills


Bonds
Stocks
T-Bills
1.00
0.63
0.09
Bonds
0.63
1.00
0.23
Stocks
0.09
0.23
1.00
Covariance Matrix T-bills
Bonds
Stocks
T-Bills
0.0018
0.0027
0.0008
Bonds
0.0027
0.0102
0.0048
Stocks
0.0008
0.0048
0.0433

Frontier Portfolio Weights


T-Bills
Bonds
Stock
ExpRet
StdDev

Solution to Reproduce Figure 1 from our in-class handout:

Given asset returns, asset standard deviations, and the cur


can be used to calculate Expected Return on the Portfolio o
Matrix Notation and Excel Formulas

Portfolio Weights
40%
50% Change
10%
2.19% PortRet
7.00% PortSd

1. Portfolio Return=wTe =SUMPRODUCT(w,e)


2. Portfolio Variance =wTVw =MMULT(TRANSPOSE(w),MMUL
w= column vector of portfolio weights
e=column vector of portfolio returns
V=Variance-Covariance Matrix

Cell I:14 - calculates the Expected Return on the Portfolio b


Cell I:15 - calculates the Standard Deviation of the Portfoli

Note: Both calculations use linear algegra operations. For E


vectors 'e' and 'w' must agree. In our case 'e'='w'=3x1 vec
Expected Return is a scalar value. For our problem we obse
mutliplication of a 1x3 vector 'wT'and a 3x1 vector 'e'. Dim
Standard Deviation,Cell I:15, the dimensions of the matrix
'V'=3x3 matrix and 'w'=3x1 matrix satisfying the first part
vector. Finally, we need the dimensions of w T and V*w to ag
vector. The resulting multiplication wTVw is a 1x1 or scalar
Control+Shift+Enter when evaluating functions that use ma

m our in-class handout:

d deviations, and the current portfolio split, linear algebra operations


Return on the Portfolio of Assets and the Variance of the Portfolio

DUCT(w,e)
LT(TRANSPOSE(w),MMULT(V,w))

ghts
ns

d Return on the Portfolio by employing equation 1.


d Deviation of the Portfolio by raising equation 2 to the one-half power.

algegra operations. For Expected Return,Cell I:14, the dimensions of


our case 'e'='w'=3x1 vector satisfying the agreement of dimesions. The
For our problem we observe Portfolio Return to be the matrix
and a 3x1 vector 'e'. Dimension Multiplication: (1x3)*(3x1)=(1x1) .For
dimensions of the matrix 'V' and the vector 'w' must agree. In our case
x satisfying the first part of our equation. The result of V*w is a 3x1
sions of w T and V*w to agree. In our case, w T = 1x3 vector and V*w =3x1
wTVw is a 1x1 or scalar, as desired. It is also critical to employ
ing functions that use matrices and vectors as imputs.

USING SOLVER TO REPRODUCE UNCONSTRAINED


FRONTIER PORTFOLIOS
Asset Data
T-Bills
0.60%
4.30%
Bonds
2.10%
10.10%
Stocks
9.00%
20.80%
RE
3.00%
Correlation Matrix T-Bills
Bonds
Stocks
T-Bills
1.00
0.63
0.09
Bonds
0.63
1.00
0.23
Stocks
0.09
0.23
1
Covariance Matrix T-bills
Bonds
Stocks
T-Bills
0.0018
0.0027
0.0008
Bonds
0.0027
0.0102
0.0048
Stocks
0.0008
0.0048
0.0433

Target Exp. Return

Frontier Portfolio Weights


T-Bills
Bonds
Stocks
Exp Ret
Std Dev

Covariance Matrix T-bills


Bonds
Stocks
RE
Frontier Portfolio Weights
T-Bills
0.0018
0.0027
0.0008
0.0013
T-Bills
Bonds
0.0027
0.0102
0.0048
0.002
Bonds
Stocks
0.0008
0.0048
0.0433
0.004
Stocks
RE
0.0013
0.0020
0.004
0.008
RE
Exp Ret
Std Dev

Solution to Reproduce Figure 3 from our in-class handout:

8% target1

Portfolio Weights
-24.31%
44.09% change1
80.22%
100.00%
8.00% portret1
18.02% portsd1

Portfolio Weights
-56.96%
30.67%
48.49%
77.80%
7.00%
13.94%

As mentioned before, it is necessary to check the dimensions of inputs for th


calculations of Expected Return and Standard Deviation. For this problem, th
dimensions are accepted.
Installation of Solver
1. Click the Office Button in the top left hand corner
2. Click Excel Options from the drop down menu
3. Choose Add-Ins on the left panel menu
4. Highlight the Solver Add-In and Click Go
5. In the pop-up menu, select solver add-in and cick OK
6. Solver will be available in the DATA tab in the analysis subtab.
Application of Solver
If we want to construct an efficient portfolio producing a given target return,
we can employ excel's Solver. The portfolio variance (SD) is a quadratic
function of weights, so solver will complete the task.
Necessary Inputs:
'target cell' = value that will be minimized (maximized) = Std Dev (portsd1)
'changing cells' = values to be changed = Bonds and Stocks (change1)
'constraints' = Exp Return must equal Target Expected Return (target1)
Note: Restriction on full investment can be accomplished by setting T-Bills
equal to 1-Bonds+Stocks

Answer: The optimum weights imply the following: buy Bonds and Stocks and
short sell T-Bills in the corresponding proportions under the portfolio weights.
The Exp Ret verifies the constraint and minimizes the Std Dev in the process

dout:

mensions of inputs for the


tion. For this problem, the

OK
ysis subtab.

ng a given target return,


(SD) is a quadratic

ed) = Std Dev (portsd1)


d Stocks (change1)
ed Return (target1)

shed by setting T-Bills

uy Bonds and Stocks and


der the portfolio weights.
e Std Dev in the process.

USING ALGEBRA TO REPRODUCE UNCONSTRAINED


FRONTIER PORTFOLIOS
Asset Data
T-Bills
Bonds
Stocks

Exp Ret
Std
0.60%
4.30%
2.10%
10.10%
9.00%
20.80%

Portfolio Weights

Correlation Matrix T-Bills


Bonds
Stocks
T-Bills
1.00
0.63
0.09
Bonds
0.63
1.00
0.23
Stocks
0.09
0.23
1.00
Covariance Matrix T-bills
Bonds
Stocks
T-Bills
0.0018
0.0027
0.0008
Bonds
0.0027
0.0102
0.0048
Stocks
0.0008
0.0048
0.0433

VCV Inverse

Finding Weights, g and h, to generate points on the frontier


u-VEC

l
1
1
1

m
1.26
0.80
1.97

686.51
-93.46
20.77

A
B
C
D

4.026
0.201
613.825
107.385

Generating Frontier Portfolios, using G+H


Target Expected Return

7.00%

Weights
T-Bills
Bonds
Stocks

-5.78%
36.02%
69.76%

Exp Return
Std Dev

Solution to Reproduce Figure 4 from our in-cla

tfolio Weights
T-Bills
Bonds
Stocks

Idea: Producing an efficient frontier with no c


This can be achieved through the use of alge

33.3%
33.3%
33.3%

Exp Ret
Variance
Std Dev

e=vector of expected returns (C5:C7)


w=vector of weights (I5:I7)
u=unit vector (A24:A26)
V=Variance-Covariance Matrix (C15:E17)
V-1=Inverse of the VCV Matrix =MINVERSE(V)
MINVERSE, a 3x3 matrix must be highlighted
employed.

3.90%
0.008
8.94%

A=uTl
B=eTl
C=uTm
D=BC-A2
Where: l=V-1e & m= V-1u

VCV Inverse
926.0132 -250.11779227 10.6179
-250.1178 170.9923529 -14.33416
10.6179 -14.334158432 24.48752

g= [Bm - Al]/D -(3x1 vector)


h=[Cl-Am]/D -(3x1 vector)
Note: Portfolio g has an Expected Return of 0
Return of 100%. A linear combination of thes
g

Exp Ret
Std Dev

7.00%
15.70%

g+h

1.24
-0.21
-0.03

-18.54
8.08
10.46

-17.30
7.87
10.43

0.00%
4.33%

100.00%
239.08%

100.00%
237.55%

T=Target Return

Desired Weights = linear combination of g an

Solution: The values in the Desired Weights v

ure 4 from our in-class handout:

nt frontier with no constraints on individual asset weights.


ugh the use of algebra (linear algebra-generally).

urns (C5:C7)
7)

atrix (C15:E17)
atrix =MINVERSE(V) (H15:J17) *Note: When using
must be highlighted and Control+Shift+Enter must be

tor)
r)
xpected Return of 0% and Portfolio (g+h) has an Expected
combination of these values will be very useful.

combination of g and h = g +h*T

e Desired Weights vector correspond to figure 3.

Asset Data
T-Bills
Bonds
Stocks

Target Exp Ret


T-Bills
Bonds
Stocks
Exp Ret
Std Dev

Covariance Matrix T-bills


T-Bills
0.0018
Bonds
0.0027
Stocks
0.0008

0.60%
2.10%
9.00%

4.30%
10.10%
20.80%

0%
124.00%
-20.52%
-3.48%

1%
105.46%
-12.45%
6.99%

2%
86.92%
-4.37%
17.45%

3%
68.38%
3.71%
27.91%

4%
49.84%
11.78%
38.37%

5%
31.30%
19.86%
48.83%

0.00%
4.33%

1.00%
4.12%

2.00%
5.16%

3.00%
6.91%

4.00%
8.96%

5.00%
11.14%

0.043301 0.041193 0.051593 0.069066 0.089564 0.111429


-2.6E-011 0.010001
0.02
0.03
0.04
0.05

Effi

12%

10%

8%

Expected Return

6%

4%

2%

0%
0%

5%

Bonds
Stocks
0.0027
0.0008
0.0102
0.0048
0.0048
0.0433

6%
12.76%
27.94%
59.30%

7%
-5.78%
36.02%
69.76%

8%
-24.31%
44.09%
80.22%

9%
-42.85%
52.17%
90.68%

10%
-61.39%
60.25%
101.15%

6.00%
13.40%

7.00%
15.70%

8.00%
18.02%

9.00%
20.35%

10.00%
22.70%

12%
14%
16%
-98.47% -135.55% -172.63%
76.40%
92.56% 108.71%
122.07% 143.00% 163.92%
12.00%
27.42%

0.133994 0.156957 0.180166 0.203537 0.227021 0.274207


0.06
0.07
0.08
0.09
0.1
0.12

Efficient Frontier

10%

15%

Risk (Standard Deviation)

14.00%
32.16%

16.00%
36.91%

0.32158 0.369068
0.14
0.16

20%

25%

18%
20%
22%
-209.71% -246.79% -283.87%
124.86% 141.02% 1.571714
184.85% 205.77% 2.266956
18.00%
41.66%

20.00%
46.42%

22.00%
51.19%

0.416631 0.464246 0.511898


0.18
0.2
0.22

Efficient Frontier

25%

Você também pode gostar