December 8, 2021

# Binance | Building a portfolio according to Markowitz

Recently I was thinking about such a thing as how you can solve the problem with a plus or minus scientific method - “I don’t know where to invest your pennies in the crypt "

And then I decided to turn to a common method, for which the Nobel Prize was even awarded, namely, portfolio analyst according to Markowitz.

This is what Harry Markowitz looks like.

#### Why she?

After all, my smart reader will say that Markowitz is not without flaws, in cryptocurrencies Markowitz is just right, because he does not take into account dividends and other things.

From the tools, we will consider data from the Binance / Zerion exchange and use the most common Google Sheets (a copy of the ladies, but a stone ...)

First, let's go to Zerion and see their Blue Chips in the crypt, why do they have them?

They are somehow different from what they write everywhere, this gives at least some kind of variety, but we will not take everything from there, but only these coins.

BTC / USD

ETH / USD

UNI / USD

COMP / USD

YFI / USD

CRV / USD

BAL / USD

For example, we did not take 1INCH, although the project is good, but it has been traded for less than a year.

Next, we will download the data on these coins for the year, namely the monthly closing prices, you will already have everything in a copy of the table (but there will be no stone).

After that, we will carry out various manipulations with the numbers.

#### Let's find the profitability for each cryptocurrency

a scary sign comes out altogether

The formula for calculating income by months is quite simple, we take the logarithm of the current and the previous month.

And the expected return is calculated by the averagemeaning, if you took any other list, then you may well get a negative profitability, according to Markowitz, such should be discarded - there is a small minus in this, because the currency can show plus again.

Then we calculate the risks for each cryptocurrency, this is calculated using the standard deviation formula. It's great that the same UNISWAP has a 98% risk per year.

#### Now let's find the covariance

here nothing is clear at all

The covariance matrix shows us the dependenceone asset from another, some trading strategies are based on covariance, when covariance pairs are found and trade them, knowing that one affects the other.

#### And then we calculate the total profit and risk

Here it is already a little clearer, what a profit!

Great, now you and I have a sign that you can twirl and twist by adjusting the required proportions of cryptocurrencies in order to vary risks and rewards.

I'll tell you a secret that you can stuff it all intomore convenient Excel, set up data validation and start searching for solutions, in order not to sort out your hands, but to have a more automatic solution, but I'll leave that to you for your homework.

And here is the link to the plate!