Вы находитесь на странице: 1из 12

USING SOLVER TO REPRODUCE UNCONSTRAINED

FRONTIER PORTFOLIOS

Asset Data Exp Ret Std Dev


T-Bills 0.60% 4.30%
Bonds 2.10% 10.10%
Stocks 9.00% 20.80%

Correlation Matrix T-Bills Bonds Stocks Frontier Portfolio Weights


T-Bills 1.00 0.63 0.09 T-Bills
Bonds 0.63 1.00 0.23 Bonds
Stocks 0.09 0.23 1.00 Stock

Covariance Matrix T-bills Bonds Stocks ExpRet


T-Bills 0.0018 0.0027 0.0008 StdDev
Bonds 0.0027 0.0102 0.0048
Stocks 0.0008 0.0048 0.0433
Solution to Reproduce Figure 1 from our in-class handout:

Given asset returns, asset standard deviations, and the current portfolio sp
can be used to calculate Expected Return on the Portfolio of Assets and the

Matrix Notation and Excel Formulas

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


Portfolio Weights 2. Portfolio Variance =wTVw =MMULT(TRANSPOSE(w),MMULT(V,w))
40%
w= column vector of portfolio weights
50% Change
e=column vector of portfolio returns
10% V=Variance-Covariance Matrix

2.19% PortRet Cell I:14 - calculates the Expected Return on the Portfolio by employing eq
7.00% PortSd Cell I:15 - calculates the Standard Deviation of the Portfolio by raising equ

Note: Both calculations use linear algegra operations. For Expected Return,
vectors 'e' and 'w' must agree. In our case 'e'='w'=3x1 vector satisfying th
Expected Return is a scalar value. For our problem we observe Portfolio Ret
mutliplication of a 1x3 vector 'wT'and a 3x1 vector 'e'. Dimension Multiplica
Standard Deviation,Cell I:15, the dimensions of the matrix 'V' and the vec
'V'=3x3 matrix and 'w'=3x1 matrix satisfying the first part of our equation.
vector. Finally, we need the dimensions of w T and V*w to agree. In our case
vector. The resulting multiplication wTVw is a 1x1 or scalar, as desired. It is
Control+Shift+Enter when evaluating functions that use matrices and vect
andout:

nd the current portfolio split, linear algebra operations


Portfolio of Assets and the Variance of the Portfolio

w),MMULT(V,w))

Portfolio by employing equation 1.


e Portfolio by raising equation 2 to the one-half power.

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


=3x1 vector satisfying the agreement of dimesions. The
we observe Portfolio Return to be the matrix
r 'e'. Dimension Multiplication: (1x3)*(3x1)=(1x1) .For
he matrix 'V' and the vector 'w' must agree. In our case
first part of our equation. The result of V*w is a 3x1
V*w to agree. In our case, wT = 1x3 vector and V*w =3x1
or scalar, as desired. It is also critical to employ
at use matrices and vectors as imputs.
USING SOLVER TO REPRODUCE UNCONSTRAINED
FRONTIER PORTFOLIOS

Asset Data
T-Bills 0.60% 4.30% Target Exp. Return
Bonds 2.10% 10.10%
Stocks 9.00% 20.80%
RE 3.00%
Correlation Matrix T-Bills Bonds Stocks Frontier Portfolio Weights
T-Bills 1.00 0.63 0.09 T-Bills
Bonds 0.63 1.00 0.23 Bonds
Stocks 0.09 0.23 1 Stocks

Covariance Matrix T-bills Bonds Stocks Exp Ret


T-Bills 0.0018 0.0027 0.0008 Std Dev
Bonds 0.0027 0.0102 0.0048
Stocks 0.0008 0.0048 0.0433

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:

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


8% target1 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
Portfolio Weights 2. Click Excel Options from the drop down menu
-24.31% 3. Choose Add-Ins on the left panel menu
44.09% change1 4. Highlight the Solver Add-In and Click Go
5. In the pop-up menu, select solver add-in and cick OK
80.22%
6. Solver will be available in the DATA tab in the analysis subtab.
100.00%
8.00% portret1 Application of Solver
18.02% portsd1
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)
Portfolio Weights 'changing cells' = values to be changed = Bonds and Stocks (change1)
-56.96% 'constraints' = Exp Return must equal Target Expected Return (target1)
30.67%
Note: Restriction on full investment can be accomplished by setting T-Bills
48.49%
equal to 1-Bonds+Stocks
77.80%
Answer: The optimum weights imply the following: buy Bonds and Stocks and
7.00% short sell T-Bills in the corresponding proportions under the portfolio weights.
13.94% 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 Exp Ret Std Portfolio Weights


