In this article, we’re going to learn how to calculate portfolio risk for a 2 asset portfolio.

**TL;DR**

Portfolio risk (for a 2 asset portfolio) can be calculated as…

Where reflects the portfolio weight invested in a given asset. In English, it represents the proportion invested in a particular security (e.g., Amazon Inc.).

reflects the variance of a given asset. By taking its square root, we end up with the standard deviation which is the generally accepted measure for the risk of a stock.

The subscripts 1 and 2 reflect “asset 1” and “asset 2”; or “asset a” and “asset b” if you will.

Lastly, reflects the covariance – a measure that proxies the relationship between 2 securities. It’s the most important variable in the formula for portfolio risk above.

If the equation above is freaking you out, or if you don’t quite understand *why* it works, and *how *it works, then keep reading. But maybe grab a cup of tea first. It’s a pretty extensive article.

## Recap / Fundamentals

### Individual Total Risk

Just a quick recap though, recall that we set a generally accepted measure of total risk is the standard deviation.

And it’s given by this formula right here, the standard deviation; which is nothing but the square root of the variance:

### Stock / Security Relationships

Further recall that we said the relationship between any two securities can be measured by the covariance, which is calculated as:

### Portfolio Return

Finally, recall that we can calculate portfolio returns as…

For a 2 asset portfolio the formula for portfolio returns is…

## Exploring Portfolio Risk

If we now think about portfolio risk, similar to the approach for calculating portfolio returns, calculating the portfolio risk is *not* just a simple case of adding individual standard deviations / individual risks.

Before we get into what it is and isn’t though, it’s important to note that portfolio risk is a proxy for *total risk* – not just systematic risk (market risk), or just unsystematic risk (firm-specific risk) for instance.

Put differently, we’re thinking of portfolio risk in terms of total volatility. More on that later on. For now, let’s be clear on what it isn’t.

### It’s NOT the Sum of Risks

The standard deviation of a portfolio of is NOT equal to the sum of individual risks…

### The 3 Factors of Portfolio Risk

And that is because when you invest in two or more assets, your total portfolio risk is a function of the:

- risk (or volatility) of each individual asset,
- weight or proportion invested in each individual asset, and most importantly,
- relationship between assets

To learn how to calculate portfolio risk, it’s crucial – critical, even – to understand each and every one of these 3 different factors.

Now the beauty of the formula for portfolio risk is that we can actually see how these three factors come into play.

And we can literally see precisely how these three factors affect the portfolio risk.

Let’s start with what we know. We know that the variance represents a measure of risk. Sure, *strictly speaking, *it’s the standard deviation (volatility) we’re after; but you need the variance in order to get to the standard deviation.

And so it’s not absurd to think of the variance as a measure / proxy for risk.

Thus, the risk of an individual stock can then be seen as…

Given that we can calculate the risk of individual stocks using the variance or the standard deviation, we should be able to do the same thing to calculate portfolio risk as well.

Thus we should be able to represent portfolio risk by writing out the equation for the portfolio variance as…

This equation is identical to the one that precedes it. The only difference is that rather than looking at an individual asset , we’re looking at a portfolio .

Now, let’s go ahead and open up this equation…

And just for simplicity, let’s ignore the part, and the sigma summation operator.

In other words, just for simplicity, let’s write the formula for portfolio risk like this…

Remember that for a 2 asset portfolio, the return on the portfolio is equal to…

### Related Course: Investment Analysis & Portfolio Management (with Excel®)

**This Article features a concept that is covered extensively in our Investment Analysis & Portfolio Management (with Excel®) Course.**

**If you’re interested in learning how to quantify risk for stocks and portfolios, working with real-world data, then you should definitely check out the course.**

Thus, expanding the simplified expression for the portfolio variance becomes…

Now, if you think back to your algebra class, then you’ll know that…

Using the *same logic* as that used to expand we have…

**Struggling with the math? ***We have the course for you, to help you get past your fear of equations, explore our Financial Math Primer course here. *

Notice, for example, in the first part of the equation above (in ), we can see that is nothing but the variance of asset 1!

