Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

PORTFOLIO OPTIMISATION WITH SOLVER

First thing I did is access Yahoo Finance page and looked up couple of companies that could be
basis for this assignment. For my 5 stock I choose Ferrari (Race), Chipotle Mexican Grill (CMG),
Amazon (AMZN) and Estée Lauder Companies Inc. (EL). There is no specific reason for choosing
them I just like the companies. Ferrari is a company that does production, engineering and design of
luxury cars, Chipotle is in the classical food industry, Amazon does online retail and shopping
services, while Estée Lauder is company that manufactures skincare products, makeup, fragrances
and hair care products. They belong to different industries and the only thing in common is that they
are one of the best in that industry.

I chose my 5 companies and the next thing was to access the data about those companies given on
that page. I downloaded data regarding last 5 years that shows stock prices of that company, I
filtered and searched for data on monthly basis and used opening and closing prices regarding those
months.
After placing all data in one document first assignment was to calculate monthly returns of each
company in each month. I calculated that by subtracting opening price from closing price and
dividing that all by opening price in that month.
After applying this process to all months and stocks, next thing is calculation of logarithmic
function ln of all returns incase that some returns are negative. Calculation is easy, just subtract
previously calculated monthly return from one(1), and calculate that using logarithmic formula.
This is also done to all monthly and for all chosen stocks.
RACE

DATE OPEN CLOSE MONTHLY Ln(1+MONTHL


RETURN Y RETURN)

2018-12-01 111.81 99.44 -0.11 -0.11

After finishing this table and getting all needed information about returns, we will create different
table in order to calculate means, standard deviations, correlations, variance and sigma.
First comes mean month which is as the name says, average return on monthly basis. So we will
calculate monthly return for all companies and show it in the table.

Next on is standard deviation month which is calculated standard deviation on monthly basis, and
same as the previous step we calculate it for all companies.

Next is mean year which represents average returns on an annual basis. We calculate mean year by
multiplication of mean month with the number 12, which is the amount of months in one year, the
same we will do with calculation for standard deviation year. Standard deviation year will present
what is standard deviation on an annual basis.
Then we come to calculate weights that represents how much of ones companies stock is
represented in our portfolio. These numbers are chosen at random and the only constraint is that the
total amount of these weights has to be 1 (100%). After choosing weights number we will calculate
weights*standard deviation on annual basis. Next calculated is correlation. We calculate correlation
by formula for correlation where we put different shares in ratio.

So for example we will see how much strong correlation of stock of Races and CMG is, we will
calculate it for all stock ( RACE-RACE, RACE-CMG, RACE-AMZN, RACE- EL, CMG-CMG,
CMG-AMZN, CMG-EL,AMZN-AMZN, AMZN-EL,EL-EL). When looking at results all stock
correlated with themselves will have correlation of 1, and correlation of two different stock will be
the same. .

RACE CMG AMZN EL

RACE 1 0.52 0.57 0.41

CMG 0.52 1 0.67 0.53

AMZN 0.57 0.67 1 0.28

EL 0.41 0.53 80.26 1

We can also calculate this using Data analysis tool for correlation and we will get the same results
shown here, but since I do not have this option I calculated correlation using the first way.
Last steps are calculating port mean, port variance and port sigma. Port mean represents expected
return of our portfolio and we will calculate it using SUMPRODUCT function and using weights
and mean year as our factors.

In calculating port variance that is variance of portfolio we are gonna use formula for MMULT, We
are gonna put factors such as weights*standard deviation, our correlation table as MMULT function
and again weights*standard deviation in transpose function. For os that is gonna look like
=MMULT(V9:Y9;MMULT(V10:Y13;TRANSPOSE(V9:Y9))). (Again did not have this function
on Mac so it was calculated on another device and result is written on this one). Last stop of
calculation is port sigma or standard deviation of this portfolio and calculation is simple with just
use of function for standard deviation for our previously calculated variance.

Table before solver


Next comes use of simulator.
First we are gonna use our portfolio variance as objective which can be found in V15, and after that
are are choosing changing variable cells which is our weights of the stocks. V8-W8-X8-Y9(V8:Y8).

Objectives

Next is putting constraints and they are that sum of all weights has to be equal 1, and that our
calculated portfolio mean has to be greater of equal than 14.

Constraint 1 Constraint 2

After we finished with setting up the first part of the simulator we are gonna go on the options in the
solver and adjust some factors like maximum time in seconds, or of iterations.

After we put all needed date in the solver, checked them we are gonna press button Solve given at
the end of solver, and if everything was correct we will get new table with adjusted results. That
table is gonna look similar as the first one, but with new results.
Table after solver

So what we can conclude from this calculation is that this new optimal portfolio would achieve
expected return on 14% with annual standard deviation of 0.2367 when we would invest in :
Stock RACE 62.10% of our capital;
Stock CMG 8.607% our our capital;
Stock AMZN 8.652% of our capital; and
And stock EL 20.630% of our capital.

You might also like