Welcome to module five, forecasting discrete events. In this module, we're going to look at estimating specific events that are important for financial modeling. We will look at crashes and recessions. We're going to look at traditional methods in statistics, and we're going to compare those against the more modern methods in machine learning. But let's now look at a couple of examples where machine learning has had significant impacts. So the first motivating application involves individual loans and try to estimate who will default in a crash period. This topic is very important because first of all, it sets the stage for what you charge, what the bank or the organization that lends to the individuals will charge during certain periods of time. Secondly, this type of issue led to the crash in 2008 in the US. So there is quite a lot of interest in trying to estimate the probability of defaults. In particular, if we go over to China, we find that companies like Ant financial and Alibaba use machine learning to estimate those probabilities and can give loans to people online directly without having to encounter a loan officer. This type of estimation is a binary variable, will the person default or not. So that's the difference from what we looked at previously when we were estimating a factor risk and factor returns. The second motivating application is the one we're going to concentrate on in this module. In particular, we're going to look at will the next quarter or just in two quarters ahead, lead to a crash or a recession? Again, this is a binary variable zero, one and in particular, we're going to use traditional statistical methods or estimation of crashes, we'll look at features, and we'll then compare that against machine learning approaches. First note is that traditional regression methods in statistics are inappropriate because we have a zero, one variable. The idea of a crash is quite important because most investors, most individual companies, individuals when they buy homes are levered, and in particular, if you're levered, then you need to worry about am I going to default? Can I survive a crash? This is the essence of risk management in the investment area. We can lever up very easily, and we see this in companies, we see this in private companies, mergers, and acquisitions, we see governments trying to build infrastructure. How do you do that? Will you end up borrowing. So this is a very important question for us and in particular, if we want to think about survival, there's several different methods to survive in a crash. One would be just to have enough resources to wait it out, that's one approach. Second approach would be to buy insurance. One could also try to estimate if a crash is coming and take correction beforehand. How do we look at let's say the hurricane's coming, what do I do to protect myself in that event? So that's what we're going to look at today. If you look over time, the first panel here at the top we, look at the GDP that's occurred over time, and in particular we see that there's a very smooth path from a long way out, we can see that the GDP has increased slowing down a little bit over the last several decades but having a fairly consistent path. However, if you look at the lower pane, l we see fairly dramatic drops during the recessions. Those are the panels, those are the areas that are shaded here. We see the 2001 recession. We see the bigger 2008 recession. Next, let's turn to the S&P 500, and let's look over a long period of time. Again, we see a fairly gradual increase over long, long periods of time. We'll go back to the 1930s in this context. We see however that there are episodes of fairly sharp drops. So if we can estimate those drops, we can be much better in trying to protect our wealth, and this is important in risk management. So we want to think about estimating those probabilities of crashes and in particular, that will affect the asset allocation we take. We saw in a previous module that you can affect your decisions based on your probability of a crash versus normal. In the context of machine learning, this is more difficult because we no longer have millions of crashes as we did with individuals, we're going to have millions of people we can evaluate. Here we have a modest number of crashes, and so it's harder to estimate this in a context. The goal should be for us just to try to improve the probability estimates over time, not necessarily predict completely whether a crash will occur. Secondly, we need to know is the approach we're using understandable and interpretable, we've talked about that previously. So one of the main issues here is to come up with features to determine the features that lead to crashes or that indicate beforehand that a crash might occur. One of those is the yield curve. The difference between the long-term bond rate, let's say the 10-year bond rate in the US, and a shorter term bond rate, often the two-year rate. Here we see the difference between that, and we see on the red line here that as that drops, it gets to the point where the long-term bond rate has an interest rate that's below the short-term interest rate. That's a very unusual circumstance, that's called an inverted yield curve. In the middle of 2018, we have that incidence occurring today. We're not quite there but we're almost there. Once it drops below, it is called inversion. If you look to see in this chart, the blue, darker lines are the ones that indicate recessions. Each one of those periods of time was preceded by an inversion of the yield curve. Not perfect, there are times when we have an inversion and there's no crash, but it's a pretty good representation over the last 45 years of a crash occurring. Let's have a couple of take-home points next. We're going to forecast discrete events. In this case, we're going to look at crash regimes. These permeate financial problems and in particular, investment problems. Traditional regression models are inappropriate for that. Now we're going to turn to machine learning and this area has been pretty successful in representing discrete events. More difficult in the context of crashes because we don't have the data that we would like to have. So our goal is going to be to improve the probability estimates of crashes, and if we can get a better estimate of probabilities, then we can say what happens if we do go from 15 percent probability which is for the normal incident over long, long periods of time. Suppose we feel there's a 30 percent chance of the next quarter having a crash. We want to look at what you would do in that context.