[MUSIC] Welcome to Module 3, which has a focus on portfolio diversification. Portfolio diversification is obviously a very important concept in finance in particular investment decisions. I think the benefits of diversification are intuitively clear. The concept is all about, remember the story, right? That if the farmer goes to the market, they want to be holding eggs in as many different baskets as possible. That in case any one of these baskets falls down, then only a few eggs get spoiled and wasted, and the remaining eggs remain safe in the remaining outstanding baskets. And that is in contrast with situation where you are holding a single basket and if that basket goes wrong, then all your eggs are gone and wasted. That's kind of what diversification is all about. Now, even though this is kind of very intuitively clear, what remains to be seen is how exactly to measure diversification? How can we come up with a quantitative measure of diversification. In other words, it's a way of thinking about how many eggs do you have in each one of these baskets or how any baskets do you use to carry eggs to the market. How can we formalize this intuition to come up with quantitative measures of portfolio diversification. Now let's take an example. If you're looking at this example, we're looking at the portfolio that contain 30 stocks. As we can see from the graph there's actually 30 securities in that portfolio. Now we see also those vertical bars that represent the weights for each security in the portfolio. So now, if you're asking me, how many stocks or maybe how many baskets do I invest in as an investor? Well, I'll be tempted to say, well I'm investing in 30 stocks, right? Well that will be somewhat deceiving because when you look more closely at the figure then what you're going to see is that there are actually very few stocks, maybe number one, number three, number five in particular maybe number eight as well, eight, nine. Very few stocks actually less than 10 stocks that actually get any meaningful allocation. When look at the graph than any other stocks, they get a miniscule allocation, none zero probably otherwise, they wouldn't even be shown on the graph but very, very small. What we're saying is, well, there's a difference between the nominal number of stocks in a portfolio, which is 30 in this case, and what we call the effective number of stocks, or the effective number of constituents, which in this case, would be clearly less than 10. Now, how do we measure this effective number of constituents to make it formal? Well, we have very simple measure for that. It's called ENC, and it's equal to the reciprocal of the sum of the weights squared. So let me say that again. What you do is look at weights in your portfolio, you square them, you add those squared weights, and then you take the inverse of that quantity. Now the reason why this is a meaningful measure of the number of constituents and can perhaps be best understood by looking at two extreme polar cases. So first of all, let's take a look at an extremely concentrated portfolio whereby one given stock, let's say stock number one, would get 100% of the allocation in that portfolio. Well, in this case, w1 is 1, 1 squared is 1 and then all the wis' are 0. So you're going to get 1 squared plus a bench of zero, well will give you 1 and 1 divided by 1 gives you 1. Well, that's good because as you would like to see in this highly concentrated case, the ENC measure is telling you that you have a single stock in your portfolio. Now, if you're spreading your wealth 99% to stock number one and 1% spread out to the remaining stocks in your portfolio. Well the ENC number will be slightly greater than 1 but not by much. And that's exactly what you want because it would suggest that you're actually holding more than one stock. And let's keep in mind that in this latter situation, your actual nominal number of stocks in your portfolio could be as high as 100 or 500, but it's only one stock that actually makes it full 99% and that's what the effective number of constituents can capture. Now there was another extreme case of interest which is the equally weighted portfolio. So let's think about you spread your wealth equally over the components, the securities that you're looking at. So in this case each Wi is equals to 1 over N. Well, if you do the math it's very simple to see that 1 over N squared is 1 divided by N squared. You add up N times 1 over N squared, you get N divided by N squared, which is 1 divided by N. You take the inverse of 1 divided by N, and now you are back to N. So that makes sense. It's telling me that the effective number of constituents is the highest for the equally weigh portfolio simply because equally weighted portfolio is the most balanced portfolio that you can think of. So in other words, effective number of constituents is a measure of how well balanced your portfolio is. And equally weighted portfolio can be regarded as a portfolio that maximizes this quantity. So now, let's take a look at the particular example, in this case the S&P 500 index. Okay, so we all know that the S&P 500 index contains 500 stocks or actually if you look at the green line on top, what you see is that there are little bumps and hiccups. So in other words, it may well happen that they are 499 or 501 stocks at any given point in time in the so called S&P 500 index. But by and large, we're looking at 500 stocks. Now, if we apply the effective number of constituent measure, to that universe and we look at how many stocks were actually effectively holding while holding the S&P 500 cap rated index as a portfolio, well it turns out that the answer is much lower, it's about 100. It varies over time, but on average, it looks like it's about 100. So what we are saying is that, the effective number of constituents in the S&P 500 index, is five times smaller than the actual nominal number of constituents. And the reason why this is the case, is precisely because cap waiting as a waiting schemes stands to little high concentration because in there are few very large companies that make up for more than proportionally large, if you will, fraction of the index. Well it's proportional to their market cap but there's not a high degree of equality between these market caps. So a few very large companies tend to dominate the index and that's exactly what is being shown on this graph. Now, the beauty of the effective number of constituents is that it allows you to know how many different assets you are actually effectively holding within your portfolio. The problem though is it doesn't exactly tell you how many bets you're implicitly making. So something that could well happen is you could be holding many assets in your portfolio. What if for all those assets actually end up holding on the one and unique same factor then even though you look like you're holding a well diversified portfolio of assets, you actually would be holding in this particular example, the heavily concentrated portfolio effect of exposure. That has actually happened, for example, to university endowments in 2008. Well, these university endowments are known for having extremely well diversified portfolios and yet their performance was very bad in 2008 simply because the exposure of all of those different asset classes so-called alternative asset classes, including hedge funds, real estates and private equities and commodities and so on. Well, they have proved to be actually heavily correlated to one underlying factor that actually was the same equity related factor in the end of the day especially conditional upon these particularly severe market conditions and market scenarios. Now to try and identify how many bets that you're actually taking while investing in a given portfolio. You can use the following methodology. So first of all, you're going to decompose every single asset returned into a portfolio of factors. So let me assume so far without talking about how this can be done but let me assume that every single asset returns is actually decomposing in terms of factor exposure. In other words, let me assume that I have at my disposal some factor mode, which we've talked about in the previous section of the course, right? So, I'm assuming that I'm using the factor model. And now I'm looking at the portfolio not as a portfolio of assets, but now I'm looking at it as an implicit portfolio factor exposure. It's like a bundle of factor exposures. And what I can do now especially if the factors are uncorrelated, which will make these decomposition particularly clean. I'm going to be looking at the ENC number, effective number of constituents except that I'm not going to apply the ENC number to the Wi, which are defined as dollar contribution of different correlated assets to the portfolio. I'm going to apply the ENC measure to the Pk, where the Pk are define as in this equation as respective percentage contributions of different factors to the riskiness of the portfolio. And because the factors are by construction, by assumption uncorrelated in this case, well the speaker term is very simple. It's the proportion of the variance of the portfolio that's explained by factor key. Now taking the sum of the Pk square and then the reciprocal of that which essentially says I'm applying the ENC measure to the Pk to the risk contribution of different factors to the portfolio. Well, this is known as the effective number of bets, which is a very useful measure that has been introduced by one of our colleagues, Attilio Meucci, in 2010. And that's actually proof to be an extremely useful way to try and assess how well diversified or how poorly diversified your portfolio actually is. Well the last remaining question of course is, how do we extract these uncorrelated factors in the first place? Well, typically to do this, we are going to be using explicit factors when they are available and we talked about these explicit factors before. But they may not be necessarily uncorrelated, so how can we turn correlated assets or correlated factors into uncorrelated factors? Well, precisely that's where we can use a number of standard statistical techniques such as principal component analysis. But John is also going to explain that machine learning techniques can be used to kind of complement and improve on those most done at statistical techniques to provide us with a more robust and more efficient way of extracting uncorrelated factors with implications for measures of portfolio diversification. [MUSIC]