In this module, we're going to introduce ideas of value at risk and conditional value at risk that define tail risk and, in doing so, we are going to move beyond variance as a risk measure. Problems with variance. Variance is a risk measure which is appropriate for normal and other elliptical distributions. By elliptical distributions, we mean, those distributions whose level sets of probabilities are ellipses. This is certainly true of normal but it's also true of other distribution. It does not, variance does not capture larger deviations from the mean. And in order to do that, we would have to use higher moments, like [unknown] and so on. It's also a symmetric measure, it equally penalizes deviation above and below the mean. And that's okay for normal and elliptical distributions because their distribution is symmetrical around the mean. But for other kinds of distributions where there are, the distributions are not symmetrical, variance will not provide a very good representation of the risk of the portfolio, and we need other measures that can capture some of this. Meaning, they can capture larger deviations form the mean and they can capture asymmetry about the mean. The value at risk is one such risk measure. The value at risk of a random loss L at the confidence level p is defined as the pth quantile of the loss. So, if you refer to this figure down here, I'm, on this axis, I'm plotting the loss, on this axis, I'm plotting the density of the loss. So, the magenta line is actually the density of the loss. The 95% value at risk for this loss is going to be the value here, it's approximately 9.5 and so on, such that the probability beyond it is at most point, not 0.95 but 0.05. So, the probability on this side is 0.95. The probability beyond it is 0.05. And therefore, this point itself is 0.95 quantile for the value at risk. Value at risk, as you can notice, it only looks at the tail probability, and therefore, it's a tail risk measure. It's increasing in p, so the value at risk at the 0.99 level is going to be greater than 0.95. So, value at risk at 0.99 will be somewhere down here. This will be the 99% quantile and therefore its an increasing in the p, the value of p that you provided. The conditional value at risk of a random variable L, is the expected loss beyond the value at risk level. So here, here are all the losses that are beyond the value at risk. When you compute a conditional value at risk, you take this loss, compute the conditional probability of these losses, and take the expectation according to it. So, in an expression, it's the integral from value at rest to infinity x times fx dx. So, this is just a plain expection of the tail and then I divided by the probability that things are going to be in the tail. So, this is approximately that expectation from value at risk to infinity, x fl x dx divided by 1 minus p. It's also a tail measure. It's very easy to show that, in fact, the conditional value at risk is greater, always greater than or equal to the value at risk as you can see on this slide. The value at risk is the blue dotted line. The conditional value at risk is the red dotted line. And, in fact, this is, it's all you can theoretically prove that they are going to be larger. Just like the value at risk, the conditional value at risk is also increasing in p. Other names for conditional value at risk is tail conditional expectation in expected shortfall. For a normal distribution, we can easily compute the value at risk and the conditional value at risk. The value at risk is simply the mean value times the volatility and phi inverse p and what is phi here, its the CDF of a standard normal random variable with mean 0, and volatility equal to 1. The conditional value at risk of a normal random variable is also can be written in terms of the mean vector and the volatility, it's mu plus sigma times the integral of the inverse CDF over the tail from, going from p to 1, normalized by 1 over 1 minus p. The value at risk and the conditional value at risk of a normal random variable is completely defined in terms of the mean and the volatility. Should this be a surprise? You might want to pause and think for a moment. The value at risk and the conditional value at risk are some properties of the underlying distribution. For a normal random variable, the distribution is completely defined if you tell me what the mean lecter is, or mean is, and the volatility. And since mean and volatility completely define the distribution, they completely define the value for value at risk and conditional value at risk. One of the reasons value at risk and conditional value at risk have become very popular is because you don't have to make distributional assumption. As long as you have access to samples of the underlying loss distribution, you can compute value at risk and condition value at risk from these samples. So, here's what you do. You take some capital N samples, IID sample of the loss, put them in an increasing order. So, L paren 1, L1 is now the smallest value that you saw among these N samples. L2 is the next larger value that you saw in the N samples. Ln is the largest value that you saw at N samples. So, these are simply samples sorted in increasing order. Now, find an index Kp, which depends on the probability and is defined as the ceiling of the probability times the number of samples that you took. So, if the probability was 0.95, the number of samples N was 1,000, then Kp would have been 0.95 times 1,000, ceiling, which is 950. Ceiling, but since it's an integer, it doesn't matter. So, the index is 950. So, you take your losses, put them in increasing order, compute this index Kp, then the value at risk is approximately equal to the loss, the Kpth term in this increasing sequence, it's the Kpth term in the sort examples. What about the conditional value at risk? You take the sum of all the samples starting from Kp all the way through the N, divided by N times 1 minus p, and that is what is going to give you the answer for the conditional value at risk. So, there's another term N that is going to show up here. So, the sum of the N minus Kp plus 1 samples divided by 1 minus p times N. In the next couple of slides, I'm going to show you what happens as you change the underlying return distribution. The experimental setup that I'm using is as follows. I computed the sharp optimal portfolio corresponding to just the risky assets in this spreadsheet. I computed 10,000 samples of the loss or equalently negative of the return for three different distributions. The first distribution was a normal distribution with mean mu and covariance V. And mu and V were those that were specified in the spreadsheet. The second distribution that I use was a student's t distribution with mu equal to 12 degrees of freedom. I kept the return vector the same as mu but I've rescaled the covariance as mu minus 2 divided by mu. The reason I rescaled the covariance is that after this rescaling, the variance of the losses remains the same as V. So, both distribution a and distribution b, both the normal distribution and the multivariate t distribution have the same mean and the same covariance matrix. The difference comes in is that the t distribution has fatter tails, has higher moments that are not represented in the normal. Finally, I took a third a distribution was a mixture, a 75, 25 mixture of two normals. The first normal has a little bit lower variance, and the second normal adds actually one point time, 1.5 times higher volatility. And these numbers, 0.75, 0.25, 0.76 and 1.5 are chosen in such a way that if you looked at the mean vector in the covariance matrix for this mixture of normals, you end up getting exactly mu and V back. So, all three distributions have the same mean and the same co-variance. The only difference is how is the return distributed beyond the first two normals. Students see distribution has fatter tails than normal, particularly when the decrease of freedom are small so we expect the value at risk and the conditional value at risk to be larger. The normal distribution with a covariance of 1.5 squared times V has all of the volatilities 50% larger. And we expect that it will have a very large value at risk and conditional value at risk. This mixture model models a situation where there's about a 25% chance of having very high volatility and we want to capture and see what happens to the return distribution. So, this is the last histogram for the normal distribution. The 95% value at risk is 1.67%, everything is in percent. The 95% value at risk is 3.5, 3.15%. The value at risk is larger than the, the conditional value at risk is larger than the value at risk and the numbers are as they are shown in the slide. For the t distribution, the 95% CVaR is 4.58. If you compare it to 3.15, it's larger. And you can sort of, as I skip between these two slides, you can immediately see that the data is getting fatter. The 95% VaR also goes up to 226. What happens about the mixture of normals? The conditional value at risk is 5.6. And again, if just flip between these two slides, you will see that the data is becoming larger. And 95% VaR is at 1.93. So, what's interesting here, that if you compare these three numbers, the value at risk is 1.67 here. For the t, it's 2.36, larger value. But the VaR actually goes down for the mixture distribution to 1.93. So, if you just focused on VaR, just focus on where the pth quantile is. You would prefer the mixture of normal distribution to the t distribution. If value at risk was the risk measure to use which is a mandated risk measure in a lot of regulations, you would prefer to use the mixture of normals as compared to t. But if you look at the distribution of the losses for the mixture of normal and compare it to the t, you are expect, you are likely to see very high losses in the mixture of normals, which is captured in the fact that the conditional value of risk of the mixture of normals is a lot higher. And this is the reason why, one of the reasons why we are moving away from value at risk and going to conditional value at risk. Value at risk is only sensitive to the probability of losses. Conditional value at risk is sensitive to both the probability of the losses and the actual location of losses. Where does the loss happen in the tail? As a result, it turns out to be a better measure. It's also a measure which has some very nice properties associated with diversification, and it's a risk measure, which falls into the class of risk measures called coherent risk measures, and these risk measure have some nice properties. In later module on risk management, we are going to focus on the exact properties of value at risk and the conditional value at risk. What are the advantages and disadvantages, and you'll get more into the details of how to do portfolio selection with that. I'm just going to leave you with some properties of VaR and CVaR, proves of this, that this value at risk is that it captures the behavior. It can robustly estimated from the date, data, because it's a quantile rather than an expected value, it's not susceptible to outliers. It's, I've already pointed out that it's, susceptible only to the pth quantile and not the distribution beyond it. And that is one the bad parts of value at risk. And it creates incentive for something called tail stuffing. The value at risk is not sub-additive therefore, diversification can sometimes increase the value at risk, which is a problem when we're trying to do asset allocation. What about conditional value at risk? It all captures tail behavior, it's sub-additive and therefore, diversification actually reduces conditional value at risk. The mean conditional value at risk portfolio selection can be formulated and solved very efficiently. And more and more, we are moving in this direction as opposed to mean variance. The bad part is that the, the conditional value of risk is defined in terms of an expectation and therefore, it can be very sensitive to outliers. We'll return to this topic again in the risk management module.