Machine Learning in Finance

    Date:

    You may not realize it, but Machine learning is used in the Financial Services industry within features, tools, and decision making. In this episode we break down machine learning and it’s use cases. Ernest Chan, Chief Scientist, Predictnow.ai, and Founder, QTS Capital Management joins Cassidy Clement to discuss.

    Summary – Cents of Security Podcasts Ep. 78

    The following is a summary of a live audio recording and may contain errors in spelling or grammar. Although IBKR has edited for clarity no material changes have been made.

    Cassidy Clement:

    Welcome back to the Cents of Security Podcast. I’m Cassidy Clement, Senior Manager of SEO and Content here at Interactive Brokers and today I’m your host for the podcast. Our guest is Ernie Chan, Chief Scientist at PredictNow.ai and Founder of QTS Capital Management. You may not realize it, but machine learning is used in the financial service industry within features, tools, and decision making. In this episode, we’re going to try to break down machine learning and then also mention its use cases. Welcome to the program, Ernie.

    Ernest Chan:

    Thanks for inviting me, Cassidy. Great to be here.

    Cassidy Clement:

    Of course. So, since this is your first episode on Cents of Security, why don’t you tell our listeners a little bit about your background and how you got started in the industry?

    Ernest Chan:

    Sure. Sure. I actually started my career as a machine learning researcher at IBM T. J. Watson Lab up in Yorktown Heights, New York. My specialty in my group is researching language modeling. Which is essentially what OpenAI is doing today, except it was a few decades ago. So I was happily researching how the computer can understand human language, understand speech, and speak to people in, you know, natural language when some senior researchers in our group decided to decamp to a hedge fund. Which shocked all of us because we never thought that what we do have any relevance to financial markets.

    In fact, I am completely clueless as to, you know, how to trade stocks and what are the options and all that nice stuff at that time. But it turns out that these senior researchers. became very successful. They went on to a hedge fund called, Renaissance Technologies and both became co CEO of that company. And that fund, of course, turned out to be one of the most successful quantitative hedge funds. So I also, become curious and I decided to explore applying machine learning to finance and asset management at that time and I went to Morgan Stanley AI Group, which was just started about a year before I joined and there was only five or six people in that group at that time. Now, I heard there are over a thousand headcount, so it was quite a journey for machine learning and AI in finance, just looking at the growth of headcount in the group that I joined before. So after that, I work for a number of different banks, Credit Suisse and others, and hedge funds until about around 2011.

    I decided to sign my own funds, QTS Capital, and it’s still going. But, a few years ago, I decided that my true passion is really on machine learning research. You know, running money is fun, but, you know, sometimes, I think I want to go back to my roots, as a researcher in machine learning and I started a new company PredictNow.ai, which research methods of, you know, adding value to the asset management and trading process using AI.

    Cassidy Clement:

    Well, given today’s topic of machine learning and finance, you seem to be the perfect guest. So, when we jump into this from the beginner perspective, before we get into the real like meat and potatoes of this conversation, what exactly is machine learning and what’s machine learning in finance? Finance, maybe you can give some use cases as well after the definition. I think a lot of people don’t realize how much it’s utilized in so many things that seem so basic.

    Ernest Chan:

    So I would, you know, draw a contrast between machine learning and expert system. So a lot of people, you know, you remember maybe some years back the IBM machine Deep Blue, was able to beat Garry Kasparov in chess. I remember that very clearly because I just left IBM at that time very recently. So everybody was talking about amazing, that Deep Blue can beat Garry Kasparov, the reigning grandmaster. But interestingly, a lot of people thought of that as an example of AI. Well, it is an example of AI, but it’s not machine learning because the way that they beat Kasparov is actually to embed a lot of man made rules in the machine. Hard coded rules. You know, oh, if this person, make this move, you should make that move. And it’s just a lot of , hard wiring, it doesn’t actually learn by itself.

    You know, it’s a lot of experts coding this machine so that it can beat the grandmaster. And it’s a great, you know, piece of code, but it’s not machine learning. What machine learning does is much more similar to what DeepMind, which is now part of Google, what DeepMind did to beat to play Go. That’s true machine learning, because there’s nobody who actually, write codes to tell the machine what to do when a certain chess move come. It all learn by itself. It learn by example. So machine learning is essentially, is teaching the computer to learn on its own from examples. And that is part of AI, but it is the, the kind of AI that is much more powerful and much more, effective these days than the old, paradigm, which is expert system where people have to hard code rules.

    To answer your second part of the question, what are the use cases in trading? Well, of course, you know, the most obvious one would, you know, most people would think, oh, we should teach the machine to predict the stock market right? But actually that’s the hardest use case for machine learning because, you know, as I mentioned before, machine learning depends on data. So it learns from the data but in the case of, let’s say, predicting the market, everybody’s looking at the same data, right? And all the data is public, you know, whether it’s earnings report or prices or, macroeconomic indicators. Everybody essentially have the same information and, you know, frankly, there aren’t that many machine learning algorithms out there and so, you know, you are really training robots against robots. And as a result, a lot of the times what you are learning, and producing are competing against each other. And also, what you are learning are historical patterns. And everybody exploiting the same historical patterns based on the same algorithm, they result in a arbitrage where this pattern disappears.

    So a lot of times, predicting prices or returns is the most difficult task because of arbitrage in the market. But there are other ways to exploit machine learning in trading that is less subject to this dynamic. One is for example, sentiment analysis. A lot of times, people, read what the CEO had to say about that company and they form a certain judgment, and, you know, different people might interpret it differently, but they would use this kind of, judgment or sentiment as part of the input to their investment decision making. And machine learning can definitely, make this much more efficient.

    So, instead of having a investment analyst to read the speech or read the earnings report, and form a judgment, the machine can immediately form a judgment in a split second based on language model, natural language understanding. Now that doesn’t necessarily mean that the machine can then make an investment recommendation. No, but it can use as an input, which essentially automate the tasks of a lot of investment analysts and make it much more efficient. If it is used that way and it is, you know, just used as one of the inputs to the investment decision making, that is less subject to arbitrage because everybody have a different investment decision making, process or algorithm and this machine learning is only creating one of the inputs among them. So that’s one way, but what we think is the most powerful, application of machine learning to trading is actually not in direct decision making, but in risk management and in capital allocation. We find in those two cases, the problem of arbitrage does not exist because when we are talking about risk management, we are trying to detect the risk of a particular portfolio or a particular investment strategy. And everybody has their own portfolio and their own investment strategy. If you can say that, well, my machine learning program tells me that, the probability of loss of your current training strategy is very high. Well, don’t trade. That doesn’t affect anybody else. Nobody is competing with you, because nobody even knows what your trading strategy is. You are really learning from your private data, unlike trying to predict Tesla’s return, that is a public data. But in this case, we are, you know, trying to predict whether your own trading strategy is going to be profitable.

    That’s private data. Nobody can see it. Nobody, even if they see it, they can’t do anything about it because they are not trading your strategy. So risk management is one of the few areas where machine learning can make an impact on trading without suffering arbitrage. And similarly, capital allocation is another one. You have five trading strategies, which one you should trade in the bigger size. which one you should trade a smaller size, the machine can use the contextual information, such as the economic environment, the market environment, the historical behavior of the different strategy to make an optimal allocation.

    And again, nobody can compete with you on that because they don’t know what your five strategies are. And even if they know they can’t do anything about it, because, you know, you are the one trading them, not them. So these are the cases I would favor as a better use case of machine learning than the more, sort of obvious use case of predicting returns.

    Cassidy Clement:

    I mean, from what you had mentioned, too, it’s not necessarily, every use case is, an easy application or every use case is an extremely hard application. This kind of leads me into my next question, which is, you know, most people, when they think about machine learning, at least in today’s day and age, they’re mainly thinking about people in terms of working on machine learning, they’re mainly thinking about people like data scientists, maybe quants or people who are on the day to day with large data sets, applying them. So who exactly are the people utilizing this data or the software within the financial services industry or financial services companies?

    Ernest Chan:

    Traditionally, you know, investment banks or hedge funds hire quants, and they tend to have a, you know, physics background or mathematics background. And they like to use a lot of, high powered analytical models, black shows models, common, you know, toolbox for valuing options and so forth. They like to do things analytically, but as more and more of these models show their limitation, they have migrated also to much more of a data driven approach rather than an analytical approach. So in this day and age, when a hedge fund hire a quant, it’s very unlikely that this quant would not have a machine learning knowledge. So essentially every quant nowadays know both the basic math that traditional quant know, and also they know how to apply machine learning to finance. It is basically a part of the required curriculum of quantitative finance in any school at this point.

    Cassidy Clement:

    Well, when we’re talking about all of these aspects with curriculum as machine learning, and I mean, AI is another thing. We just recorded an episode on that. There’s so much involving large models, large data being woven into all aspects of education, including the obvious spots, like you mentioned, quantitative finance, computer science, physics, things that we know are traditionally steeped in math. But for those just looking to get an overview or get started in learning more about machine learning and machine learning in the financial industry, are there certain resources you can suggest or certain, places that people could be watching, listening, learning about these topics?

    Ernest Chan:

    Well at the risk of you know, advertising, or tooting my own horn, I have written, you know, five books on quantum trading. And, many of my later books, such as a book called Machine Trading, increasingly talk more about the application of AI to finance. So my latest book is called, Generative AI for Trading and Asset Management, which I coauthor with a great friend of mine, Doctor Hamlet Medina and I learned a lot actually from his writing in how a lot of the deep learning technology that is being used by OpenAI in language modeling can be applied to trading asset management.

    I was like taken aback how much advance AI has made, that is applicable to all things, not just about language, not just about images, but about, you know, finance, for example. So, you know, there are, the traditional machine learning algorithm that, you know, everybody have learned 10 years ago and there’s this sort of generative AI algorithms that only, really deep learning researchers know about in the last few years, but now even those deeper, layers of machine learning are being brought to bear, on asset management. So our books hopefully will provide a introduction from both the basic techniques to the most complicated ones, so that people can learn as they, as they progress in this field.

    Cassidy Clement:

    So, as people start to learn about the different aspects and maybe use features or tools that mention that they use machine learning in them, what are some things that people should listen or, ask questions about, think about, keep in mind when they’re exploring adding these tools or machine learning in general to their financial strategy and applying it?

    Ernest Chan:

    Well, I think that, you know, when one applies machine learning to trading in the financial market, one has to always bear in mind the possibility that the market is not stationary. So unlike, applying machine learning to language, you know, let’s say the program try to read every Wikipedia page so that when you ask it any questions, you know, it can provide an intelligent answer. And those answers are unlikely to change very rapidly. You can ask about science, you can ask about history or philosophy, and those things, typically don’t change very fast. You know, maybe 10 years later, we’ll have a new understanding of what the atmosphere of Uranus is. Yeah, okay. Well that will change. In the financial market, obviously things can change quite abruptly. You know, you could have a pandemic that completely disturbed the market environment. No one ever seen that before. You could have a mortgage crisis that pretty much made it almost impossible to short any stocks because the SEC prevented you from doing so. In the financial market, it is a environment where, it is very dynamic and, you know, because machine learning essentially need to learn from the past. And if there are a new environment where we have never seen before. You know, let’s say, you know, climate change rendered none of the houses in Florida insurable. How does that affect the real estate company? You know, nobody has seen this before. So that’s, that’s the risk of applying machine learning in finance is that well, the major assumption is that, you know, you have enough data so that you have seen everything. But there may be cases that you have actually not seen, and that would be the downfall of your algorithm if there’s no sort of guardrails provided.

    Cassidy Clement:

    So, you mentioned there that there’s the element of the unknown, which we all know the market is never perfect. No one has ever said everything that I say about the market is perfectly correct. That doesn’t exist. So other than the unknown aspect of the markets, are there other pitfalls involved when applying machine learning to your financial strategy or when creating a data set and trying to allow the system to learn from it?

    Ernest Chan:

    You know, it’s interesting that you mentioned dataset and in addition to this fundamental problem of, you know, the world being always changing, there are specific problem on financial data set. And that is a problem that we call, not having a point in time data set. So a lot of times when you look at financial data, they have been revised. You know, a lot of times, for example, a company publish their earnings report and you know, maybe a quarter later, they found some accounting problem, and they would change the numbers and then that number will be posted to the database.

     If your machine learning algorithm pick up these revised report and learn from them, it would actually produce a model that you know, you would say well of course, we should use the correct number, right? Why should we use the incorrect number for training model? But unfortunately, when you actually apply this machine learning model in a live trading situation, it is encountering the first report. The uncorrected report and not the one that would come out one quarter later, the corrected report. So, you know, it is a very subtle problem that a lot of, people outside of finance, but who are machine learning expert did not realize is that you actually want data that is so called bad data. You want to train it with data that is full of errors, because that is the data that you are going to get fed into your live training program, not the corrected data that happened three months from now.

    Cassidy Clement:

    That’s a really interesting aspect. I remember in my statistics classes in college and my computer science classes being told, you know, junk in, junk out, however, you know, machine learning and AI, it brings a whole other level into perspective because you’re trying to make the machine learning and the AI emphasize human like qualities within a machine, which as most of you know, Thanksgiving is coming up as we’re recording this. I’m sure many of you are going to have conversations with your family members where you’re like, that is so incorrect and that’s the point. A lot of data that gets fed into these models is incorrect. So it’s important to test with incorrect data to see how things can be adapted to give corrections and give answers that do allow for an error margin to be supplemented and adopted to make the answers a little bit more tactile and malleable. So I guess we talked about the basics. We talked about the good. We talked about the potential bad, but coming up in the world, you know, what’s the latest frontier? What’s going on on the cutting edge in terms of machine learning?

    Ernest Chan:

    Well, you know, I would say that the latest and greatest machine learning research is, you know, not surprisingly being conducted in the language modeling space. You know, we have, OpenAI being valued at what, 115 billion, while still losing money and that sort of thing. And, so, you know, you have the world’s greatest computer scientists working on this. So, it’s no surprise, leveraging that kind of research, cutting edge research, being conducted in language and image processing space and see if we can learn some lessons to apply to asset management and trading. You can say that we are in some sense followers rather than leaders in machine learning research, and that is just fine because obviously they are probably 10 times, maybe a hundred times more researchers doing language model research than doing machine learning research in finance.

    So it’s okay to learn from them. But there’s so much to learn, you know, the amount of research output is just incredible. You could just spend every single waking hour of your day reading papers and you still wouldn’t be able to finish them. And so, you know, one has to really learn how to learn, you know, it’s a meta learning problem. What paper I should read, that could be of value to the trading problem. And that’s, that’s the problem I’m confronted with. I’m trying to learn to learn. But, you know, some of the, the key insights that was being extracted in the last few years come to mind is that, for example, the transformer technology in deep learning. Proved to be extremely powerful and, many financial researchers are adopting it to time series analysis as well. So I would say the idea of using, transformer is a key insight that, practically every financial researcher are considering to adopt. And then, you know, of course, reinforcement learning, you know, I went to a conference last year at, UC Berkeley, it is on finance, quantitative finance, and practically every other speaker is touting how amazing deep reinforcement learning is. So that’s something we are exploring also in PredictNow. Deep reinforcement learning, as you know, is the algorithm behind the Deep Minds Alpha Go Program. How they defeated the best Go player in the world. That was using deep reinforcement learning. Playing Go has, and other games have some resemblance to trading because in trading, of course, it’s a much more difficult problem because you’re not playing games against one person. You’re playing games with millions of other investors, but you can see that there’s, you know, some resemblance and that’s another technique that comes to mind as the latest frontier, deep reinforcement learning. So that’s a lot of machine learning researcher, I mean, financial researcher are looking into as well. Numerous books have been written about it as well.

    Cassidy Clement:

    I like what you said there about, you’re learning to learn. It’s a very weird concept, but I know exactly what you’re talking about. I was on a podcast, I think at this point, maybe a year ago, that focuses around SEO and different types of content optimization. And their first question to me was, hey, what do you think about AI and SEO?

    Is that the end of SEO? And the answer is like, no, it’s a new way you have to learn how the machine learns. And now with all of this machine learning, large language models and AI being turned into this crazy, everlasting gobstopper of technology, you know, GEO is something new that I have to dig in and talking about reading a new paper every day and you still will not even chip away at the iceberg is the best way to put it. You know, there’s so many things that you have to learn about how the machine is learning, and it’s changing at such a crazy rate that it’s wild out there, but it was great having you on. Thanks for joining us, Ernie.

    Ernest Chan:

    It’s great talking to you as well. Thank you.

    Cassidy Clement:

    Sure. So, as always, listeners can learn more about an array of financial topics for free at interactivebrokers.com. Follow us on your favorite podcast network and feel free to leave us rating or review. Thanks for listening everyone.

    Disclosure: Interactive Brokers

    The analysis in this material is provided for information only and is not and should not be construed as an offer to sell or the solicitation of an offer to buy any security. To the extent that this material discusses general market activity, industry or sector trends or other broad-based economic or political conditions, it should not be construed as research or investment advice. To the extent that it includes references to specific securities, commodities, currencies, or other instruments, those references do not constitute a recommendation by IBKR to buy, sell or hold such investments. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.

    The views and opinions expressed herein are those of the author and do not necessarily reflect the views of Interactive Brokers, its affiliates, or its employees.

    Go Source

    Chart

    SignUp For Breaking Alerts

    New Graphic

    We respect your email privacy

    Share post:

    Popular

    More like this
    Related

    Options Market Expectations for the Payrolls Report

    Your Privacy When you visit any website it may use...

    20-Year Treasury Reaches 5-Handle, Greenback Soars: Jan. 8, 2025

    Stocks are continuing to struggle as interest rates and...

    Stocks Aren’t Always the Best in The Long-Run

    Your Privacy When you visit any website it may use...

    2025? This Market Performs Well in Odd Years!

    There is some information that hardly any investors seem...