 So my name is Tom Stark and I run a consultancy for financial systems, mainly for automated trading systems. And in recent years with the onset of machine learning and AI and big data, it's kind of obvious that people think, well, how can we use this in finance? Really, everyone, and this is how I got started in this field. In fact, when I went into it, I thought, wow, the holy grail is to basically have a machine that trades on the stock market and makes you money while you're lying on the beach and doing nothing. And it's a really fun idea. Now, in the days when I started, it was all about signal-driven algorithms. So you had something like, oh, if this changes, then I buy this particular stock or something like that. Nowadays, of course, you think, well, why don't I build a machine that does it all for me and I don't even have to worry about this anymore? So machines trade and the idea really is for the machine to find an edge in the market and generate your profit. So yeah, the obvious answer to this problem is we just create the AI system. But the obvious question is that comes at the moment, to my mind, working in this field and working with a lot of different companies in this. Why hasn't anyone done it yet? So what's actually happening right now is all this beautiful AI, people do amazing things with it. However, in finance, strangely enough, there isn't really any machines like that. There isn't anything that you switch on. It just trades the markets. It knows what it's meant to be doing and it just makes you money. So today, I want to talk a little bit about where AI has already been used in finance. And I give you a bunch of examples. I hope some interesting ones. And I also want to talk about why has it not happened yet and what's the reasons for it and how can we possibly change that? Okay, so one of the obvious main things that really comes out of it is actually really not easy to do. The problem space here is really, really different from other applications in AI. And one of the biggest issues is that markets are really, really noisy. So unlike, say, in face recognition, when you get a nice crisp image generally of the person, when you look at markets and when you look at signals in markets like in the price curves, there is so much noise that in fact it's virtually impossible, a lot of the time to recognize the signals in the noise. And so what happens is what we're really seeing most of the time in the market is what we call a random walk. It's just randomly distributed returns, so prices going up and down. And finding these faint signals in the noise is one of the first issues we need to solve. And AI is not particularly good at these things at the moment. The other problem which is also equally problematic and perhaps in the larger scheme of things even more so is that whilst you apply, if you imagine you have an AI strategy, you apply that into the market and it's running fine, it'll actually change the market, it'll actually move the market and if more players come, then all these people move the markets and it kind of defeats its own purpose. So imagine when you do face recognition and you actually do your face recognition and the person that you recognize the face with suddenly gets older in the face, it's about the same thing, right? And now try to think about this, you try to do face recognition, as soon as you do it the person just automatically changes his or her age and at the same time the image is incredibly blurry so that you can hardly see anything. This is what we're up against when we try to build autonomous trading systems. And so of course we already use some of it in the market and there's already a few uses for AI in the market. At the moment though, they're mostly addressing small subsets of the actual problem space and the first thing I want to do is to give you a wider perspective of what we're doing currently and what's currently happening. I explain to you a few of these things that already have been done and so there's a few things I talk about today, sentiment analysis, you probably all know that quite well then there's also interesting stuff like satellite imaging, training machines to act like human and then there's one from my own personal experience, it's a fast pricing of complex derivative products. So everyone kind of knows already sentiment analysis and we use it in trading. We get for example the news feed from Dow Jones or Twitter feeds or stock twits. We do put that through a sentiment engine. I can see it's not quite round. So maybe the screen is a bit squashed, I apologize. And then we get sentiment and hopefully this will translate into a really positive profit curve. Now unfortunately a lot of people because it's not that difficult to do have already called on to this and what actually happens these days is that the sentiment trails behind the actual market movement. So the market movements usually come first. If you look at some of the more macro level things and longer term then you can see sentiment, I'm still working. However if you think oh you know I pick up a news article and then I quickly react that usually doesn't work anymore. It worked still a few years ago but now that more and more people have called on to it it's actually unfortunately going away. This is really interesting, this is about satellite imaging and some people may have already heard about these examples but I'd like to just present some of them here anyway because they're so cool. So I'll start with crop yield. So a lot of people they trade commodities like corn and you know whatever grows on fields. And so in Australia where I'm from traditionally there's no reporting by the farmers to a government body or anyone what they're actually planting. So in reality no one actually knows what's on the fields, on the farmer's fields. Some farmers report it but most of them don't. And so you know we could have cotton or we could have corn or whatever. No one really actually can quantify what it is. And the harvesting season in Australia takes four months to go from the north to the south and there's actually been a lot of confusion. Farmers don't know what everyone else is planting so they're wondering well do I get a good price for my products? The traders don't really know because they have to wait a few months until they pay for contracts and they have to pay for a lot of money and wait a few months before they actually get what they want. Then we have problems with weather and droughts that minimise the yield. So satellite imaging has helped in two ways. One is we can now determine the acreage for all the different crops. So we analyse the satellite images and we can see what different crops are actually planted. And the second part is we can also determine what is the yield of that crop or what's the expected yield of that crop. And now that enables governments, insurance companies, traders and of course the farmers to make much more educated decisions about what they are going to plant when they do it. And so what that also means is everyone can minimise their risk to some extent. The second one which is really really cool is and that came up about two or three years ago a company started to take satellite images about the number of cars parked outside of department stores in the US. And this particular example here is a company called JC Penney and what they noticed is that over time the number of cars parked outside dramatically dropped and from that they actually correlated that to the share price and the share price was actually following that and what they did is they actually predicted the demise of JC Penney and I think they went into receivership in the end. So just by looking at the amounts of cars in the car parks with the satellite they could actually make decisions on the market and on their trading in order to make money. And the third one which is also quite interesting oil trade is one of the massive, massive trading assets in the world that there's so much money flowing in and out of oil trade and so companies naturally are interested into getting a good price and so what they do here is they look at these oil tanks from a satellite and these oil tanks have lids that float up and down they just sit there on top of the oil and they float and so when you look from above and the sun comes in you can see the shadows that the sun casts depending on how far that lid is inside the oil tank and so you can actually determine how much are these oil storage bases filled and from that you can infer where the price is going to move. This is something that used to be very, very difficult no one actually really knew how much oil there was available so for example if you can see from your satellite oh my god all these oil storage spaces are really shallow you probably expect the price to go up because it's much more difficult to get your hands on new oil and so again this was used quite successfully for trading these days everyone knows it so it's more difficult there was a question the legal implications that's a long story maybe we can talk about this offline because there is obviously a lot of things but right now there still isn't really much of a framework with regards to that it's actually really difficult for the regulators to make up their minds how they're going to do this and it usually comes in when the problem has already gone away that's often what happens in finance the regulators are always ten years behind the curve so this is a really interesting example also from my own work human-trained machines so when we analyze trading systems what happens is we get a lot of outputs from the performance of these trading systems and so there's something called draw down and sharp ratio and so on and so for example here I've got this example these are two P&L curves profit and loss they're almost finishing at the same point but which one would you invest your money in this one or the blue one most likely in the blue one right because it's just consistently up this one if that one trade here that makes all the money goes away you know you just don't make anything you see all the rest is just losses so you would go with this now if you just express it as a number of your strategy being successful they're almost equally successful so that's not really a good way of doing this it's still a P&L, it's still the money you make now there's other things like there's something called a draw down means like how much money it loses over from the highest point and so on so there's quite a few metrics that are interesting in analyzing and evaluating the quality of a trading system the interesting thing there is just simply ranking all those metrics and then putting them together really doesn't work but with this you end up with really not very good systems I mean we've been through this exercise many times the other thing that you can do is build really complicated equations and where you say well if this increases a little or if this is a bit higher and this is a bit lower that's okay but if this increases or decreases to that level but this is still up then we don't want it and it gets really complicated and so what we started doing is simply getting all these metrics in a line on the screen and having someone manually scoring them and saying oh this is a five, this is a three, this is a six and so on and just train like a simple machine learning system with it and then basically the machine learning system picks up the individual idea of how this is constructed this is much much quicker you can train a machine like this in about half an hour much much quicker than coming up with really complicated compound metrics and so on and it's actually really fast as well you can just run through the machine learning tool you've done it and yeah so we found these human trained systems are extremely helpful and give us a machine based individual perspective on what we want to achieve okay another one from my own work fast derivative pricing so derivative pricing is a bit of an interesting thing people have won Nobel Prizes and the same people that won the Nobel Prizes in derivative pricing then had the biggest capital meltdown of their company in the history of the American stock market so there was a book called When Genius Failed or something there was a lot of things about it so it's actually quite a difficult problem and it involves some complex mathematics and nowadays we have these things called exotic options and they are even more complicated to price I remember I once I didn't even make those mathematical models up myself but I had a paper 20 pages of equations and then it took me about four weeks to even just take the equations and put them in a system fixing a few arrows in the process but you know some PhD has made up the model years ago and you know it took him probably three years to do now the issue with this was I built this model it took me a few weeks and then a few weeks later they changed the way those specific options that I used worked and the whole thing was completely gone like I couldn't use it anymore and I got so frustrated I said I'm not going to come up with another mathematical model so what we did was put, used basically a very pragmatic solution trained a neural network to get the prices as they come in from the market and all the parameters the problem with this is when our parameters go out of scope when they go into a range that we haven't trained we can't use this neural network so we have to do what you call Monte Carlo simulations they're generally quite slow but we can see when our stuff goes out of scope we can start performing them preemptively and then actually do a pricing model based on Monte Carlo and then feeding that back in our neural network to be able to make more predictions and then as it actually comes into the scope of these new parameters we can then feed the real prices in the AI as well and then get a better sense of what's happening and so the system which is it basically involves no equations whatsoever it's actually really fast and efficient for good derivative pricing I was involved in high frequency trading and speed there is really really important and so this was like a very pragmatic solution using machine learning so the big question for most people is and this is in trading we have reinforcement learning what about that couldn't we just take a trading system and plug in our reinforcement learner and hope it's gonna build us an amazing strategy that will really just solve all our problems and trade profitably until the end of days well there is actually a few stumbling blocks to this and this is really why we come to this are we already there in terms of autonomous trading machines one of the problems with reinforcement learning it's very simple and efficient so even if we have tens or hundreds of thousands or even millions of price data it's still not enough to really train reinforcement learners efficiently as far as the current technology goes and so when we train them we have to do this on the same price data over and over again which basically leads to complete overfitting and everyone here knows probably what that leads to and there's no way you can actually use that out of sample so one of the other problems with reinforcement learning is for the people here that know this we've got a reward function in our reinforcement learning and when I showed you earlier what we did with machine learning where we use human informed metrics this is the same problem here with the reward function what are we using profit and loss time step risk adjusted profit max drawdown all of them at the same time it's actually really hard to come up with a good reward function in finance it seems such an obvious problem you just say whatever makes the most money is what we use but it's really not it actually leads to some really bad decisions to be made from experience another problem is and this is also an issue with the reinforcement learner it's the exploitation problem versus exploration when we build reinforcement learners that we want them to make good money we really need to be in the exploitation space of the reinforcement learning meaning we don't want to have too many random jumps that just search the space and look around they are usually the least profitable ones so when we are in the exploitation space what happens is our neural network very quickly converge into some sort of local minimum and what that means is as the market changes as we get a different market characteristic so in finance we talk about mean reversion versus trending and so on as we get into a different market characteristic it's really difficult for the reinforcement learner to jump out of that local minimum and actually adapt to the new market conditions and the other thing is actually also really difficult to even tell when the market conditions change it's still fairly obvious often for a human but for a machine there is not really any easy solutions yet if you come up with one I'd be really grateful to see it it's always easy but actually when you're running it live it's very very difficult to pick up when the market conditions really change so the other problem is reinforcement learners really don't deal with noise very well this is an interesting one because when you are able to reduce the noise a little bit with some filters you can actually start to see really good results a while ago I was at QuantCon in New York and I presented a little paper on this and there is a github page where I have a really basic example of a trading reinforcement learner and it's based on the same reinforcement learning techniques that people use to crack games when you have really simple games and then the machine learns how to win the game basically this is based on a similar thing and if you take the noise out to some extent you will actually realize suddenly that the reinforcement learners start to work fairly well again it's not easy to just go from noise filters to profitable strategies so we're working on that and I'll keep you updated it's very interesting problems so what's interesting is many times in the space AI gurus came in and they say we just use AI on trading and oh yeah we're gonna make bucket loads of money funny enough pretty much all of them have failed most AI driven new hedge funds and so on they all have failed like most of them actually never made it and why is this this is really strange because it should be a problem at least from the outset but it's really not because the single most biggest mistake a lot of people enter that space and you see a lot of blog posts on that they try to predict prices but not returns and actually predicting prices if you are at 150 you can kind of predict well it's 151 or 149 pretty much kind of similar and if you do this over lots of prices it looks like your prediction is really closely tracking the prices but actually it doesn't really mean much whether you predict prices or not what you really want to predict is returns because if you predict the price closely what you really care about is it going up or is it going down if you predict it slightly up but it's going down there's no point like you lose money it's consistently even if you predict the prices closely you most of the time lose or actually what happens most of the time is just basically when you look at the distribution it's just a random blob there's hardly any predictive value in it so that's the biggest mistake a lot of people make that enter the field when they are new the other thing is and I want to stress this because this speaker said more data are much better now interestingly in finance it's not like that not quite when you use trading systems what we found is often machine learning works better with less training data that's really fascinating because nowhere in data science generally that's the gospel more data is always better the problem here is right now always get trained on specific market conditions and they converge on specific market movements and if those market movements change the machine has to change and it doesn't understand that necessarily so what happens is when you look back too far the machine just tries to cater for all the market conditions and basically just gets really confused and produces really confusing results sometimes it works, sometimes it doesn't when you narrow down the number of data that you use to train the machine update that frequently you actually get much better results now sometimes that depends also on what you look at but in most cases in my experience this is true often what people forget is trading costs there's something called spreads and commissions and slippage they really cut into your profit and you see a lot of academic papers they do all this machine learning and they go we are really successful what they forgot is to include all the hidden costs of trading and then actually if you apply them as well their systems usually completely die and there's not much to be gained anymore now what's really important here is and I guess that this is what people have recognized now just knowing that your systems isn't enough you need domain specific knowledge you need to understand which domain you're working in and I just realized recently I did a bit of natural language processing and I realized oh my god I don't even remember the grammar from school very well I really had to like re-learn a lot of the way languages constructed and so on I've really forgotten that it would be much easier for you to build natural language system but if you come in fresh it will take you quite some time to pick up all the little things that might be there that you've forgotten like in the case of finance it's definitely trading costs and all those other things so domain specific knowledge is not easy to gain and as far as I can see here and people I talk to mostly data scientists in this area the generalistic data scientists in my opinion doesn't really exist because it's just too difficult to get that specific knowledge and takes too long a lot of the time so the other problem is good traders often what they do nowadays they recognize really machine like simple machine learning generated trading patterns they can actually look at the chart and they go oh this is a machine and I trade against it they recognize when you run your machine they see the pattern over time if it starts repeating and they trade against it and they basically make you lose money by just making manual decisions their neural networks are pretty powerful as well and they're very good reinforcement learners so when you build these machines and they just do simple stuff people will recognize it and they will go against you again wipes you out so the final thing is of course you're up against some very smart people I mean there's a lot of you know you always talk about the PhDs and the you know Harvard and MIT guys so it's pretty tough space because as I said before everyone wants to build machines that make money so there's a lot of people moving in and there's a lot of crowding nowadays so are we there yet well AI is definitely under rise there's a lot of AI moving into finance at the moment however for autonomous self learning machines in my opinion it's still a long way to go there's still quite a bit of work to do it's not quite that simple yet I think we will get there and some people have had success but it's incredibly difficult so finally I want to say thank you I just found this in Trader Life which is an online magazine I found someone quoted me that the websites will definitely become more efficient through AI it will definitely become a bit of robot wars I think this is what is going to happen it's going to become robot wars if you want to contact me here's my email address and my website and if you have any questions just come and ask me afterwards do we have time for questions? five minutes? this gentleman was first and I go to you so hi my name is Deepak since you talked about using AI in finance I could relate too because I was doing similar work in Morgan Stanley and I remember that when we were building this kind of system to trade in fixed income bonds we figured out that actually equities we found out that the biggest problem was coming from hidden liquidity and hidden orders do you know what hidden orders are? hidden orders so what you're talking about is a hidden liquidity now with new machines people don't submit orders anymore they watch the market and just in the moment when the market when they want to trade they put the order in so suddenly you think you understand the market but then suddenly there's all this other stuff coming in and this is actually another big problem you're up against you don't really know anymore what the markets actually really like what was the problem that actually helped us die we didn't go forward because you were not able to overcome because you look very learned in finance and you have background just wanted to understand did you solve this problem or what was your approach well there is certain ways you don't need to solve this problem it depends on the algorithms you build but it's definitely not easy to overcome this but as I said we found ways around that as well the company that does bonds trading we're in that space but there's unfortunately a lot of proprietary information so it's kind of hard to talk about this I'm sorry about that you had a question yeah oh sorry can I go ahead yeah maybe you ask quickly and then or you got the microphone so this gentleman was first so my question is I know in short term the market is quite volatile it's difficult to predict so what's your view on a slightly long term when I say slightly long it's like three months six months one year down the line based on your previous price your fundamentals, your returns and all those things so what's your view on that very good question in my opinion the real short term market trading is so crowded now that it's actually for especially for newcomers almost impossible to come in and to actually be profitable and I think the future of new people moving into the market is in the longer time frames and in fact I really believe that we are, you know we move from like slow trading to like high frequency trading in the nano second range but now it's actually coming back and a lot of trading firms also moving back to more long term trading and predicting the market like a few days out, a few weeks out, a few months out and yes I really I mean myself I'm looking more and more into this again and I can really see that there's a lot of potential still because there's still companies why is the market going up eventually is because companies are creating value right and like if you fly machines that understand how value is created you can trade that and that's never really gonna go away so yes I believe that's really the future in my opinion. My question is more of a suggestion than clearing any doubts I was going through your slide on why AI based machines normally get things wrong I feel one another parameter I mean in addition to those in addition to those that you have mentioned would be the contextual inputs the contextual inputs also will help you in better prediction rates. Of course yes and I feel that also has to be added in addition to whatever that you have mentioned. Yes, I mean as I said there is there's so many ways you can do this and it actually really depends on the time frame that you're trading on whether certain inputs are more or less important and so sometimes you know there would actually be a lot of merit in using AI for high frequency trading but unfortunately AI systems are way too slow. That's the main stumbling block. You need to make nanosecond decisions if you run this through a neural network it's way too slow so it's also it's very important to see what you're dealing with on a technological end then there's so many ways to play this contextual nowadays there's a mantra don't use price anymore for predictions, alternative data are really big but now even alternative data are already becoming bit of a commodity so at the moment it's constantly changing always new stuff and you always have to stay on top of the game which I find exciting it's good. There was a question I think she was first so just a quick question how do we decide at what point should we deploy a model in real time? Given so many caveats about whether a model is performing or not performing at what point we decide that this model is mature enough to be deployed? That's a really good question and actually so many people have philosophised about it and there is really no solution some people say don't over philosophise about your performance just build something get it in the market and start running other people are extremely diligent and they just try to be perfect and they end up in analysis paralysis but there is actually no real it's still gut feeling there is no real systematic way of doing that being a data scientist how do we influence the decision of putting the model in production and have confidence that it will work over time? I think a lot of this is when you've done this for many times over and over again and you saw what happened as you did it you get more experience in it that's usually the way we do it still to be honest I haven't got a better answer for that I haven't found a systematic way of doing it properly there was a question over there I have a doubt regarding this fraud detection in financial accounting because detecting frauds in financial accounting there was a lot of metrics and you need to have a strong domain knowledge in financial accounting and frauds especially in financial accounting they have a huge impact in stock prices and market so what is the advancements of AI in that field I'm not able to find a lot of literature in this field particularly but what is the advancements in that field? I only talk for my domain which is trading not so much financial accounting in Australia for example ASIC and also the NASDAQ they got systems that detect fraudulent trading like there's something called spoofing and wash trading and pump and dump and all these things so there's actually a bunch of AI systems now deployed by the regulators that start detecting this and it actually becomes quite serious when you breach those a lot of trouble so it's actually constantly evolving as well unfortunately regulators generally don't have as much money as the big financial firms so it seems like there's always a step ahead and unfortunately also especially in Australia there's quite revolving doors to people that work for ASIC then work for trading firms and they understand what to do to get around things and it's just an ongoing issue that's just probably never going to get resolved thank you do we have more time? probably run out of time but please grab me afterwards I'm outside you can just ask me the questions