So today we're gonna talk about artificial intelligence and trading in the stock market. And what I've used, and I'm gonna give a demonstration at the end of the algorithm, but as we see AI is changing many areas of our lives. And one of the main areas that it's changing quite, quite well is in finance.
Now, as I said for myself, I, my background is in finance. I've been in over 20 plus years and trading stockbroker. And if you think about it, you know, when you look at, let's say, charts, graphs, what you're looking at is visually you're looking at trying to identify patterns, trends. And so when we look at AI and reinforcement learning is the one particularly we're gonna look at. It's like hiring a, a quant to do all the work for you, to do all the, the back research. And so it gives a really some distinct advantages over humans.
So it doesn't experience fatigue, it's not hungover, it doesn't want extra time off. It's like, oh, I didn't check that. Let me go check that. One of the things that happens with traders as well particularly, is when you're trading, you always remember you're, you're just as good as your last trade. So what that means is that when you look at your last trade, you may have won. And so what happens is you, you get what's called the hot hand. I don't know if you guys are familiar with the hot hand theory.
So in other words, you think that you've won once, you've won twice, you won three times, and you think you're gonna keep winning. And the problem is that when that happens, particularly as a trader, you begin to then size your trades much larger because you, you can't lose. So it doesn't happen with, with artificial intelligence, with the reinforcement learning equally, if you've had a streak of losing trades, that can affect you as well.
And as I was saying, so with it comes with reinforcement learning and AI in trading, there is no looking at your previous trade.
It looks at every single trade as it's meant to to be. Okay.
So, like I said, they, they won't have any issues there. So they can process vast amounts of data much quickly as a human can. And I'll talk a little bit more about, well, what, what are the inputs into the models themselves to get the desired outputs? And so sometimes because it's large amounts of data, the patterns and trends could elude a human analyst. 'cause you know, we're only human after all. And as I said, the AI can operate around the clock 24 7, no problem monitoring market conditions and seeing how it goes. So if we can go to the, let's see, that's for me here. This is for me, yes.
Okay, now, now I gotta put my glasses on. I've got, I had, I've had, I, I'm just fighting going to bifocals to read this and read that at the same time.
So, so the AI again, is revolutionary. Finance industry involves algorithms that improve automatically through experience and analysis. And reinforcement learning is a type of ai. So as we go through here, as I've been talking about it, is transforming the financial industry with trading and quantitative analysis and trading decision making. So these quantitative analysis can offer trades adjustments based on extensive real time analysis or real research and analysis. So it can do it in real time.
So as I mentioned already, the advantages I went before my slides, it again, no fatigue, no emotions, consistent performance. Now again, you, you could say, well, you know, does it do well? Does it not do well? It can have the consistent performance.
And, and I'll show you guys in a minute, a demonstration of how it works with the demon, with the, the model itself that I've already trained, but it's maintained steady performance regardless of the previous trades, as I mentioned, leads to more reliable and trading strategies. And it's consistent in reliable AI has, again, repeatable and stable returns.
Now, let's see here. So it can help us as humans. One of the things yesterday we were talking about was human in the loop. And one of the things is we were ta we were talking about that is, is, is when you look at financial services, it is very heavily regulated and rightfully so. I'm not here to, to argue about regulation or non regulational of financial industries.
But equally, when you look at the ai, if you start employing AI into trading strategy, so if you say for example, you go and invest into an AI traded fund and then you go to the fund manager and ask them when you've lost money, why did I lose money?
You say, well, I don't know why would that be an acceptable answer?
No, I can explain to you the theory, I can explain to you how it works, but I can't tell you exactly why that, you know, and this is what we're talking yesterday about the black box. You don't really understand how it came to his decision. Now we as humans, we can maybe really not understand what, how we came to our decisions. We can look at possibly intuition, we could look at, you know, I kind of got a feeling about this, but it ultimately we're talking about accountability. Who's being held accountable for what has happened?
Okay, so I'm gonna switch to the next slide here.
Alright, so talk a little bit about reinforcement learning before I go to the next bit. So if any of you guys are familiar with reinforcement learning, what reinforcement learning is a subset of AI and what a reinforcement learning does, rather than traditionally, if you look at AI machine learning models, if you use regression, you would then say, okay, I'm gonna say tomorrow the stock price is going to be for X stock is gonna be $101 or 102, whatever it may be. When it comes to reinforcement learning, it is a decision agent.
So it will tell you tomorrow you should buy X, you should buy 10 stocks, you should sell 20, you should buy 15. And it makes a decision. Now how does it make its own decisions? And what I'm gonna talk a little bit about how it makes its those, those those decisions and how it can go, but it actually will go and give you a decision to buy and sell, but you don't even give it a strategy.
It comes up with its own trading strategy.
Now, is it the right strategy? Is it the wrong strategy? We'll talk, we'll, I'll let you guys decide that, but when it makes its decisions, how do you come to your decision? So I was gonna ask this question here. How do you decide if you're gonna take an umbrella with you in the morning? So yesterday morning, how many of you guys were here yesterday? You guys were here yesterday? Did anyone bring an umbrella yesterday?
Oh, okay, we got two people. And it rained yesterday, right? It rained yesterday afternoon, it was like today in the morning. So how do you make a decision?
So, you know, maybe you look at the traditional methods, you would look at the weather forecast, radio, tv, social media, weather alerts, bar barometer or other weather instruments that you could look at. Some people say, you know, I, my my knee starts to hurt, or the spouse, your your, your wife tells you.
And if you're like me, you just do what your wife says.
You, you don't want to get in trouble. Take the umbrella. You take the umbrella, right? Or maybe your intuition, you look, you know, you kind of say, it feels like it's gonna rain today. There's something to, I can feel like it's gonna rain today. Your personal experience. Maybe it's a habit.
You say, now I live in Ireland. You take an umbrella regardless it's gonna rain every day.
So we say, you know, it, it rains between the showers 'cause it, you know, the sun can be out and it can be completely rain. And that's why I go to geography. So all of these decisions, you know, you see yourself, okay, that's a very simple decision that you make every single day. So how do you do that? How do you then make that decision?
Well, it's the same way when you look at a trader. So how does a trader decide to buy? How does a trader decide to sell? Now I'm talking in finance particularly, but with reinforcement learning, we use, I'll show you here what, how it really works. So we use you look here we have an agent, the decision agent, as I said, we have our action, our environment, the state, and then the reward. So it's the reward function. So if you look at this, the environment, and in my case, I'm gonna use a single stock and we're gonna look at the spy ETF.
So for those who might not know what the spy ETF is, it's based on the s and p 500. It's a, it's an index in the stock market. It's based on 500 of large caps or capitalize capitalization or capital large capitalized stocks, mid small.
And so what the s the, the spy ETF does, rather than you going and buying the index directly, you buy an fund that tracks the s and p 500 and it trades like a stock, it's much easier. Okay. Does that make sense? Everyone okay with that before I move on? Yeah. Okay. So the state space describes the observation that the agent receives from the environment.
In this case, it's a daily price. So I, the one that I've trained uses end of day pricing, but you can do it minutes, hourlys, 15 minutes, five minutes, you can do it weekly, but it, it's entirely up to yourself. Okay? So that's the state that I'm going to to give it the, the, the, the reinforcement learning model. Now we look at the action space and that describes what, what the, the allowed actions the agent interacts within the environment.
And in this case, the agent does, for example, buys or sells. Okay?
And you can add additional things, say, well, you can't go short or you can't use leverage. You can put in some constraints in it, tell it specifically what you want it to do. And in the agent is the reinforcement learning model that buys and sells.
Now, in there I've described all of them except the reward function. Okay?
And we, we are gonna talk about the reward function. So again, as we think about the umbrella, so why did you know, how did you decide that? How did you make that decision? So with a reward function, it's very much you're giving it a reward and saying, attaboy, that's the what I want you to do. Or you say, no, that's not what I want you to do. Okay? So as I said before, when we looked at, we thought we think about the, the umbrella from yesterday.
We say, okay, well the reward function was those who brought the umbrella. The reward was, well, well no one else had an umbrella and they were getting wet. I had an umbrella and I wasn't getting wet. Now I didn't bring an umbrella yesterday.
Okay, so go to the reward function here. So how does the agent get rewarded for taking the right action? And so you have to give it the right reward function and it's the mechanism to incentivize them, the, the the agent to learn and to do better actions. And so when the agent is learning, you give it the data. So you have to decide what inputs do you want to put into the model itself.
So you know, you can maybe use sentiment data to say, you know, what's the market overall sentiment you can maybe look at, you know, so you can look at global news, you can look at news of individual stocks, you can look at various different aspects that you can put in.
You can put technical indicators, you can put obviously the stock price itself. And so the agent, as you're training it, you've given it the reward function, it has an explore exploit. So it begins to explore around and see what's working and seeing what's given it the best reward function.
And then it then once it finds something that works really well, it then begins to exploit that. Does that make sense? Yeah. Okay. Alright. So I use the sharp ratio. Has anyone ever heard of the sharp ratio?
Okay, so what the sharp ratio does, we've got a couple of people back there, thank you. The sharp ratio is, so if you guys have heard the higher the risk, the higher the reward. Have you guys heard that? But sometimes the higher the risk is just, just higher risk. It means it means nothing, right? So how do we then measure?
So a gentleman named Sharp came up with this ratio and basically said, what we do is we, we do our expected return divided by, well, we take off the risk free return there.
So we say, if I just put my money in the bank, I get 4%, I expect it's gonna make, let's say 14%. And then what I do is say 10 minus, you know, 14 minus four 10. And then we divide it by the expected volatility. And that will give you then a ratio that tells you for every unit of risk you take is the unit of reward. Does that make sense? And this is really the gold standard in financial services. Any strategy that you go to, any hedge fund or to any fund manager, the first thing you ask is what's your sharp ratio? Okay? Because that's basically what it's being measured on.
Now we can talk about, you know, can you, can you overtrain a model to get the desired result? The answer is yes you can, but you know, we, you want to be as, I mean when we start talking about the, we got a couple of lawyers in the room when we talk about the legal and ethical issues of doing something like that, as we know, because I said as it is very heavily regulated. So we have to ensure that things are done in a way to protect the consumer. So what I've done here, I've got some numbers here, okay? And we're gonna run this example in just a second.
So yes, in financial services, we love our tables and spreadsheets and charts. Okay? So what I've done here, and I'll tell you here, so we have the, on the far left, the first column there, can I just move over here, make it a little easier.
I feel very constrained here. So on the far left, we see here we see our technical indicators. So this is the ones we bring in, here's the spy, the s and p 500 ETF. So we have a 30 day 60 day CCI, commodity channel index, average directional index, moving average convergence divergence of what?
Mac, D and RSI. Now you may have never heard of those, but these are technical indicators. And what they're doing is they're putting statistical numbers onto a chart, a graph. And normally you'll see that on financial charts. So what I did is I trained this model, it took nine hours and every agent requires every stock requires a different agent. Okay? So I cannot take my s and p or my spy agent and then apply that, let's say on the queues. So that's another index or the DIA, the, the Dow Jones index.
I cannot do that. So you have to train an agent for every single one. Does that make sense?
Yeah. Okay. So here we look at the annual return. That's what everyone wants to know. So during this timeframe, which from come all the way back over here was the 18th of, of January, 2022 to the 22nd of May, 2024. Now you can ask the question, why did you pick these days? So normally those indicators require at least 20 days. So I started from the 1st of January, so it took me 18 days to at least start getting some indicator data. And that's why that's that date there.
But you could have what's called a, you know, a bias here for lots of different biases that can happen here that, you know, talking about disclaimers, you could have a strategy bias, you could have the date bias, you can have what's called survivorship bias.
So basically, why didn't I pick the spy? Why didn't I pick another index that may be the Russell or another index that's no longer trading? Why didn't I pick that index? Okay? But that's the index that I have. So when we look at the cumulative returns, the annual return, we can see that two indicators work better than the average market.
Okay? So you can see the rest did not, but when you come all the way over here to the sharp ratio, you can see that the SP is 0.44 and pretty much all but one or two here actually had a lower SP sharp ratio. So in this case, because it's a ratio, you want it to be a higher number. So you remember, 'cause it's, you're getting a higher reward for every measure or unit of risk. Does that make sense?
Okay, now I've got three minutes, right?
Yeah, don't, yes. Don't worry so much about, well, yeah, you, you can continue.
Yeah, because
We have, okay, so I put this into a plot here showing that there, so one of the things that we look at as well is that we look at drawdowns. So if you can see here the drawdowns. Now what I wanna bring your attention to is you see these flat lines here, up there. That's when it went to cash. So what it basically is done saying, I don't think the market's good to be right now. I'm gonna go to cash. I'm gonna take all my money outta the market and sit in cash. Now did it make the right decision or wrong decision?
Well, only, only time will tell, right? So this is where we can see it's got some, some, some time that it's set in cash. And we see the, the, the, the net drawdown, how much it dropped, how long it took from peak to from valley to peak, and the recovery time it took, and how many duration of trading days, or not trading days, but calendar days it took to re to recover.
Now, alright, I'm gonna put on, let's just second here. Okay, what I wanna do now, now I'm gonna put this back over here because I'll need my hands,
Okay? Just
So you know, we, the next session after this yes. Panel together.
So take my time, take
The time it feels comfortable, show it,
Yeah. Okay. Alright. Panel
Afterwards there is a live demo.
Okay? Yeah. So I wanna make sure that have I give the guys a live demo and show you guys what it works.
So what what I've done is, is I've taken the agent that I trained prior to coming here, and what we're gonna do is we're gonna get some historical market data, real market data. Now I've got some proprietary proprietary technical indicators that I will not share with you guys, okay?
So don't, don't feel too bad about that. I'm not gonna be sharing those. That again, is proprietary, but I've got some basic ones that you guys saw that come in. And so I've trained the model. And then what's interesting is you can run the model. And this is what I was talking to Marina beforehand because as I demonstrated to her is that you can run it and then you can, you can run the model itself and it will give you different results every time.
Because again, it's looking at different states and it's looking at different actions.
So it doesn't always look at the same state, the same action. So it will give you a different result in different, with the same data. Okay? I'm actually using this in my company. I've got a small fund with investors and I'm using this now, as I said before, what I've done, I, I could connect my algorithm directly to the, the broker through an API and let it trade on its own.
But I, I don't see that I could, if I was to something were to go wrong, if a regulator were to come in and ask me how did what happened here, I wouldn't be able to explain it adequately. So rather than having a human in the loop, that was the term that, that I, I've used yesterday I came to the conclusion that is not, because it's saying when you're in the loop, they're just letting you know actually what's happening here is I've created a dashboard and the dashboard, we look at it and then we make the ultimate decision so that we can say, yes, we made that decision.
I felt that that was the correct. So as I mentioned, it's like I hired Quant to come in and do all the research and say, you know, James, based on what I, my research, this is what I think we should do today.
I should, we should buy or we should sell. And this is how many. And then I make the ultimate decisions.
Yes, I agree, or no, I disagree with that. Does that make sense? I think it is a level of accountability and responsibility to our investors because we have to maintain that. So that's the disclaimer because like I said, there's some lawyers in the room and I don't want to get into any trouble too late, too late for that.
So as you can see, it is revolutionized finance. And really my journey to moving, like I told you my background was stock market trading. And in 2000, the fourth quarter of 2018, we, we had a hit in our fund and it was all the algo traders.
At least that's what was on the news. And I'm the kind of person, like, if I don't know something, I'm gonna go find out.
So it, it kind of pissed me off. So that started my journey and I mean, you know, I didn't have any formal technical training, I mean other than studying and I have a knack for trading Love numbers do really well with that. And then that ended up with me getting a, a master's in data analytics and, and ai and it, it's just, it's, it's really amazing that you can use AI to do all the work that I used to do manually that would've taken me hours to do is done in minutes, it's done in absolute minutes.
Reports I used to generate for clients, press a button, go get a cup of coffee when I come back, the reports done, it used to take me five days to do that report and it goes and gets all the data that I need. So it is revolutionizing the industry and again, it's gonna be an exponential. We talked about this exponential change. There is an exponential change.
You know, we look at what, what is that long-term effect gonna be? That, of about that, you know, we have to be concerned of displacement, you know, how many jobs are people gonna lose? But you know, is it gonna create new jobs? And then are we just gonna have algorithms trading the markets? Is there gonna be no longer any more human interaction? Is it just gonna be ai?
I mean, there's AI bots that are trying to reverse engineer, let's say for example, Goldman Sachs trading strategies or Morgan Stanley's, right?
So I could have mine there and they could be trying to reverse engineer my model and, and, and find its, its its strategy.
But again, most important thing is that reinforcement learning here and the reward function. One thing I wanna say about the reward function with the reinforcement learning as well is that when we start looking at the, at the metrics of the strategy, if you look at the one big one for me is if, if I were to buy and hold, could I, does the, does the strategy make more than a buy and hold? And if it doesn't, then what do we, what are we doing? It doesn't make any sense. I might as well just buy and hold, right?
It seems very intelligent to do it, but at the end of the day, it should be just maybe buy and hold. But equally, when you're training the model, it can decide, it can be buy and hold.
It can just buy and hold and never trade. So you have to put in, into the reward functions, different weightings and different actions and in order to get to incentivize it to do something right?
But again, you wanted to do something with the maximum reward and the least amount of risk. Okay? So now what I wanna do, and I've got anyone want to contact me, I'll be around, I can see that my name there, my email address is a very bad color background there.
But if, if we can switch to my, my, my laptop now, please. Okay, so you guys are familiar with Jupyter Notebook?
Yeah, maybe. Okay, so I've, I've pre-run this and I'll just, lemme just restart my kernel. I'm gonna restart and restart and clear everything out. So I'm gonna bring in my necessary Python libraries in order to run this.
Now, as I said, I here I've got my indicators and I want to open up here, one second here.
And I want to go to web platform, okay? So when we look at the charts, this is what we're talking about here. Just so that, just to give you guys a visual representation, it'll come soon, eventually, okay? While that, while that's running here, you can see I'm gonna bring in my own indicators. I'm gonna get the data and then I'm gonna have the recommender give me the recommend what to do.
I've got some FIN rl, which is a library for FIN Financial Reinforcement learning, and they've got some, some stats there. And then we're gonna do some plotting. So I'll run that. And then here, like I said, these are the, the ones we're gonna look at the Mac d, the Ballinger bands, which is, again, it, what that is, is it's, it's showing what the mean is and two standard deviations from the mean. And in this case it's the two 20.
So it's the 20 day moving average with two standard deviations, which means it's 95% of the observations fall within two standard deviations.
If it's normally distributed, we have an R-S-I-C-C-I, the average directional and the 30 day, okay? So what I'm gonna do now is I'm gonna get the data. So that's gonna be running and that's going to the market now.
And, and, and I've got an API to collect that data. And that's again, it will come up here and, and add all of that.
Okay, let's see here. I gotta pay some money there apparently.
Okay, so that's not the one I wanna look at. Let's go to the spy.
So you see all of the, these are Bollinger bands here. Here's some moving averages. Here's our stochastics, here's our MACDs, RSI. So all of that is a visual representation of the numbers that are going into the model. Everybody with me on that? Okay. So it's successfully added the technical indicators now, and this is the data that's gonna be going in apart from my, my proprietary indicators.
So the date, the open, the high, the low, the close, the volume, the vix, which is the volatility index, the Mac d Bollinger Band, upper lower band, upper band, lower band, RSI 30 day CCI I 30 day DX 30, 30 day, simple moving average and 60 day moving. Simple moving average.
Okay, so now I'm just gonna do a trade date. So let's just pick a date you guys. Gimme a day. Any date that you want me to do? Last Monday. Monday. So last Monday was what? The third.
Okay, well that's Monday already. It's already there. It's already there. I knew you were gonna say that. People are gonna think that I, I had you when you come into the room, how, wanna pick another date, guys?
Any, any other date
Post of
The what? 1st of June? The 3rd of June. But that's already there first, first, 1st of June.
Okay, is that even a trading? That's a, that's a Saturday, isn't it that? Yeah. So I'll do the 31st of May. How about that? 4th of June.
Okay, alright, 4th of June. So run that. And it's saying here, I I need to sell 14. So that's how quick it comes back. All right? Obviously it took me nine hours to train this. So as I mentioned, any, any one that, any agent that you use, you have to train it individually for every individual equity. And then you can ask the question, well, how much do I, if I want to have, let's say 10 different stocks, how much should I invest in each stock? You have to train another model decision to be able to tell you this is how much you should have percentage wise every day.
So you can use things like modern portfolio management.
So you can use like, for example, efficient frontier or things like along those lines. And that's basically efficient. Frontier is taking all of the, it's the sharp ratio of your entire portfolio. Okay? So then you, you allocate it there. So what I'm gonna do here is I'm gonna go from the, so I'm gonna go from the 6th of May to the sixth of, so let's, let's do the fifth because today is the sixth.
So if we do yesterday's, the fifth to the fifth, okay, so what I'm gonna do, and I, and I'm gonna, I'm gonna put a timer on there to, 'cause if I ran it, it would just instantaneously run. So if I run it like this, you're gonna see every day it's telling me what to do, how much to buy, how much to sell, and here's the date. So it's going right through there.
And that's 'cause I put like, I put a, a half a second pause on there.
If not, it would just go and just show it straight up. So it, it's, it's very, very quick.
The, the, you know, the velocity of how fast this moves is, is, is sometimes it's, it's, it's quite astonishing. And so here I'll just run that. So at the end, I'm only holding 35 stocks of all of these trades. 35. So what I'm gonna do now is I'm gonna bring in another library. And what I'm gonna do is I'm gonna visualize this for you guys. Are you guys okay with the first of the first 2022 to let's go to yesterday's date. Six
The fifth, okay, we'll start with a hundred thousand dollars. We cannot short and we cannot leverage, we cannot borrow in this. Okay? So that's what I'm gonna do now.
Now the issue is, in this particular case is that I'm starting with a hundred thousand cash starting investing where I'm gonna compare this against the benchmark and it's gonna invest immediately it's a hundred thousand. So what I'm saying is that I'm not really comparing apples to apples to a certain extent because it's not fully invested. So what I'm gonna do when I then compare is I'm gonna give them the first month here, the first 20 trading days, I'm gonna take off the first trading 20 trading days. And then we're gonna do the analysis on the return. Okay?
So I'm not gonna pause and so I'm gonna run this here. So the count value is the green, the benchmark is blue, and as you can see the dates down at the bottom, it's running through,
Oh, sorry, yeah,
Microphone. So you can see it's running through.
Okay, let's see. I'm always interested to see who's winning. It's like looking at the, the, the, the, the races, you know, the, which am my dog gonna win or, or my horse, you know, drunk, drunk horse
For taxes and trading.
Oh, sorry,
It does account for trading fees, but not taxes.
We can repeat your
Question.
Yeah, so you're asking if this accounts for taxes and trading fees
Question. It looks like the market's gonna wind up winning this in.
Okay, so there it is at the end, the market is, you can see is, is is blue? It's better. Yes. Question. I'll repeat it. Does it works.
Okay, I will repeat the question. So the question was whether the model counts for the cost of trading and for taxes?
Yes, it does account for transaction fees, if you can see here. Also here in my code, it takes in a just under one 10th of a percent when it buys and sells. So it's slippage. So that should be between, you know, do you actually execute the trade at what price? So you may not get the, the trade at the actual price. And additionally there's, there's commissions, but taxes, as we were talking earlier, I'm not a tax advisor. So you would have to talk to your tax advisor, but every jurisdiction is different, obviously, right?
So, and that, that is the standard answer. You, you're responsible for your, your own taxes. Am I okay with that one? Un under the law. Under the law legally, yeah. Very good.
Yes, thank you. So who won? So the market in this particular case, Juan, I could run it again and it would do the, you know, very much so let's leave it as where it's at. So I'm gonna take the first 20 days off and you can see here are the results where we have our benchmark and the market value. So we can see the benchmarks at one 15 and we got 1 0 6. So here I'm gonna get the account values and then I'm gonna now perform. These don't really make a difference until we get here to this one here. So the annual returns there, as you can see on the spy was 8% and this was 3.6.
The cumulative return is 20 and eight. You can see the annual volatility was 18%. So this is when we start talking about, so yes, even though it did it did better, is that it it when we look at a risk adjusted basis. So it has led volatility to get there and then we look at the sharp ratio, which is less, but if you look at the drawdown, it dropped down 22% where this one dropped just under 16 or just under 17%.
Okay, any questions on that?
We have
Questions from the virtual audience.
Actually, one of the questions is how the AI algorithms in trading impact the market liquidity and the volatility.
I'm trained a a very, in this particular case, I'm trading, trading a very liquid asset. So like the spy, but if I was to trade stocks that were very small amounts of trading, not, I mean it depends on your trade size and how much you have invested, but when it comes to the spy, there's no way I, I, you know, I I would see that my trades would, would cha would move the markets, but there could be obviously larger funds that could move the markets.
I trade in assets that are very highly liquid and very high amounts so that when I make trades, I don't move the market.
And there is one more question.
It's, oh sorry, sorry, there is one more question. Apart from the time saving, what are the benefits of using artificial intelligence and how real reliable it is in comparison with the traditional methods?
Well it is using all the traditional methods.
So what, what you would do in particular case, if you say in any, in this particular case, like I would look at how I would trade and say what are all the decisions, what are the factors I made to buy and to sell? And so you say, okay, so the decisions you make as a human, how can I put that into the machine? So I put those decisions into the machine and, but the way, and, and it very funny, it comes very close to the decisions that I would make anyway. And the reason why, it's because it looks at the very same things that I look at because those are the inputs that I put in.
So therefore it's very, very similar in that respect, reliability. It would, I would say that it, it's as, it, it's very reliable because it, it looks at everything I've told it to look at.
It's not tired one day, it's not hungover one day, as I mentioned before, it doesn't wanna leave work one day early. It checks every single thing that I have told it to check every single time without fail. Now that doesn't mean that, you know, I'm gonna, that's what I told you guys. The disclaimer here is you're not gonna be a millionaire by the end of this.
I'm really, I'm sorry to disappoint, but you know, at the end of the day when it comes to the stock market, the only one thing, and this is my 20 plus years of experience, the only one thing you really do in the stock market is risk management. That's it.
Okay,
Why don't we, James, if you're finished with the presentation part, why don't we invite Valentine up on the stage and, and Marina, why don't come up and we'll have our a panel discussion. Let, do I bring
This with Mike or is there Mike over there?
We we, we have mics here. Okay. And first let's join me in, in thanking James for a wonderful presentation before the panel. Thank you so
Much. This presentation was really insightful. Now for this second part of the session, we will have a discussion panel and join me to welcome Valentin here with us, along with James and Scott. And we will talk about how can AI help to deliver transactions integrity at the scale in the financial market.
Couple of questions just to follow up on the specifics on the presentation.
You, you, let's talk a little bit about regulatory 'cause that's a, the market itself is a creature of regulation. It's formed by regulation and then you have things like wash sales rules and other constraints on trading in the human context.
You know, the mar all of these rules and these markets are designed for human to human interactions over history. When you start to introduce AI and other infor, it's not just AI but more complex beyond human capacity kind of elements into the system. Does that strain the regulations?
What, how, how do we start to identify the new risks because the systems really are designed for human to human interactions and now we have this new thing. What are some of the ways that we can start to understand the new risks and, and create management of those in markets? And Valentina I'll ask you to think about that also in the, in your experience with payment systems, et cetera.
Well, I,
I would think that, or what I would say in regards to that, we've already experienced, not from AI but from an algorithmic trading point of view, where we have high frequency traders. I dunno if you guys have heard of high frequency traders. And what they do is they try, they trade large amounts of volume and they're, they're, they're trying to make money on nanoseconds.
I mean, just imagine nanoseconds, okay? And the closer the exchange they are, the better.
When we, the question in regards to liquidity and moving markets. In 2010 we had what was called a flash crash. And basically that market was brought down. And so regulators are, are, are trying to keep up particularly not only with the, the evolving markets as such, but equally the exchanges to maintain and to handle the volumes that are coming in because there are large amounts of volume that's coming in very, very, you know, the, the, the velocity of it is, is, is huge.
So they're able to handle that.
And I can tell you from an experience where I've done my own, I mean you saw that, that one there where I've done intraday trading where it wasn't as as sophisticated as let's say high frequency trading. But you know, one of the things is it moves so fast and you have to, in your code, hard code in the exits. 'cause if you get in quite easily, but all of a sudden it's like, oh, how do I undo that?
I've, I've actually done something wrong or there's something wrong in my code. But, you know, compliance with, with regulation, if you wanna be in this business long term, you, you have to comply.
There's, there's no, there's no ands ifs and buts about it. I mean we have fiduciary responsibility to our clients and I, I feel very personal, personally responsible for clients when they gimme money. And I say I treat it as it's my own money. And so I know that not everyone does that, but we, we have to comply with, with what the regulations are and what the regulations will be. And I do see that more regulations will be coming in with more, as more AI is coming online.
And Valentine, similar question in the payment system area, and I know you were involved in yes and gain initiatives previously where banks were getting together to try to extend their markets but also de-risk together. Are there some observations you have about how people in these nor human to human situations can deal with things like scale and AI and these complexities? So
First of all, I agree.
We, you have to be compliant. You have to fulfill the, the, the legal regulatory requirements and that leads to where can you really use AI and in which form. And I think a lot of people when they think of AI think, oh let's include JGBT or co-pilot in our products and JGBT copilot usually access to a huge amount of information that I don't control, including wrong information. So that leads, sometime I did tried legal research with with JGBT or copilot, it invents paragraphs, it finds paragraphs that don't not exist anymore, et cetera.
The point is, the better you control the data that you put in, the better the results are, the better you can control where you go. Simple example, customer support. You can put in the information that you want the, the AI to use.
Klarna, one of the biggest fintechs actually is focusing a lot on this. You can get quite good results in responding to any demands. Another sector where could be interesting also is, is risk analysis when you feed the algorithm or you feed the, the technology with certain information. 'cause the technology processes way more information in way quicker time. And you said it earlier, you put all information, you put the decisions you would make and the technology processes them way faster and helps of course to to scale faster.
We have question?
Yes, we we have a, a question from from the virtual audience again, I would like to say thank you for engaging. The question is, do you think that the EU act will affect the use of AI in trading?
Yes, definitely.
Just yes, right away. Yes.
I mean, well I mean you, you you saw the, the, the, the, the, the risk triangle as I call it. You know, when you you as you go up to the triangle, a higher risk and you know, financial markets to maintain stable and consistent markets, it's, it's really important that we, we maintain the, the, all the AI that it, that it complies and it doesn't unintentionally break something, you know, I I say unintentionally, I mean 'cause there are, there are bad actors out there obviously, but I would look at that, that the EU AI act, I know it's, it's just getting started.
But I I I know that they were saying in one of the sessions they were saying in den our Colorado, they've created a, a similar artificial intelligence act. But ultimately, you know, are we, are we regulating the, the algorithms or are reregulating how it affects people, right?
And I think what we're looking at, particularly from my understanding from the EU AI act, is how it affects people. So if someone goes in and, I mean any financial advice, this is another financial advisor coming outta me, you know, how do you invest, how do you diversify?
What what is your, you know, your risk tolerance, how do you invest? It's not like this is the, the golden ticket. And sometimes when we look at how we present it, I think a lot of times individuals can see, well this is, this is going to make me a millionaire or what have you.
And I, I lecture in, in, in university and, and students will do their, their a their, their, their AI models or their regression analysis and it, it gives back like an R two score of like 99. And it's like, well let's put that in the real market and see how it does and it doesn't do well and let's call overfitting. 'cause it just memorize the pattern of the, the underlying data that you trained it with. And as you said there, you know, you put the, the data you put in garbage in, garbage out.
So I mean, it it, it is quite robust how the ai, it's like how, what inputs are you putting in? How are those inputs interacting with each other to give the output the, the desired output that you want? So I hope I answered that. I think I went a really long way to
Answer that. I think. So Valentin, do you have any comments on this? I dunno if in, in, in your work in experience, maybe you deal with this already or not?
Well, I think the transactions, right, which is that what
Yeah, like regarding the same question with the EU act or I just pass to the next question because there is another question here. I will go to the next question then.
Okay, so the question here is the regulations are the same in any regions because the stock market is only one. So, oh, does, that's actually
Okay.
I think,
Yeah, yeah. There are different regulations in different jurisdictions. I particularly in this one, I trade in the US markets and I have to comply with them. But really there, there is a bit of a convergence when it comes to publicly listed stocks and exchanges.
There, they're very, there's not huge, huge difference. I think the main differences come down to taxes, different jurisdictions and taxes.
Yeah, and I've thought about, so in a year everyone's gonna be using this or they'll be disadvantaged or, or whenever that happens. So a question for both of you. In the financial world and in venture capital now Valentine, you have certain indicators that you're using that have been established in these markets when everyone is using ai. So we have a whole vastly different dynamic. Betas are different, everything is changed, the arbitrage notions are different.
How do we take from venture capital perspective, financial analysis perspective, you're doing risk analysis, you're trying to figure out project the future. But how do, how might we start to develop the tools, putting aside the regulation just on the private side to anticipate deciding where to invest in both cases.
What, and, and for both of you, in the different regimes of venture and public markets, how might we start to ingest the different types of risk that are happening from the proliferation of AI fueled analysis in these markets? Valentine, is that something that you started thinking about
When I, when I heard you, I was thinking, do you consider that others use same AI models? Right?
Does it, how would you reflect that? Others use similar models. Same models and decisions are the same. So how would that influence the market?
Yeah, I think from the financial sector and also from now venture capital sector, we don't depend on others. We do our own analysis and we use the technology to be faster, to be, to scale, to process more data, to use additional data. So if somebody else uses same, same technologies, super fine doesn't impact us us too much.
For us, it's important. We can act faster, we can maybe act more precisely, we can add more information to get better results. And that is actually the, the, the interesting part at moment.
And it's, and just before you have this try at that one, the, because you're dealing in the retail markets, your venture fund is in restaurant industry, there is still that human factor. And so human analysis of the data for retail still it's humans thinking about how humans are gonna buy coffee or other things that are retail in a, when it gets to be more abstracted into finance.
There's still obviously human behavior under it. But that's what I'm wondering is when you, as you get increasingly disconnected from the initial interaction into abstracted financial interactions and both areas are dominated by ai, it feels like the abstractions will be less and less cognizable for the humans.
Well, I mean, it, it, the, the, the people trading the same strategies, looking the same indicators, trading the same markets. I mean that's been going on since the markets existed. But you know, obviously now, as I said, it's, the velocity of it is, is quite extraordinary. There's an exponential growth in this. But I mean really when you look at, for example, I trained that model and now it looked at certain inputs, but it made a different trading strategy.
So even though we look at the same inputs, we may have different trading strategies, but you know, you have loads of different, different, not only just equities, you can trade commodities, currencies, cryptocurrencies, that there's a lot of, there's, I I would say there's, there's enough out out there for everyone. It's not, it's, it's not, it's not one. But you know, when you talked about, like for example, the arbitrage there, I think if we think, well we're, we're gonna beat the big boys, it's really hard to beat the big boys.
The markets are efficient.
And I think we, you talked about, we talked about this earlier, it's like I see that with the, the big boys are trading, it's like a wave. I just get the surfboard and ride the wave. I'm not gonna try to, to predict the wave. I'm not gonna try to fight the wave as, as, as I know, you know, Dr, Dr j John and Jerry in the US and he says, we don't trade the markets we want, we trade the markets we have. So we just have to trade what's there.
And that's where we, we look at, you know, the ai, now when you train the, the models, you know, the main thing that people want to know is like when you train it, well what happens when there's a market crash? How does your model do in the market crash? And it's like, well that's really an anomaly or an outlier event, right? It's a really, and it's, I I know that there's people that will predict it, but you know, as I say, if I have a broken watch, it's right twice a day.
So it doesn't mean, you know, you might have just gotten lucky that it did what it did, but it's just managing the risks and, and staying within the confines of, you know, your investment strategy and sticking to what you know, what the clients are looking for. And you should be okay. And the law, of course,
It's, it's really such a, just to contemplate the changes, it's really boggling. Mind boggling.
One of the things that struck me, you were talking about the reverse engineering of Goldman Sachs and you know, so I I'm thinking about the comparison of pro proprietary strategies, which you don't let people know and black box of ai, which you can't know. And so I'm wondering if you have start to have the, that unknown, first of all, you can't assign causation. So from a regulatory perspective, you can't say that there was some intent on something and so much criminal behavior, negligent behavior has to do with, was there an intent?
Well, when it's proprietary you can get a court order or something to go see what was going on in order to gauge what the idea was. In a black box, it's simply not possible. And so from a, from a market perspective, we start to have these things that are just unknown. Will there be new derivatives that will have, I mean, 'cause you have these entirely new risks that no one can know, no regulator can know. And how will we, how might we protect against those new risks in, in as a collective?
Is it, will it, will there be new instruments that will be traded to trade on the new risks that result from the way in which the trading occurs?
Well, I mean, in the frontier of new products, I mean you see, you know, I mentioned cryptocurrencies, there's NFTs as well. And one of the things is if you look at, you know, we talk about regulation.
The part, what you're really concerned in regards to trading is counterparty risk. And that's where exchanges bring that counterparty risk and remove that counterparty risk and make sure everyone's playing by the rules and they have liquidity to cover their trades. But you know, like you, the latest derivative as we know would be like options trading. And that was in 1973.
And we're seeing already that that, you know, there, there is stuff that's trading in black pools as it's called, and if we bring those to the light, but I think that trading algorithms, that would be an interesting thought, you know, that the actual algorithms itself and how it trades, but I, I don't see how, how that, that would become mainstream at the moment anyway. But it is a new world we're living in and things are changing quite rapidly.
Yes. And we have another question from our virtual audience.
What are the changes that you expect in the next maybe two years in the finance service for the use of ai?
The changes that we expect in the next two years in finance transactions?
As I said, where I see a lot of artificial intelligence being used in fintechs or in financial institutions is the customer support where it can process data faster, can respond to more requests in a shorter time and also a little on the compliance side when analyzing data, KYC, et cetera. I think that is also a part where you can use AI when it's well-trained when you give it very specific tasks and it can support the human decisions of, for, for example in ai, in, in KYC et cetera, it checks can verify certain strategies of, of maybe also scoring when you, you credit scoring, et cetera.
That's also a section where you can add more information, have the AI process more information in shorter time and help very sensitive area with credit scoring because it might have a very strong impact on people. However, if it's well-trained, it might, AI may help you.
Now that you mentioned this, what comes to my mind is that when banks started using AI to say, okay, we assign a loan or we assign a mortgage, one of the questions was, is this really explainable? Can people explain what AI is using in the model to give an explanation on why they assign the loan or not?
And, and, and one of the, I remember like one of the booms that was in, in all the YouTube videos talking about that was if you go to the bank, can you ask for a loan? And they said no.
Okay, what's the reason? And they don't have a reason. So then it's kind of being blind. Do you think that it is changing or it will eventually change in this kind of transactions?
I was thinking in the same what what you just said. If you go to a bank and the human takes a decision, sometimes you don't know either. I think it's, first it's important to define the products very well and be very clear about where AI comes in, why and what, what it does. We had yesterday, we won't understand the technology.
ai, not, not everyone. Very few people will understand that language.
However, we understand the outcome. We can control where we include it, but it'll also open new fields. I am now in the restaurant technology sector looking at, at, at, at this area. Nowadays it's very hard for restaurants or restaurant owners to get credit with AI because banks cannot process information. They don't know the information, which information to use, which with AI there might be different, there will be different factors that a bank can consider and find different ways to score.
Do credit scores on the merchants.
For example, if you get the, the data from the PS systems and you can be very clear about transactions of that restaurant, it helps you to do a better scoring of that restaurant and see if it's well run, if it prepares for big events, if it, if it's, yeah, if, if business is done, done well. So that could help also then the bank to assess and say, okay, buy an pay later for restaurant owners and give them a credit, et cetera.
So that's, that's something that we see where, where AI will actually have an impact on, on concrete markets. Thank
You. So I think in our last couple of minutes here, last question I'd have for the two of you is, and this is an impossible question, so don't feel bad.
1515, that's a disclaimer. 15 years out, 15 years out, so the year 2040, can you give us some positive imagery of the areas you're working in right now, what that experience might be like? So it's a projecting out so that we have a positive narrative to look towards in the world of financial markets, in the world of restaurant and, and venture capital. What might we aspire to?
I said it yesterday, I will repeat it. In my view, people are thi still doing the thinking and AI is assisting, helping, making them think faster, making preparing information faster for the thinking.
However, the ultimate decision, the thinking, how to train, how design, that's still, people are still thinking and not laying on another sofa and everything is happening around them. Yesterday I cited the movie Wally, where people are in a floating chair with a screen talking to each other via screen and not doing anything, maybe going to the sun spot or to a massage.
But, so that's the exact opposite of what I expect in, in 15 years.
Okay.
I think, I think for my, you know, this, this was a common theme yesterday was decentralization. And I think that when decentralization in regards to financial services, so if you say, well these are my financial goals and how should I invest? And then you say, okay, well make me a, a, a bespoke or personalized portfolio that meets my needs and my goals and my objectives.
You know, when you look at, when you look at big firms, and I used to work with JP Morgan Chase, so one of the things is that they make something, I think like the industrial revolution, it's like you gotta pump out the numbers. So you gotta create the same thing that it's, it's, you know, you, you, you that, when I talk about the bell curve, you fit 95% of the people, but what if you're not in that 95?
You're the 5%. Well we can't do anything for you unless you're ultra wealthy and you can pay someone to do this for you and they'll make something bespoke.
Where I see the AI will be able to assist people in their financial goals to take into account their, what their goals are, their objectives, their timeframes, their risk, their, their, you know, their risk tolerance. And then be able to ad adapt and adjust to that to make something very bespoke for them, personalized to where they are. And that's where I would see that, that decentralization and allowing individual people to get that bespoke service that would normally be available for people with lots of money, that'll be available for everyone.
Excellent. Thank you so much.
Thanks Valentine. Thanks James. This session was amazing and well please join me in thanking our participants here. Thank you so much for this panel.