The same holds true for the 2nd part of the equation. Notice that is nothing but the variance of asset 2.

And finally, notice that in the final part of the equation, is nothing but the covariance between assets 1 and 2.

### Portfolio Risk (Variance) Formula

Thus, the monstrosity of an equation above simplifies to…

From this equation now, it is perhaps as clear as night and day, that the risk of a portfolio is a function of three things…

- The risk of the individual assets (here, and ),
- The weights or proportions invested in each individual asset ( and )
- And finally, most importantly, the
*relationships between securities*(here, measured by the covariance, .

Just in case you missed identifying the variances and covariances from the equation above, here’s a more visual look…

Importantly, we’ve talked about how the variance can be a very small number. A better measure for the risk of a stock is the standard deviation.

But of course, once you have the variance, getting the standard deviation is pretty trivial.

Because the standard deviation is nothing but the square root of the variance!

Thus, the risk of a 2 asset portfolio is simply…

We can also refer to this as “sigma p”, or the portfolio standard deviation.

And that’s pretty much it. Let’s go ahead now and explore how to calculate portfolio risk with an example.

## How to Calculate Portfolio Risk – Example #1

Imagine that you hold a portfolio of two stocks and you have the following information.

You know that the:

- proportion invested in Apple is 60%,
- proportion invested in Coca-Cola is 40%

Assume that you also have the individual standard deviations of the two stocks: 14.39% for Apple Inc., and 9.53% for Coca Cola.

Finally, assume that the covariance between the two stocks is 0.00054235

Given all of this information, what is the risk of your investment portfolio?

## Want to go beyond portfolio risk?

### Get the Investment Analysis & Portfolio Management (with Excel®) Study Pack (for FREE!).

### Solving for Portfolio Risk (Walkthrough)

We know that the formula for portfolio risk is…

In order to calculate portfolio risk, we want to get to the standard deviation of the portfolio.

And to get to the standard deviation, we need the variance, which is calculated as…

Substituting the subscripts with tickers for the 2 stocks, we have…

Plugging in our numbers into the equation, we have…

Solve for that, and you’ll find that the variance is equal to 0.009168058. This number is of course pretty meaningless as far as interpretations go.

But if we now take the square root of this figure, if we take the square root of the variance, then we’ll get the standard deviation, which in our case is equal to 9.58%.

At 9.58%, we have a much more interpretable measure for the risk of the portfolio.

We can easily compare this number to the return on a portfolio, or with the risk of a *different *portfolio.

### Risk reduction

Now, number-crunching aside, what’s interesting is that we’ve reduced our overall portfolio risk!

If you were to invest only in Apple, then the risk would be 14.39% since that’s the standard deviation we gave you.

If on the other hand, you were to invest only in Coca-Cola, your risk is lower at 9.53%, but of course, it’s pretty foolish to invest in just one stock.

Diversification is good (read, crucial) because it helps you increase your returns while decreasing your risk. Or equally, diversification helps you increase your return without necessarily increasing your risk significantly.

**RELATED: Investing Fundamentals – Price, Risk, and Return**

In this particular example, the portfolio risk was not lower than the individual risks, but indeed, because of the effects of diversification, you can have situations where the portfolio risk is lower than the individual asset risks.

In fact, as we’ve said in our sister article, we can use diversification as a hedging strategy.

Does that make sense?

If any part of this example is not clear, please re-read it before, moving on any further.

We’re going to assume that you’re more or less alright. So let’s go ahead now and look at another example.

## How to Calculate Portfolio Risk – Example #2

It’s the same scenario as before – you’ve got two stocks, except this time you’re investing in Netflix and Spotify.

And rather than giving you the weights, you have information about the number of shares bought (20 in each), and the purchase price ($354.67 for Netflix, and $174.45 for Spotify).

You also have details of the individual standard deviations of stocks:

- 24.39% for Netflix (NFLX), and
- 31.94% for Spotify (SPOT)

Finally, assume that you also know the covariance between the two stocks and that it’s equal to 0.01792.

Given all of this information, what is your total portfolio risk?

It’s a good idea to pause for a bit and try solving it on your own.

We’re just going to give you a small hint though…

**A common mistake that a lot of people make is to assume that the weights are based purely on the number of shares bought.**

In this example, for instance, you bought 20 shares of Netflix and 20 shares of Spotify, but please don’t assume that the weights are equal.

Remember, you haven’t invested exactly the same amount in each stock even though you own the same number of shares in each stock.

All right, with that hint in mind, try solving this on your own!

We’re going to assume that you did that.

Let’s go ahead now and solve this together.

### Setting Up to Solve for Portfolio Risk

To solve for portfolio risk, we want to start by calculating the individual weights.

Recall from when we learned how to calculate portfolio returns, we calculate individual weights by taking the dollar amount invested in a given security and dividing it by the total amount invested in all assets.

#### Calculating the Weights

So to get the weight of Netflix, we want to take the amount invested in Netflix and divide that by the total amount invested.

How do we get that?

Well, the amount invested in Netflix is $354.67 multiplied by 20 (which is equal to $7,093.4).

That is, the price per share multiplied by the number of shares bought gives us the total amount invested.

And we divide that by the total investment, which is going to be the amount invested in Netflix, plus the amount invested in Spotify.

And of course, the amount invested in Spotify is the price of Spotify times the number of shares bought. In this case, $174.45 multiplied by 20 which is equal to $3,489

The total investment is therefore $7,093.4 + $3,489 which is equal to $10,582.4

Using these figures, we can estimate the weight of Netflix as…

Plugging in the figures from above, we have…

Thus, the portfolio weight of Netflix is approximately equal to 0.67, which is 67%.

So we’ve invested 67%, our money in Netflix. And given that we’re dealing with a two-asset portfolio, this means that we’ve invested 33% of our money in Spotify.

In other words, the portfolio weight in Spotify is 0.33, or 33%

Now that we have our individual weights, we have all the data that we need.

### Solving for the Risk of the Portfolio

We can go ahead and calculate the variance of the portfolio, which is going to be…

Plugging in our numbers, we have…

Solve for that, and you will find that the portfolio variance is equal to 0.04573761417.

To get the total portfolio risk, we need to take the square root of the variance. Do that, and you’ll find that the portfolio standard deviation / portfolio risk is equal to 21.39%.

Interestingly, in this case, notice that the total risk of 21.39% is *lower than the risk of the individual stocks* that make up the portfolio!

The risk of Netflix is 24.39%. The risk of Spotify is 31.94%.

But by investing in both of them, we’re able to decrease our total risk to 21.39%.

And that right there is the power of diversification!

All right, hopefully, all of this makes sense.

## Wrapping Up

In summary, you learned that the portfolio risk is a function of:

- individual asset risks (measured by the standard deviation),
- the amount invested in each asset (which we measure by the weights or “omega”), and
- most importantly, it’s a function of the
*relationship between assets*, which we measure by the covariance.

And you literally saw this when we opened up the equation for the portfolio standard deviation because we ended up with this thing right here…

Hopefully, all of this makes sense, and you now know how to calculate portfolio risk.

If any part of the article isn’t quite clear, please read it again.

This is a particularly important concept within the realm of investment analysis and portfolio management and Modern Portfolio Theory (MPT).

One last thing though – note that in this article, we’ve only focused on the risky asset case.

The examples of Apple, Coca-cola, Netflix, and Spotify for instance, are all stocks / risky assets. So we haven’t considered the case with a *risk free asset *such as treasuries / Government bonds.

That’s for another time. Can you think about what happens to a portfolio of risky assets if a risk-free asset is introduced to it? We’ll leave you with that thought!

By the way, now that you know how to calculate portfolio risk, you might also want to make sure you know the other side of the coin. Check out our sister article on How to Calculate Portfolio Returns.

On another note, if you struggle/struggled with the math in this article, definitely check out our Financial Math Primer course which will help you get up to speed.

Alternatively, if your math is about alright, and you want to level up your investment analysis skills, check out the course below.

### Related Course

**Do you want to leverage the power of Excel® and learn how to rigorously analyse investments and manage portfolios?**

## Leave a Reply

You must be logged in to post a comment.