# Diversification: How Does It Work?

You have some money saved in your piggy bank and you’re thinking about investing it. Chances are that you’ve heard about diversification or the famous saying “Don’t keep all your eggs in one basket!” So, what is it really about and how is it helping you with growing your accumulated wealth?

Diversification is a key concept of most long-term investment strategies. Simply put, it’s a way of managing risk by spreading out your investments among a variety of companies or asset classes. So instead of investing in only one company, where all your savings depend on the success of that particular company, you might seek to invest in many companies in order to reduce the overall investment risk. Makes sense, right?

In this post, we dig a little bit deeper to see how this actually works and explore the math behind it all. We promise to keep it simple!

Let’s assume you have a two-asset portfolio and you want to decompose how much every asset is contributing to the overall portfolio risk and return.

Calculating how much return the various investments contribute to the portfolio return is actually quite straightforward. Simply put, it’s the weighted average of the returns of each individual investment:

R_P = w_A * R_A + w_B * R_B

Calculating an investment’s contribution of risk to a portfolio is a little bit more complicated, so let’s break it down. We define the risk in terms of the standard deviation of the returns, which is a measure that tells us how much the individual returns tend to differ (in either direction) from the average. Using our example of the two-asset portfolio, the formula looks like this:

s_P² = w_A² * s_A² + w_B² * w_B² + **2 * w_A * w_B * s_A * s_B * r_AB**

When looking at the formula, the first two components in the equation represent the contribution of the risk of assets A and B to the portfolio P. But what about the third component? Where did that come from?

This part of the equation defines the combined risk of assets A and B and the term **r_AB** plays a big role here! Basically it’s an assessment of the relationship between the assets A and B and their dependency, and it’s measured as a number between +1 and -1.

## Understanding The Math Of Diversification

By analyzing the formula for risk, it becomes clear how important r_AB is. By focusing on this term, the risk can be significantly reduced based on its value.

- If the correlation between A and B is 1, then the overall risk is not reduced at all.
- If the correlation between A and B is 0, the whole third component of the equation will be erased and the risk of the portfolio will simply be the combination of the first two components; an improvement!
- If the correlation is negative, then the whole third component becomes negative and we can actually subtract the third component from the first two. Jackpot!

## Understanding From A Practical Perspective

Let’s take a simple portfolio which invests 50% of the portfolio’s value in the SPDR S&P 500 ETF and the other 50% in the Vanguard Total Bond Market ETF. We will compare this with a portfolio invested 100% in the SPDR S&P 500 ETF, which we will treat as a performance benchmark.

Now let’s run this through our backtesting tool at QuantSketch from December 2007 to December 2017 with quarterly rebalancing. This strategy will simply rebalance the 50/50 asset weights at the start of every quarter (i.e., January, April, July, and October). The performance of the strategy looks like this:

This looks pretty nice, but we’re talking about risk reduction. So how can we quantify it? Well, the statistics shown in the table below help clarify this point:

You’ll notice that the volatility (i.e., standard deviation or risk) of the returns that we have for the two-asset portfolio strategy is about 10% for the portfolio, which is much lower than the 21% produced by a pure investment in the SPDR S&P500 ETF (SPY). As we learned, this comes from two parts. First, the Vanguard Total Bond Market ETF (BND) contributes to the risk reduction since it has a much lower volatility. Second, the correlation between the daily returns of SPY and BND over this backtest period is negative: r_SPY,BND = -0.16.

At QuantSketch, we love charts! They’re the best! So let’s look at some of the other charts you’ll see on our platform.

The chart below illustrates the yearly returns of our two-asset portfolio strategy, which gives you an overview of the return achieved each year during the backtest period:

We also define a drawdown underwater plot. This shows you the cumulative drawdowns that both the two-asset portfolio strategy and the becnhmark (SPY) achieved over the period. It’s a very powerful illustration to understand the risk of your strategy.

As you can see, diversifying really helps reducing the risk of your porfolio, but at the same time you sacrifice some upside potential when using it. Therefore, every investor needs to find the right balance that fits their own personal risk profile while achieving their desired returns.

Now for a quick sneak preview of our platform at QuantSketch:

We’re QuantSketch! We make it easy to quickly build, test, analyze, and monitor your trading strategies without writing a single line of code. Cool, huh? :)