Professional Documents
Culture Documents
Markowitz Instruction 2021
Markowitz Instruction 2021
0. Contents
1
2. Data preparation: Expected Excess Returns and Covariance matrix
a. Load the Solver Add-in and open a new excel file.
b. In the first sheet of your excel file, copy and paste the monthly price series of
five stocks and 1month LIBOR (1m LIBOR is already in rate). 61 months. Name
the sheet [monthly_data].
c. In the second sheet, calculate the monthly returns as in the example file.
Name the sheet [returns].
d. In the third sheet, calculate the monthly excess returns as in the example file.
Name the sheet [excess returns].
e. Open a fourth sheet; name it [efficient frontier]. Give Expected excess
returns. In this example I randomly give them.
f. Use Covariance function to calculate the covariance matrix. Data > Data
analysis > Covariance. (If you don’t see Data Analysis, please load it.)
2
Input Range: ‘excess returns’!$B$1:$F$61
The function only provides the lower triangle of the matrix. Fill in the upper
triangle. Covariance matrix is a “symmetric” matrix, i.e., elements in the 1st
row = elements in the 1st column, 2nd row = 2nd column,… etc.
3
g. As the Excel’s Covariance function does not adjust for degree of freedom, you
need to do it by yourself. Multiply all the elements of the Covariance Matrix
by 60/59. (Note: 60 is number of returns you have in your data (61 months of
price. Hence degree of freedom = 60 -1 = 59. In general, N/N-1 must be
mutiplied, where N is number of returns.)
Give equal weights of 0.2 to each stock (does not have to be equal weight;
they are used as initial values of optimization procedure).
4
3. Mean (Risk premium) of portfolio with given weights, Cell A26.
Formula in cell A26: =SUMPRODUCT($A$20:$A$24,$B$2:$B$6)
4. Standard deviation (Risk) of portfolio with given weights, Cell A27.
Formula in A27: =SUM(C25:G25)^0.5
5. Slope (Sharpe ratio) of portfolio with given weights, Cell A28. Formula
in cell A28: =A26/A27
h. Copy and paste the block [6. Solver parameters] from the example spread
sheet to your spread sheet. You will use these to give restrictions and
objective function to Excel Solver function in the next step.
5
3. Find the Optimal Portfolio
a. Find the optimum portfolio that maximizes the slope (Sharpe ratio) of CAL.
Data > Solver
Click Load/Save button. (screen shot below is the one already with the loaded
setup. Should be empty or show previously used setup).
Load setting for [c. Find Optimal Portfolio] from the block [6. Solver
parameters].
6
You should see the below setting:
It maximizes the number in cell A25, i.e. slope of the portfolio, by changing
the weights, subject to the constraints of 1. sum of the weights equals to one;
2.each weight should not be smaller than 0.05 (this constraint is not
necessary but will use for our coursework). Click Solve.
Click OK.
7
You will see the results in the Block 3.
8
4. Efficient Frontier and Optimal CAL
a. Find the Global Minimum Variance Portfolio, G. Open Solver and load
optimization setting to find global minimum variance portfolio. Select the
setup for [a. Find Min Variance Portfolio] in the block [6. Solver Parameters].
9
Save it in the block 4. Efficient Frontier.
Note that the results for Optimum portfolio are saved here as well.
b. Use the expected excess return of the global minimum variance portfolio,
0.0490, as the starting point to draw the efficient frontier. For given expected
excess return, find a portfolio that minimize its variance (standard deviation).
Here the given risk premiums are 0.0502, 0.0513, 0.0524, 0.0535, 0.0547,
0.0558 (optimum), 0.0569, 0.0580.
Give the value of expected excess return in cell L2. Formula in cell L2: =L5
10
Open solver. Load the setting for [b. Efficient frontier].
You should see the below setting: It minimizes the number in cell A27, i.e.
standard deviation of the portfolio, by changing the weights, subject to the
constraints of 1. sum of the weights equals to one; 2.each weight should not
be smaller than 0.05 (constraint for our assignment); 3. Expected excess
return is fixed to the value given in the cell L2.
11
Save the result in Block 4.
Calculate risk premium for optimal CAL. Its slope is the slope of the optimal
portfolio, 1.5424. Give a starting point of standard deviation, 0.0320, in this
case. Then for each standard deviation, calculate the risk premium of optimal
CAL in cells J13:S13. The formula in J13: =$Q$7*J6, …, formula in S13: =
=$Q$7*S6.
12
c. Prepare the inputs needed to draw efficient frontier and optimal CAL from
Block 4.
Select I17:K27, then Insert > Scatter > Scatter with smooth lines and markers
With a bit of editing and formatting, you can draw a plot like the one below.
13