In this article, we’re going to learn how to calculate portfolio risk for a 2 asset portfolio.
Portfolio risk (for a 2 asset portfolio) can be calculated as…
Where reflects the portfolio weight invested in a given asset. In English, the proportion invested in a particular security (e.g., Amazon Inc.).
reflects the variance of a given asset.
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 which proxies the relationship between 2 securities. It’s the most important variable in the equation 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:
Finally, recall the case with portfolio returns…
We said that this portfolio returns can be calculated by…
For a 2 asset portfolio then, we have…
Exploring Portfolio Risk
If we now think about portfolio risk, similar to 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…
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 the 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. 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 equation like…
Remember that for a 2 asset portfolio, the return on the portfolio is equal to…
This Article features a concept that is covered extensively in our course on Investment Analysis & Portfolio Management (with Excel®).
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 this course now.
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)
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 risk 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!).
Setting up to solve
We know that the portfolio risk is calculated by this formula right here…
We want to get to the standard deviation. 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%.
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.
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.
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
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:
- 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. That’s go ahead now and solve this together to solve this.
Setting up to solve
We want to start by calculating the individual weights.
Recall from when we explored portfolio returns, that we do that by taking the dollar 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 did we get that?
Well, the amount invested in Netflix is $354.67 multiplied by by 20 (or $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 in Spotify is 0.33, or 33%
Now that we have our individual weights, we have all the data that we need.
Solving the question
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 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.
In summary, we 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 we literally saw this when we opened up our 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 .
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!
On another note though, if you struggle / struggled with the math in this article, definitely check our our Financial Math Primer course which will help you get up to speed!
Do you want to leverage the power of Excel® and learn how to rigorously analyse investments and manage portfolios?