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

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 40%
Bonds 0.63 1.00 0.23 Bonds 50% Change
Stocks 0.09 0.23 1.00 Stock 10%

Covariance Matrix T-bills Bonds Stocks ExpRet 2.19% PortRet


T-Bills 0.0018 0.0027 0.0008 StdDev 7.00% PortSd
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 split, linear algebra operations
can be used to calculate Expected Return on the Portfolio of Assets and the Variance of the Portfolio

Matrix Notation and Excel Formulas

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


2. Portfolio Variance =wTVw =MMULT(TRANSPOSE(w),MMULT(V,w))

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 by employing equation 1.
Cell I:15 - calculates the Standard Deviation of the Portfolio by raising equation 2 to the one-half power.

Note: Both calculations use linear algegra operations. For Expected Return,Cell I:14, the dimensions of
vectors 'e' and 'w' must agree. In our case 'e'='w'=3x1 vector satisfying the agreement of dimesions. The
Expected Return is a scalar value. For our problem we observe Portfolio Return to be the matrix
mutliplication of a 1x3 vector 'wT'and a 3x1 vector 'e'. Dimension Multiplication: (1x3)*(3x1)=(1x1) .For
Standard Deviation,Cell I:15, the dimensions of the matrix 'V' and the vector 'w' must agree. In our case
'V'=3x3 matrix and 'w'=3x1 matrix satisfying the first part of our equation. The result of V*w is a 3x1
vector. Finally, we need the dimensions of w T and V*w to agree. In our case, wT = 1x3 vector and V*w
=3x1 vector. The resulting multiplication wTVw is a 1x1 or scalar, as desired. It is also critical to employ
Control+Shift+Enter when evaluating functions that use matrices and vectors as imputs.
split, linear algebra operations
he Variance of the Portfolio

quation 1.
uation 2 to the one-half power.

n,Cell I:14, the dimensions of


e agreement of dimesions. The
eturn to be the matrix
cation: (1x3)*(3x1)=(1x1) .For
ctor 'w' must agree. In our case
. The result of V*w is a 3x1
se, wT = 1x3 vector and V*w
ed. It is also critical to employ
tors as imputs.
USING SOLVER TO REPRODUCE UNCONSTRAINED
FRONTIER PORTFOLIOS

Asset Data
T-Bills 0.60% 4.30% Target Exp. Return 8% target1
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 -24.31%
Bonds 0.63 1.00 0.23 Bonds 44.09% change1
Stocks 0.09 0.23 1 Stocks 80.22%
100.00%
Covariance Matrix T-bills Bonds Stocks Exp Ret 8.00% portret1
T-Bills 0.0018 0.0027 0.0008 Std Dev 18.02% portsd1
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 -56.96%
Bonds 0.0027 0.0102 0.0048 0.002 Bonds 30.67%
Stocks 0.0008 0.0048 0.0433 0.004 Stocks 48.49%
RE 0.0013 0.0020 0.004 0.008 RE 77.80%

Exp Ret 7.00%


Std Dev 13.94%
Solution to Reproduce Figure 3 from our in-class handout:

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


the calculations of Expected Return and Standard Deviation. For this
problem, the 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.
USING ALGEBRA TO REPRODUCE UNCONSTRAINED
FRONTIER PORTFOLIOS

Asset Data Exp Ret Std Portfolio Weights


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

Correlation Matrix T-Bills Bonds Stocks


T-Bills 1.00 0.63 0.09 Exp Ret 3.90%
Bonds 0.63 1.00 0.23 Variance 0.008
Stocks 0.09 0.23 1.00 Std Dev 8.94%

Covariance Matrix T-bills Bonds Stocks VCV Inverse


T-Bills 0.0018 0.0027 0.0008 926.0132 -250.1177923
Bonds 0.0027 0.0102 0.0048 -250.118 170.9923529
Stocks 0.0008 0.0048 0.0433 10.6179 -14.33415843

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

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

Exp Ret 0.00%


Std Dev 4.33%

Generating Frontier Portfolios, using G+H

Target Expected Return 7.00%

Weights
T-Bills -5.78%
Bonds 36.02% Exp Return 7.00%
Stocks 69.76% Std Dev 15.70%
Solution to Reproduce Figure 4 from our in-class handout:

Idea: Producing an efficient frontier with no constraints on individual asset


weights. This can be achieved through the use of algebra (linear algebra-
generally).

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) (H15:J17) *Note: When using
MINVERSE, a 3x3 matrix must be highlighted and Control+Shift+Enter must be
employed.

A=uTl
B=eTl
C=uTm
10.6179 D=BC-A2
-14.3342 Where: l=V-1e & m= V-1u
24.48752 g= [Bm - Al]/D -(3x1 vector)
h=[Cl-Am]/D -(3x1 vector)
Note: Portfolio g has an Expected Return of 0% and Portfolio (g+h) has an
Expected Return of 100%. A linear combination of these values will be very
useful.
h g+h T=Target Return

-18.54 -17.30 Desired Weights = linear combination of g and h = g +h*T


8.08 7.87 Solution: The values in the Desired Weights vector correspond to figure 3.
10.46 10.43

100.00% 100.00%
239.08% 237.55%
idual asset
algebra-

When using
+Enter must be

io (g+h) has an
alues will be very

ond to figure 3.
Asset Data Covariance Matrix T-bills Bonds Stocks
T-Bills 0.60% 4.30% T-Bills 0.0018 0.0027 0.0008
Bonds 2.10% 10.10% Bonds 0.0027 0.0102 0.0048
Stocks 9.00% 20.80% Stocks 0.0008 0.0048 0.0433

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


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

Exp Ret 0.00% 1.00% 2.00% 3.00% 4.00% 5.00% 6.00% 7.00%
Std Dev 4.33% 4.12% 5.16% 6.91% 8.96% 11.14% 13.40% 15.70%

0.043301 0.041193 0.051593 0.069066 0.089564 0.111429 0.133994 0.156957


-2.56E-11 0.010001 0.02 0.03 0.04 0.05 0.06 0.07 Efficient Frontier
12%

10%

8%
Expected Return

6%

4%

2%

0%
0% 5% 10% 15%

Risk (Standard Deviation)


8% 9% 10% 12% 14% 16% 18% 20% 22%
-24.31% -42.85% -61.39% -98.47% -135.55% -172.63% -209.71% -246.79% -283.87%
44.09% 52.17% 60.25% 76.40% 92.56% 108.71% 124.86% 141.02% 1.571714
80.22% 90.68% 101.15% 122.07% 143.00% 163.92% 184.85% 205.77% 2.266956

8.00% 9.00% 10.00% 12.00% 14.00% 16.00% 18.00% 20.00% 22.00%


18.02% 20.35% 22.70% 27.42% 32.16% 36.91% 41.66% 46.42% 51.19%

0.180166 0.203537 0.227021 0.274207 0.32158 0.369068 0.416631 0.464246 0.511898


Efficient Frontier
0.08 0.09 0.1 0.12 0.14 0.16 0.18 0.2 0.22

Efficient Frontier

15% 20% 25%

k (Standard Deviation)

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