## Wednesday, August 15, 2012

### Diversity is Safety

Today, I sold about 30% of my shares of CSCO at a 10% gain. The reason why I sold is not because I am happy with the return or I think the price will go down, but rather because I feel that my portfolio is not diverse enough.

As you can see from my previous post, I currently own positions in 6 stocks. About 20% of my portfolio value was in CSCO. Why is this a bad thing? If the stock performs well, my portfolio does proportionally well. The flip-side is that if it performs poorly, my portfolio will also do poorly. That single fact is what concerns me the most.

To illustrate the problem, let's consider a more extreme situation. Suppose I had all of my wealth invested equally in a single stock, which we will call AAA. Now let's say our 1 year prospects for this stock is normally distributed an expected value of 10% gain and a standard deviation of 20%.

We can expect a 10% gain on average. However the law of large numbers only holds true over the course of many samples. In this case, there is 34% that you will lose money this year. In fact, there is a 1% chance that you will lose over half of your money. The risk is simply too high to justify this kind of investment strategy.

 The probability that you will lose money

### Diversifying

However, we can lower this risk by taking a greater number of samples. One way of doing this is by investing in multiple independent stocks with positive expected returns. So now suppose we have two stocks, AAA and BBB, both with expected yearly returns of 10% and a standard deviation of 25%. We'll call these two random variables $$A$$ and $$B$$, and our portfolio return $$P$$.
$P = 0.5A + 0.5B$ We scale $$A$$ and $$B$$ by 0.5 because we are now investing only 50% of our portfolio in each.
$\mu_{0.5A} = 0.5\mu_A = 5 \\ \sigma_{0.5A} = 0.5 \sigma_A = 12.5$ The sum of two independent, normally distributed random variables is also normally distributed with
$\mu = \mu_X + \mu_Y \\ \sigma^2 = \sigma_X^2 + \sigma_Y^2$ So in our case
$\mu_P = 5+5 = 10 \\ \sigma_P = \sqrt{12.5^2 + 12.5^2} \approx 17.7$ As you can see, by simply investing in two independent stocks, we can reduce our standard deviation by 30% while still maintaining the same expected value. Now the probability of losing more than 50% of your portfolio value is less than $$3.5 \times 10^{-4}$$.

So what happens when you diversify even more? Here is a table illustrating the effects:

# of Stocks Mean Std Dev Prob. Losing Money Prob. Losing Over Half
1 10 25.0 0.34 $$8.2 \times 10^{-3}$$
2 10 17.7 0.29 $$3.5 \times 10^{-4}$$
3 10 14.4 0.24 $$1.6 \times 10^{-5}$$
5 10 11.2 0.19 $$4.0 \times 10^{-8}$$
10 10 7.9 0.10 $$1.5 \times 10^{-14}$$
100 10 2.5 $$3.2 \times 10^{-5}$$ $$1.4 \times 10^{-127}$$