MBA Masterclass Machine Learning and Artificial Intelligence in Investing Masterclass
with Professor Stefan Nagel
Get an introduction to international business strategies, how one can use data to assess the state of globalization, and much more.
- October 31, 2023
- MBA Masterclass
Kara Northcutt: Glad to have you with us this evening. Make sure chat's available for everybody. All right, so everyone should be able to use the chat if you wanna let us know where you're joining us. We usually have quite the global representation for these events. I happen to be technically in Northwest Indiana, but will be heading back to Chicago soon. And the building right behind me on my screen, that's the Gleacher Center, one of our campuses at Downtown Chicago. Where are you today, professor?
Stefan Nagel: I'm in Chicago in my office at Hyde Park.
Kara: Nice. Yeah, it's a very lovely fall day here in Chicago. Okay. The chat should be available. Sorry, we had a last minute. There we go. Okay, so we got Boston represented, D.C., great.
Jeffrey: The recording has started. Have a great session, everyone.
Kara: Thanks, Jeffrey. Appreciate your help. Romania, that's a unique one. Turkey. This is fantastic. We really appreciate everyone joining us. I know it's various times for everybody around the world right now. Again, we'll give it maybe one or two more minutes. It just takes folks, we had a very large registration for this, which is great, but it takes just a couple minutes for everybody to get in. And here at Booth it is back to school time. We start classes on the 25th. So, it's been really a lot of fun. The full-time group, all the incoming students we're here this week and then they're up in Wisconsin doing some orientation. The evening weekend group just launched, so it's nice vibes and energy around Harper and Gleacher these days at Booth. That's kinda our status right now here in mid-September. This is great. That's in London. I have not had a chance yet, but I've heard our campus, our new campus in London is very beautiful, so I'd love to check it out. So if you ever happen to be in the area, stop in and and say hi. Okay. The numbers are still us. It's coming in steadily, so again, we'll give it a little bit more time. For those just joining us, welcome today's masterclass. We're thrilled to have you with us here today. Okay, it's starting to slow down just a little bit. Of course, people will continue to join and they'll have access and everything, but for the sake of time, we will go ahead and get started. So I want to of course, welcome you to today's masterclass. My name is Kara Northcutt. I'm a senior director of admissions here at Chicago Booth. I've been here going on 14 years. I've had various roles under the admissions function for the evening, weekend, and full-time programs. So on behalf of my teams and our executive MBA admissions team, we're thrilled to welcome you to today's masterclass, Machine Learning and Artificial Intelligence in Investing with Professor Stefan Nagel. So, kinda the way things will run today. The professor will give a lecture and then if time allows, I will moderate a Q&A, so I will verbally say the questions. So feel free throughout to post questions you want me to ask later in the chat or in the Q&A. I will monitor that. So, it's pretty straightforward. And that's how we'll handle the Q&A. It usually works well. So usually we have about 20 minutes or so toward the end. The session lasts approximately 90 minutes. Professor Stefan Nagel is a Fama Family Distinguished Service Professor of Finance. Professor Nagel's research focuses on asset pricing, investor behavior, and the formation of investor expectations. His most recent work explores the role of personal experiences in shaping expectations about the macroeconomy and financial market returns, models of invest, excuse me, investor learning about long run growth with decaying memory and the application of machine learning techniques to understand the risk and return of investment strategies in the stock market. So, that's obviously going to be the focus of today's session. So with that, it's all my pleasure to turn it over to Professor Nagel. Thank you so much.
Stefan: Hey, thanks a lot for this introduction, Kara. And welcome, everybody. Good morning, good afternoon, good evening, depending on where you are. I want to talk today about machine learning and artificial intelligence in investing. And this is part of the research that I do, and it's also something that I'm working on with a large asset management firm here in Chicago in trying to bring machine learning methods into the design of the investment products. And so you all know that machine learning, artificial intelligence is a big deal. Right now, lots of things that are happening in the world in technology have to do with machine learning and artificial intelligence. If you drive a Tesla and you use the self-driving feature, or if you use Alexa in your home or ChatGPT, all of these products have built in a very clever piece of software inside that uses some form of machine learning or artificial intelligence. And executives are starting to notice. If you look at earnings calls in the last few quarters, and you look at how often are people talking about artificial intelligence, it's going up big time. And so lots of people are trying to figure out what are all of these new developments and technology, in machine learning and artificial intelligence going to imply for what's going to happen in our industry, what sort of new products we could develop, what sort of changes in the competitive landscape we are going to see? And so, it's very natural and also to ask what is this going to mean for finance and especially for asset management. Yeah, and that's what I want to talk about today. Yeah. So here's my, the outline of this, the lecture I want to give today. I'm gonna start maybe 15 minutes or so giving a brief introduction to machine learning just to make sure we are kind of all on the same page in understanding some of the basic ways in which these methods work. And then we can talk about applications of these methods in investing. I wanna focus on two things. On quantitative investing and on wealth management. And then towards the end, I'm gonna offer a few thoughts on what this means for careers in finance and in asset management, and then some final thoughts at the end. Okay, so let's start with the very basics. What is machine learning, artificial intelligence? What does this mean, yeah? At a very basic level, these are systems that take some inputs, process them through a model and come out with a prediction, right? So for example, if you think about the self-driving feature in a car, the car takes visual information from cameras or in some cars, Lidar systems and so on. Maybe also inputs from maps, geographic information that has been stored and puts those into a model. And based on that model, figures out what to do, right? So for example, it might detect that there's a right turn ahead. And so yeah, we have to turn the steering wheel and turn right. Or if you think about ChatGPT, that probably all of you have used. You enter a user prompt, a sentence or two or three, and then somehow that model inside ChatGPT figures out based on this user prompt, just based on these few sentences that you have given it, it makes a prediction about what it is that you want to get out of ChatGPT. Basically comes up with a predicted text that ChatGPT thinks the user wants to see. Now, what is the sort of the key about machine learning here? The key about machine learning, and this is sort of where the revolution over the last decades or so came from, is that these models that are inside these systems, they don't have some hard-coded rules that some humans kind of programmed into the model. So for example, in a self-driving car, these are not rules that humans have hot wired that if you get this and this signal from the camera, then turn right. But instead the model is learned from data. You feed enormous amounts of data into that thing, and then it somehow figures out from the data about what the right decision is, what the best prediction is and so forth. Okay, so I wanna make this concrete. And let's look at actually an example where we can try to apply this, these sorts of methods. Let's take a finance example. I wanna talk about predicting stock market volatility. So, what is that? Stock market volatility is basically roughly speaking how much the stock market is moving on a, let's say a given day. I'm gonna look at daily data here. So on a given day, how much is the stock market going up or down? Direction doesn't matter. We're just talking about the range of movement. Is it going up or down a lot or not, right? Is it a quiet market or is it a very volatile market? And a key problem in risk management is, you know, if you for example, want to manage the risk of a portfolio is to predict what the volatility is going to be in the future, because that's going to pin down how much risk you're gonna face in the future. And so, let's try to come up with a model for predicting volatility. If you look at the series here, this chart that shows you for every day over a long time period for a broad US stock market index, how much that index moved in absolute terms on a given day. You see a few spikes here that go up 10. Above 10, this means it's above 10% per day. This means on those days the stock market moved by more than 10% up or down. Okay. And it would be nice to have a model that can help us predict to what extent it's likely that tomorrow, for example, we're gonna see big movements in the stock market. Okay.
Stefan: So, let's try to do this with machine learning. And I'm gonna build a kind of a toy example here that is going to basically lead us to a neural network, which is the technology that is underlying the vast majority of machine learning applications that are out there and built into many products. Now, I have to warn you, the way I'm gonna start out here is gonna seem super simple and kind of almost silly the way how simple it is. But bear with me for a few minutes, you'll see that these very simple elements that we're gonna start with are basically going to be the building blocks for a much, much more complex neural network that kind of looks like the neural networks that you see in many applications. Okay. So we're gonna start with an input layer, right? So if you remember you start with inputs, put them into a model and outcomes and prediction. So, that's gonna be what we call the input layer. And then we have to decide what we want to feed into that neural network. So I'm gonna start very simple. I'm gonna say, I'm gonna try to predict volatility of the stock market tomorrow by looking at how much the stock market moved today. Maybe there's a connection. Maybe if the stock market moved a lot today, it's also gonna move a lot tomorrow. Okay. So on the left hand side here, in that red circle, you can see the input that I'm gonna use, I'm gonna label it X, that's the absolute return on day t. Yeah, you can think of it as today. Okay. Now we take this input and then we apply some weight to it. This means we multiply that input with a weight, but I'm gonna keep it super simple here for now. We're just gonna set the weight to 1. So, this means we're just passing through that absolute return to the next layer. That next layer is called a hidden layer. And there we can potentially do something with that input. We could, for example, apply some non-linear function to it. I'm not gonna do this for now, I'm just gonna say okay, but just gonna pass it through again, right? So, nothing happens to this x. We'll just pass it through to the next layer. Yeah. Then we're again going to apply a weight, I'm gonna level that W0 here. And this weight is now not something as simple as just equal to 1. That weight could be something different from 1. And we'll have to figure out what it is. And then we go to the output layer, the output that this toy example neural network here produces is basically just taking our input, that absolute return on day t, apply that weight, multiply it with that weight, and then add a constant that I will label c here. So basically we arrive at our output prediction with, if we know the values for these two parameters, this weight W0, and that constant c, okay? Now this of course brings up the question, how do we come up with this weight W0 and this constant c. Well, this is where we have to bring in data. We need to use data to train the model, to make the model figure out what is the best value for these parameters, so that we get good predictions, okay? So, I'm gonna do that. I'm gonna use 16 years of daily data on that stock market index that I showed you. I'm gonna take absolute returns every day, right? How much in absolute terms did the stock market move on those days? And I relate them to look at absolute returns on a previous day, which is the input. And then I'm gonna fiddle around with this, these two parameters, this weight and this constant and try to figure out which numbers give me the best predictions on the next day, okay? And so when I do that, what I find is that I get the best predictions if I pick these values here, this weight W0 has to be 0.26. And this constant that I'm adding has to be 0.55, okay? So, to make this concrete. The way this works is now we are predicting next day's volatility. This is my prediction here. By taking constant, 0.55 and then this weight, 0.26 times the absolute return on the previous day, yeah? That's now our super simple model for predicting risk volatility of the stock market on the next day, okay? Now I claim that somehow this is a decent prediction, but how can we evaluate this? And that's another crucial sort of thing in implementing machine learning is we really need to test the model and we need to make sure that when we test the model, we do it in a sort of meaningfully challenging way. And so what we wanna do is we wanna test the model, not on the data that we use to train the model, but we wanna test the model on some new data that we haven't looked at yet, right? Okay, so I'm gonna do that here. I use 16 years of data to test the model, but now I'm gonna use four years of data after that training period, some new data to figure out on that new data how well is that model doing in predicting volatiles? So, I take four years of daily observations after the end of our training data set, okay? And this is how it looks like. So, the blue line is just from the previous chart that I showed you. That's just the series of actual volatility of the stock market, the actual range, you know, absolute ranges of movement on all of those days. And the red line is not a prediction that comes out of our super simple model. It's not fantastic, but it does capture a few things, like for example, when the COVID crisis hit in early 2020, as you can see around here, there was a big burst in volatility. The stock market was moving a lot. And our model, even though it's so, so simple, it does pick up some of that, right? It takes it a few days to catch up, but then it realizes we might be in a situation where volatility is gonna stay higher for a while. And it also predicts higher volatility. And a little bit less in magnitude, but sort of similar things are going on here in early 2022. But it's clearly still a super simple model and there's lots of other things we could do to make the model better. So, let's do that. The way we can make this better and get to more towards a more realistic application is by taking in more inputs. So far I used only the absolute return on the previous day as input, but why should I restrict myself just to the previous days absolute return. Maybe absolute return from days earlier also matter. And why just look at the absolute return on the previous day. Maybe the direction of the movement on the previous day matters too. Some of you may already have this kind of impression from the stock market if you guys are into investing. That sometimes when the stock market crashes, when it goes down, then volatility stays quite high for many days afterwards. Yeah. So, something like this could be going on. This would mean I could use the direction of the return on previous days to predict volatility in the future. Okay, so let's do this here. I'm gonna add as my second input here, this X2. And in at the bottom here, I'm gonna add not the absolute return, but just the return on the previous day. So, this now incorporates the direction. Did the stock market go up or did it go down? If it went up, the return is positive. If it went down, the return was negative. Now we have two inputs, X1 and X2. Now, what do we do with this? Well, we can now combine these inputs in various ways, right? I can take X1 and apply some weight and pass it through, but I can also combine it with X2. And so, what you see here is we have these weights here that now into this hidden the first node in the hidden layer takes both of these inputs and forms a weighted average. This first weight times X1, the second weight times X2, and then it also adds a constant. And the same happens down here, right? So, this is already starting to get quite complex. We're doing various mixtures of these inputs here. And then now we have two nodes in a hidden layer and we can combine them by applying weights at the end to combine them into an output prediction. And in addition, we can also in these blue nodes here, in this so-called hidden layer, we can now apply a non-linear function that just doesn't pass through these weighted averages of the inputs but apply some non-linear function to it. Yeah, we don't have to go into detail exactly how that looks like, but just think of this as doing something to it that kind of tilts the output a little bit in a way. Okay. So we can do this with two inputs, but we can do this with a lot more. I can add the absolute return on day t minus 1, on day t minus 2, on day t minus 3, and also the direction of the return and all of this. And all of these inputs then can be combined into many, many hidden nodes. And then at the end you are all gonna combine this into a prediction.
Stefan: Okay. So, I'm gonna gonna do this in a concrete case. I'm gonna add 30 lags. So, over the past 30 days of absolute returns. And I'm gonna put in 30 lags of just returns, so that includes the directionality of the stock market. So, this gives me 60 inputs. Yeah. So we are now gonna have a neural network that takes 60 inputs and combines them into a prediction. And just like before, now of course we need to train that neural net. There's now actually thousands of parameters that determine exactly how we combine these inputs and what we do with them in order to get the prediction. So we need to train the neural net, which means figuring out the best values for all of these parameters to give us the best possible prediction. Okay. So here's what I get if I do this and now apply this again to data that the neural network hasn't seen yet. This is now in the test period. This is new data these last four years that we did not use in training the neural net. Okay. So if you look at this a little bit and compared to what we've seen before, let me just flip back just to refresh your memory. This is how it looked like before. Look for example at around January, 2020 at the start of COVID, how well this simple, our simple model is here and what they're getting with this more complicated model. You can see they're getting a much better fit. It's doing much better in predicting the path of volatility. And it's kind of slow decay after January, 2020 as the COVID crisis was slowly kind of fading away. Yeah, if you look at 2022, you can also see it's capturing pretty well the slow rise and then eventual fall again of volatility. Okay. So, this is actually now already quite a realistic and useful neural network that you could use for risk management purposes where you could use the predictions from that model to feed into a portfolio management application. And it tells you basically the riskiness of parts of your portfolio on the next day, okay? Now the amazing thing about machine learning is that these tools that we just discussed in the context of volatility prediction are actually in a way no different than a kind of a neural network that you would use for a completely different application. So for example, I just wanna give you one of them. You could do image recognition, right? It is a classic machine learning application. And here's a super simple example for this, where we have a very simple image that shows some numbers. In this case here, a number 1. And we want to classify supposedly, you know, suppose we want to classify images into showing number 1 or not showing number 1. How would we do that? Well, we need to somehow process the data in the image. So we take all of these pixels, we assign values of 0 and 1 to black and white, and then we put all of these pixels in a column of inputs. This is in our input layer here, right? And then we just feed those inputs into a neural network. It goes into a hidden layer, gets combined, weighted non-linearly transformed, just like we just discussed it for volatility prediction. And then there's gonna be an output layer that produces two outputs. The probability that a number is number 1, or that it's not number 1. Yeah. And we would also go do the training in the same way as we just discussed. We would tweak these neural network parameters until we get a good accuracy on some data set of training images that we have where we can check whether the algorithm correctly classifies images. So in this sense, these neural networks and machine learning tools are kind of like a general purpose technology that you can apply it obviously with a little bit of tweaks and so on. But you can basically apply this in lots of different applications that at a surface may not look very similar. Yeah. But it's a very flexible technology. Okay. Now, the kind of challenging thing about these neural networks is that you do have a lot of parameters, yeah? This neural network that I use for volatility prediction with 60 inputs, it actually has almost 5,000 parameters that you need to somehow give values to. In training, right, you need to use the training data to figure out the best values for these parameters. And this may seem like a lot, but in many tech applications, we now have numbers of parameters that are far north of millions. Yeah. And this has kind of exploded in recent years. This chart here shows you various machine loading models over years and the number of parameters that they have. And there are some models, for example, in language processing that go into hundreds of billions of parameters. And the only way you can do this that you actually get something meaningful out of it, is that you need to have a massive amount of training data, right? This is going to be important when very soon, in a few minutes we'll talk about applying these machine learning tools in investment applications. We need to think about, well, you know, could we actually apply such a model with millions of parameters for investing application? Do we actually have the necessary training data for this kind of obligation? But I'll get to this one. Why did this revolution in machine learning and artificial intelligence happen now? Well, part of the reason is that now we have massive data sets to train algorithms and we also have massive computers that can actually digest these massive data sets. Yeah. Until a few years ago, this wasn't really possible. Yeah, but that's not the only thing. People have also figured out various clever tricks to actually even find good values in a case where you need to find values of billions of parameters. This is actually not an easy thing to do. And people have become more clever about this. And then with models with billions of parameters, another thing you have to worry about is that you don't want what is called overfit the training data. And this is again, something that's going to be important for finance applications. And so let me just say a few more words about that over fitting problem. Now with a concrete example. Suppose you want to do image classification and the task you want to accomplish is to classify images into images of dogs and into images of cats, right? So you feed the pixels of the images into a machine learning algorithm and you want that algorithm to figure out whether this is an image of a cat or a dog. As opposed you give this machine learning algorithm some training data where it turns out that in your training data, you have a dog that's wearing a red collar. And there's only one dog with a red collar and there's no cat with a red collar, yeah? And so if you have a very flexible neural network with many, many parameters, the neural network might kind of think that a red collar is really a great way of identifying a dog because in that dataset with 100% accuracy, when you have a red collar, it's a dog, right? You can probably already guess what the problem is, right? If you now go to new data, kind of out of sample where there is an image that your algorithm faces, where there's a cat with a red collar. Well, your algorithm will classify this perhaps as a dog, right? Because it was so confident based on the training data that red collar means dog. Yeah. And so, that's a problem one has to be aware of. And people have also developed various clever ways in the last few years of tweaking algorithms to make sure they're not overfitting the data and kind of suffering from these sorts of problems. Okay.
Stefan: So, this was my introduction for machine learning very briefly. And now I want to move on to some ideas about applying these tools in investing. And I want to focus on two areas. One is quantitative investing and one is wealth managed. Just quickly, a pre overview about where you can see machine learning AI applied in finance. Probably the area where it's actually already the most sort of everyday user machine learning is probably in banking where when you, for example, send a big wire transfer these days, you can be pretty sure that wire transfer goes through some machine learning application to try to figure out based on the characteristics of you, of the transaction you have done in the past, of your counterparty that you're sending the money to and so on, whether it's likely that this is a money laundering transaction or that you're somehow some risky customer and so on. So, this is very common these days. If you apply for a loan at a bank, that will also have some algorithms that are trying to analyze a credit risk based on machine learning and so on. But that's all by now pretty standard. I want to talk instead about quantitative investing and wealth management. And within quantitative investing I want to focus particularly on two areas. On predicting asset returns. So trying to, for example, forecast where the stock market is going or individual stocks. And a new space algorithmic trading. And in wealth management, I'm going to talk a bit about robot-advising. Okay, so quick primer on quantitative investing, what is this? It's part of active portfolio management. And active portfolio management means you're not just trying passively follow the stock markets, buy a broad index and be done with it, but you're trying to do better than the market. Yeah. So if you're trying to do better than the market overall, this means you have to somehow be able to predict returns and also risk, so that you can construct a portfolio that does really well, yeah? And machine learning is a potential help for that. And we'll get to this. Now, how did active portfolio managers come up with their portfolios in the old days? Kind of pre-quant investing, very often you would look at financial data, reports, analyst reports, analyze a few stocks in detail, put information in spreadsheets, maybe have a meeting where people make some stock pitches, you discuss and then eventually you make a decision. With quant-investing, it looks a little bit different. You're not focusing just on a few firms in detail, but you analyze a large number of stocks or large number of assets using statistical analysis, computers and so forth. And what you wanna do there is you want to have some data that allows you to generate signals that may have predictive content where you can predict which assets are gonna have high returns over the next day, the next month, the next year, which assets are gonna have lower returns. And then you can structure your portfolio accordingly in order to have a good performance. And so for that, you need to generate signals, you need to figure out which signals are really useful. And then also if you have many signals, figure out how to best combine these signals. And this is again, kind of a problem where you have inputs from data, you feed them into a model and out comes a prediction. So, it is a natural sort of application for machine learning tools. Okay. Now how did quant-investing evolve? It started already many years ago. But in a relatively simple way, I'm gonna call this quant-investing 1.0, where people are trying to predict return based on a few simple signals like accounting ratios or past stock price patterns. There's something called momentum investing where you're trying to profit from some trends that may be in price changes and so on, yeah? But this was all relatively simple. Then a bit more recently, people have moved on to what is called alternative and unstructured data where you're not just using some simple accounting ratios of the balance sheet or the income statements and so on, but you're using more, you know, less structured data, for example, from the actual text of corporate filings, from newsfeeds and so on. And you're trying to extract information in a somewhat automated way from these sources of information. Or investment flow data. You look at who is holding that stock, what types of investors? Is it retail investors, is this mutual funds? Can we do something? Is there some predictive content in that information? And then recently asset managers have started to use ML and AI to try to do this sort of in a way on steroids where you take a very large number of signals and you extract predictive information by combining them somehow, yeah? And machine learning tools are great for that because they can deal with a huge number of inputs and distill them into predictions. You can also use machine learning to generate new kinds of signals. So for example, these new tools that are now there in natural language processing that can actually help a machine learning algorithm to in some sense understand what is being said in a text in a corporate filing or in news announcements and then quickly make a decision based on it. So, we'll talk about this a little bit. Okay, so in asset return prediction, how does this basically work? Well, you take a bunch of data, could be from corporate filings, could be from a social media, other media kind of data, accounting data, past price data, investor holdings and flows and so on. And you feed this as inputs into a machine learning algorithm, for example, a neural network. And then you train that neural network on historical return data. You basically try to figure out, you know, which combination and use of these signals would have given me a good performing portfolio in the past or good asset return predictions in the past, and then based on this trainable network, you get a predicted asset return. And then you can use this information to construct an optimal investment portfolio. That's kind of the idea.
Stefan: Okay. Now it may seem straightforward, right? There's already plenty of very well developed machine learning tools out there. And we can just plug in this information that we get from all of these sources of information that I discussed and feed them into a machine learning algorithm and then hopefully get a great asset return predictions. Well, it's not quite that simple because in some ways the application here to asset return prediction and portfolio management is in some ways quite different from the usual applications in the tech sector where you do image classification or self-driving and things like that. So let me just mention a few points that are sort of useful to think about where you have some differences between ML applications and tech, and ML applications and asset management, and you need to somehow think about a clever way of tweaking these methods in order to deal with these challenges. And the first problem is one that is often called a low signal to noise ratio, yeah? So, what does this mean? Well, in many applications in tech where machine learning was developed, the prediction target is in some sense very clear, yeah? So again, let's go back to our example of classifying images into pictures of dogs and cats. In this case, you can typically very clearly see whether the machine learning algorithm has made an error or not, right? If it misclassifies a cat picture as a dog, one can clearly tell the algorithm, "Well, this was an error, right? We need to improve this." And you can tweak the algorithm to really kind of eliminate these kinds of errors. In return prediction, it's a lot more difficult because asset returns doesn't matter whether it's stocks or bonds or whatever it is, they're always going to be subject to a huge amount of random unpredictable shocks. There is always stuff that happens to companies, to the economy overall, to politics, whatever, that you just cannot predict. And so when we train algorithms on historical data to try to figure out how to predict returns, we are training them on extremely so-called noisy data. Data that is where the, everything is kind of clouded by these random shocks. So you can think about, you know, this is as if you had cat and dog pictures, but they're kind of totally distorted, right? There's some image distortions in there where sometimes you cannot clearly tell this is a cat or a dog, yeah? But that's the kind of data that you have to work with, okay? And so this makes it harder to, for example, employ models that have billions of parameters because it's just very hard to figure out what the best values of these parameters are when you only have such noisy data. The overfitting problem that we talked about, remember, the red collar problem with a dog and the cat with the red collar. This is sort of, again, on steroids when you have such noisy data, yeah? Your algorithm might just fit something in the past, it saw the data that was just random noise, yeah? And then you apply it on new data and it doesn't work anymore. Well, because it was overfitting that noise in the historical data. A second challenge is the availability of training data. Yeah. In typical tech applications, you can actually generate more data. Every Tesla that's driving around is constantly sending data back to Tesla headquarters that they can use for training of their algorithms, right? So with some effort you can generate new data. With asset return prediction, we cannot really do that. You are kind of limited the historical data set of returns that we have, right? So if you want to get truly new data, well if you want to get a few more years of new data, you have to wait. There's just no good alternative to that, yeah? So again, this requires some tweaks to the way you deal with machine learning to deal with that problem. And then this is maybe the most important one. In asset return prediction, you're basically chasing a moving target. Yeah. So, what do I mean with this? Well, in a typical ML application in tech, the nature of the predictive relationships that they're trying to uncover does not change. If you're classifying images in the cats and dogs, a cat picture in 10 years from now will still look like a cat picture today. I would hope so, yeah? But with return prediction, that's not at all true. You can very well have an algorithm that works in 2023, but it won't work anymore in 2033. For example, because too many investors are using it, right? Once too many investors have figured it out, then the information gets incorporated into the price and your algorithm has become useless, and so you basically to remain successful in asset management, you constantly have to tweak your algorithms to adapt to a changing environment and to constantly kind of stay ahead of the competition, yeah? And this makes it very different from many applications of machine learning in the tech sector. Okay. Now another application of machine learning is kind of at much higher frequency, and this is now also very common. And this is basically automated interpretation of news, right? So here's for example, on the left-hand side is a newsfeed from Bloomberg. And you can use machine learning to automatically interpret the news that's coming in and try to figure out, you know, is this now good news for the stock market, is this bad news for the stock market or for the bond market? And do this within fractions of a second then and quickly trade on. And so, the way you do this is you do you let the machine algorithm learn how to classify, for example, text into news that's good for the stock market that is bad. You can train it on lots of text that is available out there. You can also incorporate human feedback into the training of the algorithm, and then basically have an automated relatively high frequency training algorithms. And there's been lots of advancement on this recently. People have started not only looking at text, but also combining text and voice information for example. The voice of the CFO in an earnings call may also have some information, right? Do they sound very confident or not when they are making a certain statement? All of this can be used with these cell groups. And then the other thing is, this has happened very recently is that the interpretation of complex statements in natural language has gotten a lot better, yeah? And you can see this, you know, even with a publicly available tool like ChatGPT, that these systems have become really incredibly good, yeah? So, what I want to show you here is a while ago I asked ChatGPT to interpret a statement from the Federal Reserves. So the central bank of the US, the Federal Reserve's press conference after they made an interest rate decision. And I just copied pasted the statement from the press conference into ChatGPT and then I asked ChatGPT, is this a hawkish or a dovish statement? Hawkish would mean the central bank is likely to further tighten monetary policy or it it's taking a tightening stance. Or a dovish would mean they are in kind of the loosening mode, yeah? They want a loose monetary policy. So I just put pasted the statement and asked ChatGPT, you can see that the bottom there, is this statement hawkish or dovish? And what I got out kind of makes sense, yeah? So ChatGPT told me that this statement is a hawkish statement. And then it goes on to explain why, you know, what the reasons are for that conclusion. But the overall takeaway is basically these systems have become incredibly good now in interpreting natural language and the meaning of statements. And so I think we're gonna see a lot more of the use of these natural language processing tools also in asset management. Okay.
Stefan: So, let me also mention a few things in wealth management where machine learning tools are increasingly playing a role. So, what is wealth management? Wealth management basically involves advising people on how they should invest, how they should go about saving for retirement, taxes, estate planning, and so forth. The key problem that you face in wealth management is that everybody's situation is kind of different, right? People have different risk tolerance, they have different goals of what they want to achieve with their saving. They have different age, they have different types of jobs. Some people have very stable income, some people have risky income. And so, ideally you would want to give advice that is tailored to an individual specific situation. And there are roboadvisors out there now that are trying to do this, but automate this advice, yeah? The potential for why this is useful is kind of obvious, right? Once you automate this, you can offer wealth management services to a much broader set of customers than if you're relying on human advice. But this problem of tailoring advice then really becomes a critical one, right? How can you somehow do this that you give automated advice, but at the same time you are also tailoring it to someone's specific information. You need to have a model to do that, yeah? Okay. And this is where ML, again has a useful role to play. So for example, if you want to think about an investment portfolio allocation, like the individual put money in stocks, should the individual put money in bonds or some other assets? How much should one save to achieve some savings goals? You know, when is it a good time to retire? All of these things are actually very hard problems. And what many roboadvisors do so far is that they rely on relatively simple kind of one size fits all decision rules. For example, like if you have a certain age, then you should have a certain fraction of your portfolio in stocks and the rest in bonds or something like this, yeah? But this rule could potentially be way too simple, right? It may make some mistakes because people have very, very different circumstances. And so if you can somehow figure out how to tailor rules better to an individual situation, you may be giving much better advice, yeah? Okay. Now the problem there is that this is a really hard challenge because even mathematics is solving from optimal policy in a kind of a realistic setting where you take into account people's health situation, the riskiness of their jobs, whether they have children and everything. Figuring out the optimal policy there is really hard. What machine learning can do there is it can be useful for approximating the optimal solution. And I wanna show you one, we're not going to go into detail exactly how to do this, but I want to show you one example of a paper that has kind of studied that problem by looking at the customers of a huge asset management firm that also runs retirement plans and so on. And they had detailed data on all of the personal characteristics of people. And based on these personal characteristics, actually I skipped over this here, based on these personal characteristics such as risk tolerance, health, the goals of these people and so on, they figured out using machine learning what the optimal allocation is of people in their portfolios to stocks versus bonds, okay? Now, how does this work? You basically take these, all of these pieces of information. Risk tolerance, demographics, health, all of this. They become inputs to a machine learning algorithm. And now you need to somehow train that algorithm to learn the optimal policy. How do you do that? Well, you can confront the machine learning algorithm with simulated data. You simulate data just, you know, in a computer you simulate data on asset returns, on life events, on people's labor income. You can basically simulate random shocks that might hit people over time, health shocks and things like that. And then with realistically simulated data, you can then let the machine algorithm learn what is the best policy for people in that environment given their really specific characteristics that these people have. And what they basically found is by applying this, they found out that the simple rules that are often used by roboadvisors are in some sense way too simple that they often make, kind of give people the wrong advice in some sense because they're not sufficiently tailored to individual specific information situation, okay? So this chart here kind of shows you what I find. The vertical access is how much of wealth people should have in stocks as opposed to bonds in their portfolio, right? Kind of stocks are riskier. So you can think of this as sort of the best optimal riskiness of their portfolio, yeah? And the blue line shows you what sort of the average person should hold. It kind of starts kind of low when people haven't saved much yet, when they're young, then it climbs up. And then around age 45 it has a maximum, and then it starts declining. And then it kind of flats out, right? This declining part is what you often hear from financial advisors, which is that when you get older, you should slowly reduce the riskiness of your portfolio. You should put more money in bonds as you're approaching retirement. And that's also, as a retiree, maybe you should keep a higher share in bonds as opposed to stocks, okay? Now this is sort of for the mean individual, but now look at these ranges. The purple line ends, the green dotted line, they kind of show you how much range there is for different people, what's optimal for them, right? And you can see there's a huge variation around that mean, right? So it's by far not true that this path for the mean person is really the optimal path for everybody, yeah? And this is basically now based on machine learning algorithms that have figured out what's the optimal thing to do and just not much, you know, in terms of hurdles in now implementing this into a roboadvising platform, for example. You just need enough information on people's backgrounds and demographics and their personal situation and you can then kind of give tailored advice that's probably much better than this one size fits all advice, okay? So that's sort of another area in finance where machine learning tools could play a useful. Yeah.
Stefan: Now, last few minutes, I just want to make some brief remarks about career implications of all of this. If you look at what financial firms and asset management firms are saying these days is that they perceive right now a big gap in AI and machine learning skills. So they're looking for people that can help bridge this gap, right? But what's kind of important about this is that what they are looking for, and you can see this here on the chart here, is ideally not just people that have the AI skills, kind of very quantitative people with computer science backgrounds and so forth. But what they would really like a lot is people that can somehow bridge the two things, finance and the AI skills, yeah? So someone that knows finance, but also has some AI and machine learning skills. So if you think about kind of the skills you want to acquire over the next years, I think there's this probably a useful bit of information that if you want to go into finance, I think it's really highly recommended these days that you also try to acquire some machine learning and big data skills on the way, yeah? Employers seem to be looking for that. And one particular thing I've heard from asset managers recently is that one big problem that they're struggling with is that they need someone who can bridge between their quants that are now developing sophisticated investment strategies based on machine learning tools and so on. And on the other hand, the clients that these firms have that are often not trained in these sorts of things, but they still want to have an understanding of what the investment strategies are doing. They have to be concrete, suppose you have the trustees of some small pension funds of firefighters somewhere in Illinois who are visiting an asset management firm that they hire to run their portfolios. And they want to understand what is that firm doing with their money, yeah? And so, this is a big challenge. You need to have someone who can provide a bridge between those worlds. And right now there are not a lot of people that can do that. Another thing I've heard recently when I had dinner with a managing director of a large asset management firm is that they now think of people who are not in controls, people who are not coders. They think of them now increasing as citizen coders. Which means they want them to be able to do some simple data analysis tasks themselves, yeah? So write a brief, you know, a short Python script to do some data analysis. So, Excel is no longer enough. So, another thing to keep in mind. Now, the good thing is that is kind of citizen coding where people who are not coders actually are asked to do a little bit of coding. This has actually become a lot simpler now because of the breakthroughs that we have seen in large language models like ChatGPT. And what's basically now happening is you don't necessarily require all that much skill in coding anymore to write a little piece of code, but rather you need to have a skill in kind of prompting large language models to get you a good piece of code. So, I just want to give you an example of this. I went to ChatGPT and I told it, Well, write me some Python code to download some Apple stock return data from Yahoo Finance for the last five years and then calculate the average daily total return of Apple over those five years for me. And ChatGPT actually performed perfectly on that task. It gave me a piece of code that I could just plug in and run and it gave me a correct answer, yeah? It doesn't always work like that of course. Sometimes you have to tweak the code, but it's much, much easier to start with a imperfect piece of code than to start from scratch. It's also great for learning how to do some basic tasks in coding and data analysis, yeah? So, let me just show you the output I got. So first ChatGPT told me basically what it's doing, that it's gonna calculate the average total daily total return by downloading data and using a particular Python library to do that. And then it basically gave me a Python script that it also nicely commented. It said, okay, we can define some stuff, then we're gonna download Apple stock data and including dividends. That's correct because I told it to calculate total returns, which includes dividends. And it says, okay, now I'm gonna calculate daily returns. And then the average daily return. And then I'm gonna output the return, okay? So, I ran the code and at the very bottom here you can see the output I got, average daily total return for Apple over the last five years is 0.12%, yeah? This was actually a correct answer, yeah? Okay. So citizen coding in some way has become a lot simpler and I think developing some skills in how to use ChatGPT and similar tools to generate pieces of code is a very useful skill to have. Okay. So to wrap up some final thoughts, I think there's great potential for use of ML and AI in investing, but I hope I have also made it clear that there are some challenges that are unique to this class of applications, right? So just using these tools off the shelf is probably not a good idea, but we need to make some tweaks to them for them to really work well in investing applications. And there's a communication challenge. Lots of asset managers right now are struggling with this. ML algorithms have often kind of a black box nature. But on the other hand there's demand for transparency and understanding of investment strategies both by internal and external audiences that these asset managers face. And so that is a challenge that will be with us for a number of years, I think. And people who can kind of address this challenge, I think will be in high demand. Okay. Thank you very much for listening. That's my lecture.
Kara: Great. Thank you. I really appreciate that. I'll give you a second to catch your breath. And then if you wanna leave the slides up just in case you wanna refer back as I ask some of the questions. That would be great. And the professor made me think of one thing I wanted to share, 'cause most of you on this call are prospective students. Booth does have a joint degree with our computer science program that's available for the full-time program. And also six of your classes can be taken outside of Booth if you're a traditional Booth student in part-time or full-time. So, you could take some MCS classes. And we have been adding more classes under the Booth curriculum under machine learning. I don't know if any of the like classes you would recommend, Professor, of course, besides your own. But that would help people maybe that do or don't have this background. And we'll go into some of the questions.
Stefan: Yeah, I mean there's a whole number of classes I think that are useful. Just want to drop a few names of professors that are teaching classes. But it is by no means a complete list. But my colleagues, Sendhil Mullainathan, is teaching classes on ML and AI. Sort of forms kind of big picture kind of view, which is very useful for understanding what these sorts of tools can be used for. My colleague, Dacheng Xiu, is teaching classes on machine learning and also on FinTech that go a bit more into kind of the details of how exactly to use these kinds of tools. And my colleague, Ralph Koijen, is teaching a class on quantitative portfolio management that uses a lot of these tools. So, these are just three examples of people you might want to check out if you're interested in this area.
Kara: Thank you. That's really helpful. And, everyone, you can of course email me afterwards if you want some of those names. Happy to share if you can't find on our website. Okay. So we'll go to some questions that were put in the Q&A throughout. And pardon me, I don't know all these acronyms. I will do my best. This is not my area of expertise by any stretch of the imagination. But a question was asked in the machine learning development and modeling process for various financial applications projects, how do you select the appropriate corresponding machine learning model for the related financial applications?
Stefan: That is a great question. One way of approaching this, this is what a lot of people do is to just try to see what works because it's sometimes hard to tell in advance it is now boosted trees or neural network or some other type of method going to work better. And so, that's one approach. And then when one can sort of take it from there. But another consideration that also matters sometimes is, you know, do I have something that I can explain to my clients? And that's where neural networks sometimes have, for example, a downside because it's often very hard to figure out and then communicate what exactly is going on inside a neural network. And there are some other tools that are easier, for example, tree-based methods. They're so sort of pretty transparent where you see how they come up with their predictions, and so I think it kind of depends on that, right? So are you, for example, just developing something where your focus is only on getting the best possible model for asset return prediction? Or are you gonna face an external audience that wants to know in detail what exactly is going on within your black box? And then you would adjust this based on that.
Kara: Great, thank you. Alexandra has asked, could companies or other entities of note hack these NLP algorithms by framing statements slash disclosures in a way that is more likely to be picked up by algorithms as positive or negative?
Stefan: Yes, I think so. And I'm guessing this is already going on, right? Because it is certainly already happening that there's a lot of automated trading being done based on these machine learning algorithms. And so one can, it's not hard to imagine that some people will try to do this. And I'd be surprised if this is not happening. On the other hand, maybe the incentive for it is also not that great because if you manage to fool a machine for a few seconds, at some point somebody will figure out that that was a mistake and the price will adjust, right? And so maybe it's not so much about companies trying to fool investors, but what I'd be worried about more is about high frequency traders trying to generate some patterns in prices and trading volume and other things that other high frequency traders look at that confuses basically their competitors. And this leads to some pricing anomalies and problems in the market. Yeah. But it is this, I think this whole area is an area to closely watch and be a little bit concerned about.
Kara: Yeah, fair enough. Makes sense. In your experience, which model performs best for sentiment analysis? Word2vec, Bert or B-E-R-T, FinBERT or other? So I apologize if I didn't say those out correct.
Stefan Yeah, yeah. Okay. So, that is a tough question. I don't think I can make a statement about this at the top my head. There are so many ways in which one can use these, so I'm not sure that's a one size fits all answer to this.
Kara: Yep. Completely understand. Okay, let me see here. Another one. Would you predict the future of this technology to be one where firms use competing algorithms and theories? Or one where most of the market uses the same general technique over time market pricing, I guess to say what market pricing somewhat bakes this in?
Stefan: Yeah. Yeah, so I would guess that people will end up using different technologies. And part of the reason also has to do with the huge amount of noise in financial return data that an asset return data that I mentioned before. And so, it's very hard to figure out that one type of approach is really always necessarily better than another approach. It's hard to do this in asset management applications than in, let's say a self-driving application or image classification or anything of that sort. And so, this natural leads me to think that different people will stick to different models just because it's very, it's not obvious how exactly to discriminate the best ones from the somewhat good ones, but not quite as good ones.
Kara: Okay, great. Looks like there's just a couple more questions. And there's a lot of thank yous and gratitude for the session, so I wanted to say that as well as a couple of-
Stefan: You're welcome.
Kara: Drop off. Yeah, of course. Kelly asked, where do you see opportunity with AI machine learning for pricing illiquid and private assets?
Stefan: Yeah, interesting. So this is something that is actually happening right now that some, you know, in the private equity space people are also trying to use these tools. And I think there is potential, but it's probably, you know, the tools don't even have to be that sophisticated and complicated because this whole idea of taking a quantitative approach to kind of illiquid assets to private assets and so on is still relatively new. So I think there is some lower hanging fruit that can be earned just by applying relatively simple techniques before moving on to very complicated stuff.
Kara: There's just like, two more that were early, I'd say like in the first 20 minutes of the presentation. So Kunal asks, this is again, earlier when you were talking about the models, does it mean that if we keep on increasing the parameters and the layers, we'll get better inputs and like when do you decide to stop? You know, like if there's kinda a point of return that you, more layers.
Stefan: Yeah, yeah.
Kara: Yeah, you got it. Okay, thanks.
Stefan: Yeah, so yeah, that's a key problem. And this relates to this issue about overfitting that I talked about, right? It's sort of a little bit dangerous to make your model, you know, no network too flexible, too many parameters, too many nodes and so on. It'll do great in kind of explaining what's going on in the training data, but it might then do poorly on some new data, right? That the algorithm hasn't seen yet. And so, there are methods of sort of automatically now dealing with that problem of figuring out when is the network becoming too flexible or sometimes there are also methods where you have a flexible network but then you go back and you drop some nodes to try to reduce the over fitting. One standard approach of how to do this is what is called cross validation, where you basically, within the training data, you split it further, you have a data set that you kind of really use for training and then you keep another data set available that you don't use for training. And then you have a parameter that controls how flexible your network is, for example, you know, the size of the network and then you figure out, well, which size of network the network produces the best prediction on this left out data, which is called validation data. This way you can basically figure out what the optimal size of the network is, for example, or the optimal level of flexibility of the network. And so then you have basically three data sets in some sense. You have the training data, you have the validation data that you use to try to figure out the optimal size of the network and then you still have some test data that you haven't used for either one of those two purposes.
Kara: Okay, great. And this question is going back to kinda thinking about career prospects. And in addition to the courses you mentioned in the, your colleagues at Booth that are focusing on this areas, are there any others like resources or books or training classes, anything you can think of that can help boost students prepare for this sort of work?
Stefan: Yeah, so there's now a tremendous amount of stuff available just online. If you look at on YouTube and so on on kind of intro to coding or machine learning and so on. There's a tremendous amount of material available, so I would just encourage you to search around there. And then I would also highly recommend doing what I just showed you today, which is to go to ChatGPT or the tools like Copilot that use ChatGPT type stuff inside that allows you to automatically generate codes. This is kind of a great way of learning how some of these things work. It's much better I think, than looking at a book. So just try to do a simple task and try to figure out how to do it and kind of learning by doing.
Kara: Yeah, yeah, it's so true. It's so much more accessible. And becoming less intimidating even for those without such backgrounds coming into career. Gage asked, do you anticipate AI and machine learning advancements in finance are more likely to provide new access and generally benefit people from low income backgrounds? Or conversely, could this sort of approach extend the gap between the inequity between different social classes? Like any thoughts on that? Sort of question's come up.
Stefan: Yeah, so on the one hand I think better roboadvice could benefit people who are currently not able to access financial advice because it's just they don't have a high enough level of assets that human financial advisor would be willing to spend a lot of effort on this. So, I think on that dimension, one can expect some benefits. But that's also a danger, right? Because as you see, for example, with trading apps like Robinhood and others that have become popular in recent years, AI/ML like tools can also be used to try to figure out how to tempt you into doing stuff that's probably not good for your financial health. And so, this is sort of the dark side of these technologies that they might figure out how to notch you behaviorally into some causes of action that are profitable for the firm providing the trading app or the broker, but not so profitable and not so good for yourself. So I think it's hard to judge what eventually where the balance will be, whether there's gonna be more benefits than downsides, so I'm not quite sure yet on this.
Kara: Of course. How can machine learning and models apply to a venture capital?
Stefan: Ah, yeah. So this relates to what we were talking about earlier about, you know, illiquid and private markets. I think my comments that are offered there kind of applied out too. There is a potential of using lots of pieces of information that are sort of now used by humans in sort of an intuitive way that are being combined in human brains to do this with machine learning on a much bigger scale using lots of information about the nature of a startups project, about the conditions that they're face in their markets and so forth to potentially at least as probably not the only way of making decisions, but at least as a decision input for venture capitalists. So I see potential there, but it's of course also a hard problem. And I think the problem I talked about earlier with testing. And training and testing these machine learning algorithms there of course becomes an even more difficult one because for publicly traded assets, we do have at least a somewhat large amount of data there. Once we go to things like private equity, venture capital, the amount of data shrinks further. And so this makes it, and the frequency at which we observe data shrinks. So this makes it harder to train algorithms. But maybe as one of the inputs into the process, I could imagine is gonna play a role in some fields down the road.
Kara: And I'll just ask you, one other question, just kind of generally speaking, knowing that most on today's session are, again looking at Booth possibly applying next week or in the coming months, like any observations about students in your classes that seem to really, really succeed, just in general kind of characteristics, things that you appreciate about the Booth students?
Stefan: What I really appreciate is kind of the intellectual curiosity to explore something that is challenging and difficult for them. For example, a student who has a background that is not quantitatively that prepare, not tooled up on statistics and so on, but still wants to in a finance class learn how to master some of these tools. I have been very impressed with the students at Booth, how some of them are willing to take up these challenges and are coming out of the class at the end or of a sequence of classes in a place where, you know, I'm not sure whether they imagined they would end up being in that place of thought.
Kara: Yeah, I appreciate that. It comes up all the time. Admissions, of course everyone's furiously working on their essays, developing their narrative and story. And we always joke that we know that will all change once you're in the program, right? We expect you to be, your perspective to be broadened and exposed to different areas of functions, industry, whatever it might be with your classmates in the faculty. So, I appreciate that. I agree that open-mindedness and that intellectual curiosity really, really fits well with what we're looking for in our students and in the community. So, well I can't thank you enough. I'll give you kinda a update for everyone on the call, some other things you can consider. We'll have another masterclass focusing on social impact in October. And we resume our in-person class visits in October as well. So if you want to come to Harper, sit in the classes or the Gleacher Center, that sort of thing. And of course our virtual sessions will continue. For those who are unable to come to Chicago, that's totally fine. I put my email in the chat, feel free to email me for any, I know there are a couple kind of admissions questions that were in there, email me directly, we can talk about all that. So again, thank you all for joining us. And a special thank you upper, Professor Nagel, we really appreciate your session and your time and energy today.
Stefan: You are welcome. Was fun.
Kara: Thanks, everybody. Have a great day. Take care.
Stefan: Thank you.
Kara: Bye.
Booth News & Events to Your Inbox
Stay informed with Booth's newsletter, event notifications, and regular updates featuring faculty research and stories of leadership and impact.
YOUR PRIVACY
We want to demonstrate our commitment to your privacy. Please review Chicago Booth's privacy notice, which provides information explaining how and why we collect particular information when you visit our website.