T-Bills 0.60% 4.30%
Bonds 2.10% 10.10%
Stocks 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 VCV Inverse


T-Bills 0.0018 0.0027 0.0008
Bonds 0.0027 0.0102 0.0048
Stocks 0.0008 0.0048 0.0433

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

u-VEC l m
A 4.026
1 1.26 686.51 B 0.201
1 0.80 -93.46 C 613.825
1 1.97 20.77 D 107.385

Generating Frontier Portfolios, using G+H

Target Expected Return 7.00%

Weights
T-Bills -5.78%
Bonds 36.02% Exp Return
Stocks 69.76% Std Dev
Solution to Reproduce Figure 4 from our in-cla

tfolio Weights Idea: Producing an efficient frontier with no c


T-Bills 33.3% This can be achieved through the use of alge
Bonds 33.3%
e=vector of expected returns (C5:C7)
Stocks 33.3% w=vector of weights (I5:I7)
u=unit vector (A24:A26)
V=Variance-Covariance Matrix (C15:E17)
Exp Ret 3.90% V-1=Inverse of the VCV Matrix =MINVERSE(V)
Variance 0.008 MINVERSE, a 3x3 matrix must be highlighted
employed.
Std Dev 8.94%
A=uTl
VCV Inverse B=eTl
926.0132 -250.11779227 10.6179 C=uTm
-250.1178 170.9923529 -14.33416 D=BC-A2
10.6179 -14.334158432 24.48752 Where: l=V-1e & m= V-1u

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 h g+h
T=Target Return
1.24 -18.54 -17.30
Desired Weights = linear combination of g an
-0.21 8.08 7.87
-0.03 10.46 10.43 Solution: The values in the Desired Weights v

Exp Ret 0.00% 100.00% 100.00%


Std Dev 4.33% 239.08% 237.55%

7.00%
15.70%
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 Covariance Matrix T-bills
T-Bills 0.60% 4.30% T-Bills 0.0018
Bonds 2.10% 10.10% Bonds 0.0027
Stocks 9.00% 20.80% Stocks 0.0008

Target Exp Ret 0% 1% 2% 3% 4% 5%


T-Bills 124.00% 105.46% 86.92% 68.38% 49.84% 31.30%
Bonds -20.52% -12.45% -4.37% 3.71% 11.78% 19.86%
Stocks -3.48% 6.99% 17.45% 27.91% 38.37% 48.83%

Exp Ret 0.00% 1.00% 2.00% 3.00% 4.00% 5.00%


Std Dev 4.33% 4.12% 5.16% 6.91% 8.96% 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%

6%
Expected Return

4%

2%

0%
0% 5% 1

R
Bonds Stocks
0.0027 0.0008
0.0102 0.0048
0.0048 0.0433

6% 7% 8% 9% 10% 12% 14% 16%


12.76% -5.78% -24.31% -42.85% -61.39% -98.47% -135.55% -172.63%
27.94% 36.02% 44.09% 52.17% 60.25% 76.40% 92.56% 108.71%
59.30% 69.76% 80.22% 90.68% 101.15% 122.07% 143.00% 163.92%

6.00% 7.00% 8.00% 9.00% 10.00% 12.00% 14.00% 16.00%


13.40% 15.70% 18.02% 20.35% 22.70% 27.42% 32.16% 36.91%

0.133994 0.156957 0.180166 0.203537 0.227021 0.274207 0.32158 0.369068


0.06 Efficient Frontier
0.07 0.08 0.09 0.1 0.12 0.14 0.16

% 10% 15% 20% 25%

Risk (Standard Deviation)


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

18.00% 20.00% 22.00%


41.66% 46.42% 51.19%

0.416631 0.464246 0.511898


0.18 0.2 0.22

Efficient Frontier

25%

Вам также может понравиться