Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
EfficientFrontier Excel

EfficientFrontier Excel

Ratings: (0)|Views: 2|Likes:
Published by Nikhil Gupta

More info:

Published by: Nikhil Gupta on Jun 19, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





Creating efficient frontiers using excel.
Suppose we have 3 risky assets whose net return has the mean vector and variance-covariance matrix given below:Asset Mean Variance-CovarianceMatrixWeights OnesMeanPortfolioReturnPortfolioVariancePortfolioSTDPortfolioConstraint
1 0.06 1 0.3 0.3 0.07937210.1766661222.42961 1.55872112 0.12 0.3 1 0.3 1.6031661
3 0.03 0.3 0.3 1 -0.682541
 To model the portfolio choice problem, I begin by highlighting the mean vector andgiving it a name. To do this, left-click on cell c9 and drag down until cell c11 and thenrelease. Then go to the name-box, which is the white box in the upper right just abovethe "A" column. Click in the name-box, hit backspace, and then type a name for cells c9- c11. Then hit return. I used the name "mu" for the vector of mean returns as illustratedbelow:Then, I follow a similar approach with the variance-covariance matrix by clicking on cellF9 and then dragging across and down to cell H11. After the variance covariance matrixis highlighted, I go to the name box and give the variance covariance matrix the name"vcov" (Note: I don’t use quotes in the names).The efficient frontier consists of portfolios that only invest in the risky assets. Therefore,I introduce a vector that represents the portfolio weights in each asset. For now, I will
assign the weights arbitrarily. Below, I will use excel to choose the weights optimally.For now, I have placed the weights in cells J9 through J11 and given them the nameweights. Also, for convenience, I have created a column of ones and given it the nameones.To illustrate why the names are convenient, note that for given portfolio weights, themean return on the risky asset portfolio is equal to the transpose of the weights vectormultiplied by the mean vector. Using excel's matrix formula's, the transpose of theweights vector is given by "transpose(weights)", and to multiply "transpose(weights)" bythe mean vector "mu" simply requires using the excel function mmult, which stands formatrix multiplication. The resulting mean return for the portfolio is given bymmult(transpose(weights),ones). In this expression, excel multiplies the transpose of weights by the vector of ones, producing the mean return on the portfolio.To program the mean return and store it in a cell, one uses the excel format for matrixformulas. For example, to store the mean return for the given weight vector in cell N9,click on cell N9, and then type "= mmult(transpose(weights),mu)" and then hit CTRLSHIFT ENTER. The quantity in the cell will be equal to the mean return and will changewhen the weights change or when the elements of the mean return vector change.To program the variance of the portfolio return, I use the fact that the variance of theportfolio return is the transpose of the weights vector multiplied by variance covariancematrix multiplied by the weights vector. To program this, first I multiply the transpose of of weights vector times the variance-covariance matrix. This produces the expressionmmult(transpose(weights),vcov). Then, I have to multiply this expression by weights.Therefore, the final answer for portfolio variance ismmult(mmult(transpose(weights),vcov),weights). I have typed this expression into cellO9 using the same approach that I used for typing the mean return. Clicking on the cellwill highlight the formula at the top of the excel spreadsheet. By changing the weights orchanging the elements of the variance covariance matrix, the portfolio variance willchange. The standard deviation of the portfolio return is just the square-root of thevariance, and is given in cell P9. To compute portfolio std, I named portfolio varianceportvar. The formula for portfolio std (standard deviation) is just portvar^.5. It is enteredin cell P9 with an equal sign before the formula. Then you hit return to enter the formula.We are almost ready to start to use excel to compute the efficient frontier for this set of 3assets. To compute the efficient frontier, we need to constrain the portfolio weights sothat that they sum to 1. This is equivalent to imposing the condition thatmmult(transpose(ones),weights) sums to 1. We will impose this constraint when choosingportfolio weights. To do so, I have assigned the constraint to cell N17 by typing theformula mmult(transpose(ones),weights) into the cell. When I use the constrainedmaximization program, I will set the cell equal to 1, which will constrain the weights thatI can choose. I have chosen to name the constraint "constraint".
The last item to note before beginning to use solver is that it is useful to store the resultsof maximization problems in a convenient form for further analysis. Towards this end, inrow 79 I have stored the weights vector along with mean portfolio return and portfoliostd. To illustrate how this was done, I highlighted cells b79-d79 and then in the formulabar typed =transpose(weights) and hit CTRL SHIFT ENTER. This puts the transpose of the weights in a 1 by 3 row vector. Then, in cells e79, f79, and g79, I simply repeated thenames portmean,, portvar, and portstd. This produces the same values at these cells thatwere computed earlier.
weights mean variance std0.0793721.603166-0.68254 0.1766662.429611.558721
USING SOLVER TO FIND PORTFOLIO WEIGHTSThe textbook provides the answer to solving for the efficient frontier when there are 2risky assets. When there are more than two risky assets, there are more complicatedmatrix formulas for solving for the efficient frontier. If there are complicated constraints,there may not be a formula for the efficient frontier. In this course, I will emphasizeusing a maximization program to solve for the efficient frontier. More specifically, wewill use the excel program SOLVER to find the points on the efficient frontier.SOLVER is an excel add-in package. To find solver, click on tools on the menu bar. If you see solver in the menu, then it is installed and ready to be used. If you don't findsolver, then click on tools, Add-Ins, then check Solver, and click OK. This should giveyou the capability to use solver.To illustrate how to use to find points on the efficient frontier, recall that the lowest pointon the efficient frontier is the point that minimizes standard deviation of the portfolioreturn. To solve for the mean and std of return of the minimum std portfolio, and to solvefor the weights in the portfolio, click on cell h79 (with the std on top) and then click ontools, solver. The result should give you a window that appears as follows:

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->