Up to this point in this course, you saw that the empirical distribution of the returns from the Wilshire 5000 Index is quite different from a normal. In fact, it turns out that, in real life, not all data are normally distributed. Can you think of any? Okay. Let me give you an example. Researchers in medicine point out that coffee and alcohol consumption are typically non-normal. Suppose you graph a histogram of how many cups of coffee someone drinks a day. There are going to be a bunch of data clustered at zero. These are the non-drinkers, a cluster of data in the low to moderate range of usage, and then a few extreme values to the right. These of course are the heavy drinkers. This type of data would not look like a normal distribution. There are many ways data can depart from normality. Let me give you a couple of ways this can happen. Quite often, we find skewness in financial data. Skewness means that, either the right tail of the distribution is longer than the left tail or the other way around, that the left tail of the distribution is longer than the right tail. We also often find kurtosis in financial data. Kurtosis refers to the heaviness of the tails of the distribution. I will define these concepts more precisely in a minute. We should though remember, that there are other ways that data can depart from the normality, besides skewness and kurtosis. We're just focusing on the two most commonly observed ways that financial data can depart from normality. In particular, it turns out that high-frequency data such as daily log returns, are typically non-normal. We're going to spend some time on this issue in this course. The reason is that, departures from the normality has important implications for value at risk and expected shortfall. Why? Because these two quantities are intimately related to the left tail of the returns distribution. Let us start with symmetry and skewness. Here is a definition. A distribution is symmetric if the left side is a mirror image of the right side. Now, the normal distribution for example, is a symmetric distribution. If your graph of normal distribution, as we had done so previously, and you rotate the graph around its mean, it get back to same graph. Now, a distribution is left-skewed if the left tail is longer than the right tail. Similarly, a distribution is right-skewed if the right tail is longer than the left tail. Here are graphs of three distributions that have different skewness. Let's start with the graph in the middle. This is the probability density function, or PDF, of the standard normal distribution. It is symmetric. Now, let's compare it to the graph on the left. The graph on the left is the distribution that is left-skewed. Notice that it has a much longer left tail. By now, you might have figured out that the graph on the right is the distribution that is right-skewed. In all three cases, the distributions have a mean of zero and a standard deviation of one. What happens if the true distribution of the returns of a portfolio is skewed, but we incorrectly assume that it is normal, and therefore symmetric? Now, let's use the graph to see if we can tell what may happen. Suppose the true distribution of returns is left-skewed, as in the graph on the left, but we assumed it to be normal and symmetric, as in the middle graph? Remember, these distributions are drawn to have to say mean of zero and the same standard deviation of one. I hope it is clear that really bad outcomes, that is, large negative returns, are more likely in the left graph than in the middle graph. So the value of risk and expected shortfalls calculated using the middle distribution would not work for the distribution on the left. In statistics, we can calculate the coefficient of skewness of a distribution. We don't need to know the exact formula for skewness, I will show you how to calculate it in R. All we need to know is that, a symmetric distribution has a skewness coefficient of zero. For a left-skewed distribution, it's coefficient of skewness is negative, and for a right-skewed distribution, it's coefficient of skewness is positive. In R, we use the skewness function in the moments package to calculate the skewness of a vector of numbers. So remember to install the moments package before you try to use it. Now, let me show you the R commands that I use to calculate the skewness of the log returns of the Wilshire 5000 Index. First, use the library function to load the moments package. Next, convert the log returns into a vector using the as.vector function, and save that vector into rvec, or rvec. Now, apply the skewness function on our rvec and display the results with two decimal places. For the log returns of the Wilshire 5000 Index, the skewness coefficient is minus 0.91. This is negative. It tells us that these log returns are skewed to the left. Next, let's move onto heavy-tailed distributions. Here's the definition. A distribution is heavy-tailed if its tails are thicker or fatter than the normal distribution. We also use the word "leptokurtic" to describe a heavy-tailed distribution. Just as in the case of skewness, heavy-tailed distributions also have important implications for value at risk and expected shortfall. As an aside, I should point out the following; If the distribution has thinner tails than the normal, it is called platykurtic. This type of distribution is rare in finance. In fact, it is so rare that I only I learned of the term platykurtic very recently when I was looking for the name of such distributions. Here are two graphs to show you the difference between the standard normal distribution, which is on the right, and a leptokurtic distribution, which has heavier tails than the normal distribution, which is on the right. Again, the two distributions have the same mean of zero and they also have the same standard deviation of one. What is interesting is that the graph on the right has a higher peak at zero. It is harder to compare the tails of these two graphs. But you have to take my word for it that the tails of the distribution on the right is heavier than the normal distribution on the left. What it means is that large outcomes, whether positive or negative are more likely in the right graph than in the left graph. So what happens if the true distribution of the returns of a portfolio is leptokurtic as in the right graph, but we incorrectly assume that they are normal as in the left graph? Yeah you've probably guessed the answer by now. The value at risk and expected shortfall calculated under the normal distribution would not work for the leptokurtic distribution. In statistics we can calculate the coefficient of kurtosis of a distribution. Just as in the case of the coefficient of skewness, I will not write out the exact formula to calculate the coefficient of kurtosis. I will show you how to do it in R in just a minute. You just need to remember this, the normal distribution has a coefficient of kurtosis of three. For a thin-tailed distribution, the coefficient of kurtosis is less than three, and for a heavy-tailed or leptokurtic distribution, the coefficient of kurtosis is greater than three. In R, we use the kurtosis function in the moments package to calculate the kurtosis of a vector of numbers. Here are the R commands I use to find the kurtosis of the log returns of the Wilshire 5000 index. These commands are very similar to the ones I use to find skewness. I convert the log returns into a vector using the as.vector function and store them in the variable called once again rvec. Then I apply the kurtosis function to rvec. The answer is 21.80, which is much larger than three. It confirms what the graph of the empirical distribution was telling us earlier that the returns of the Wilshire 5000 index is leptokurtic. Now, we can use a formal statistical test for normality called the Jarque-Bera test. The Jarque-Bera test is just one of many ways to test for normality. I will mention a few of them after I show you how to do the Jarque-Bera test. You know R is a very nice program because there are so many things we can do with just a few simple commands. In the moments package, there is a function called Jarque test that implements the Jarque-Bera test of normality. Here are the commands I use to do this. Again, store the log returns of the Wilshire 5000 index in the vector called rvec, then apply the Jarque test function to rvec. The Jarque test function will print out a few lines as in the black color in the white box on this slide. It will tell you that you have applied the Jarque-Bera test of normality to the rvec vector. The JB statistic is some really big number like 142510, and it has a P-value of well, basically zero. What is printed out for the P-value is in scientific notation, and 2.2e-16 basically means that this number is zero. I added a comment in red that this test rejects the null hypothesis that the data are normally distributed. Oh, I almost forgot. I wanted to tell you about some other tests that statisticians use for normality. One test is called the Q-Q plot. The Q-Q plot stands for Quantile Quantile plot. When we do this test, we graph the quantiles of the actual data against the quantiles of the assumed normal distribution. If the data are normal, then the Q-Q plot should line up along the 45-degree line. Another test compares the histogram of the actual data against the histogram of the assumed normal distribution. The second test is known as the Kolmogorov-Smirnov test. We're not going to use either of these two tests. But if you come across them, you will know what they do. So much for the tests of normality. Let's summarize our results. Here is the bottom line of our investigation about the normality of our log returns. The daily log returns of the Wilshire 5000 index are not normally distributed. The coefficient of skewness is negative, which tells us that the distribution is left skewed. The coefficient of kurtosis is much bigger than three, which tells us that distribution is leptokurtic. In addition, when we use the Jarque-Bera test for normality, we strongly reject the null hypothesis that the data are normally distributed. What this means is that we cannot calculate the value at risk and expect a shortfall under the assumption of normality. We must calculate them without assuming normality. Now it is your turn to check for the normality of the data you downloaded from Fred.