 Hi everyone, it's MJ and I'm here with Yuri who many of you might remember from the channel which we did a Yeah, when did we do that last interview? December? December slash January. December slash January. The reason why we did it is because Yuri unfortunately decided to abandon Abandon actuarial science and instead you are now pursuing Well, I'm seeing here department of just mathematics and applied mathematics Is that like the new so you know the department of maths at UCT school the department of maths and applied maths The two are technically separate, but one department Okay, okay, and I mean first off how does it feel leaving actuarial science like is they further? To be honest, I think it was the best decision ever the best Although my year was very intense and probably my most intense year since I've been at varsity Okay, it was definitely much more enjoyable. That's so much more fun doing it All right because I mean this this is the thing is some some people find that actuarial science isn't for them and they either move to Accounting data science pure statistics So yeah, it's nice to see another thing that we can jump into if we find actual sciences and for us Yeah, well, I kind of want to go into mathematical finance I just took a route around which would you raise it? It's basically XR Yeah, I mean none of this a or m proff com stuff there fair enough fair. I still didn't think it was this year Okay, so that was great. Yeah, it was the best XR course. I've done at University Well, this is the thing is actual science has got a bit of like a an umbrella to hold bunch of various topics Yes, and I mean the one thing that I really like is I mean mean variance hedging that is subject cm2 What we did is CT 8 point South Africa we refer to it as a 2 and 4 There's there's a lot of different codes for the exact same I don't even know the codes at all. So I'm just like which one is that basically financial engineering Okay, so so yeah And then what I like is I mean and this is why I've included the actual tech logo is you know, this is Yeah, working with is we looking at technology with actual science and I mean neural networks are I don't know I really don't actually understand that's what what I'm hoping to just fine. Let's see if anyone understands Well, maybe maybe maybe give us before we before we get into your whole topic because it's me variance hedging with recurrent Neural networks in incomplete markets. I mean, that's not that's that's like a sentence. That's not like a heading That's like a sentence originally. It was actually longer was it longer because this top the heading now is basically So there's three chapters in this project. Okay, and it's the last chapter Is on this? Okay. Yes. So originally it was I think the mathematics of arbitrage and Mean variance hedging with recurrent neural networks in incomplete markets That's way too much of a mouthful and I think this captures the essence of where I wanted to get to you know The big things are that Everything else is just building up the mathematical intuition behind trading and everything else Okay, so I mean before we get into trading and hedging and incomplete markets Maybe can you just give us a quick word on what exactly is a neural network? Okay, so like in simple language simple language simple language. So it's basically a system of functions Okay, that are universal approximations. So if you have some sort of function You want to approximate neural networks? There's a proof in my thing as well about they can basically Approximate any continuous function. There's there's a lot more functions. They can do approximate but for my case specific I did the continuous function version. Okay, so so correct me if I'm wrong But neural network tries to find the function that links input to output. Yes Okay, cool. Yeah, but a lot of those Looks like spiderwebs with a lot of like Okay, okay, and now coming to I mean mean variants What is what is your opinion on mean variants? Do you see it as this is the framework that defines finance or do you see it simply as a model on which to explore? For this case specific, I just needed some sort of model So the code is actually written in a more general way so that we can add different cost functions at the end Okay, so a lot of papers have been written on mean variance aging Which has a lot of criticize? Criticisms because it wakes losses and gains equally, but yes That's not really good if you try to make something like you don't want to necessarily make profit Do you want to try to get as close to possible to the payoff? But obviously as a company you risk a verse you don't want to take these losses There's a lot of criticisms on it But it was a great framework to at least begin the research Yeah, because yeah, I mean just just for those who don't know mean variants is a Framework for portfolio theory that suggests the two things that investors are most interested in is the return given by mean and Risk given by variance, of course the mean here is isn't an absolute term You know they would say 10% is you know better than say 5% Whereas whereas in finance some people actually prefer getting you know return in a relative Sales as in you know plus three over a benchmark and that benchmark being inflation or something else Because there's no point getting 12% return and then inflation is 15% and you've got a negative three real So the one criticism is that the mean here is too simplistic and the other posture is the variance is As you was referring to it. It's not that we dislike Variants or that we dislike risk. We dislike downside risk Yeah, so if something's got a probability of going below We're unhappy with but there's a probability of it going above We super stuff. Yeah, and this but this framework doesn't doesn't capture that Yeah, and then the other one weakness of the mean variance Theorem is that it requires co-variance is which are normally quite difficult to obtain you using your empirical Data, but with that said and done Very quickly on on hedging. I'll give like a very brief thing and then Chop in if you think that there's there's more to be said essentially with You're gonna come in and explain what this thing is But no, so so hedging. I think a nice example is let's say you you sell a call option Which means you collect a premium and you give somebody the right but not the obligation to purchase a stock at a certain price hedging is when you try and Cover that position and the isling called the covered position where you physically buy the stock But if price goes down then you don't hit that zero more Exactly, and then there's also something known as the naked strategy Which is where you don't do anything and you just assume that additional risk and try and profit from it and then there's the stop loss where you try and buy and sell according to strike price and Then you can also do saying like the Delta hedging and all of that So I want to ask just very quickly. What what type of hedging are we talking about Delta hedging here? Is in like hedging referring just to the price how the price changes? Yeah, so it's more but remember so neural networks are quite black box, but we did compare it to Delta hedge black shawls. Okay, so that's at least the comparison But the neural network itself is a little bit black box. Oh, so it will it will determine what it should hedging what Yeah, it should it buys and sells and you can get a stock price movement and see how it's actually performing Unfortunately, I didn't put it in this actual thesis, but maybe we'll add some pictures or something We can do some little editing. Yeah, so this is some photos. Okay, to put in and then finally You can see it's a it's a big heading Incomplete markets does this mean that you're not assuming that the market is efficient or strong for me so it's not It's not really those so we'll characterize Something so there's two fundamental theorems of asset pricing The first one says that under no arbitrage an equivalent Martin Gale measure exists. Okay, and then In incomplete markets, well, let's just start with a complete market is such that every bounded claim is attainable So you can trade to get your payoff perfectly replicating it But obviously that's not very realistic in real life. You have no idea what the hell is going on and So that's incomplete markets. Not every buck not every claim is attainable. Okay, so how do we minimize our risk? Okay? Yeah, okay. Cool. Well, then let's let's jump into straight this big thing over here First of all, yeah, can you explain what this formula is in words? So they call this discreet Stochastic integral but okay, let's go with simplistic words So the thing on the side obviously that's just notation and the thing on the right. It's basically Phi over there this little guy. Yeah, that Phi represents your position hold in the stock It's a your whole two units and then The XK and XK minus one is the stock movement. So it X the price of XK minus one and XK so You hold a stock and if it goes up Then you're making that gain. So this stochastic integral represents your gains from trading. Okay. Yeah Basically the area and the little curve something like that same like that except now it's the screen time So it jumps Okay, okay, so and I see y'all you've done it now on September 15, so you just handed this thing. Yeah Yeah, I put it was due last week Monday. So I mean could push how many hours did you put into this? In the beginning it was actually relatively easy to like formalize the math behind trading and stuff when I started the code That was a nightmare. I'd spend my holiday Coated until like two in the morning every single day. What coding thing did you use like math lab? Or also most of this other plots and stuff as well front-end in Python. Okay, and then I had Lucy move who saw help me do the C++ Yeah, so we tried Python everything turns out tense plus us. Okay, it's very slow Don't want to let's not hate too much Don't want to be tracked down, but yeah, it was it was a little bit too slow, but it We try to use it for things like inbuilt gradients and stuff like that But we ended up just coding the gradient descent ourselves instead Well, I mean that this is the thing I had a friend who did a thesis also from UCT on predicting soccer You know that results and that that thing needed like 18 hours to to calculate the parameters every time This So this one is a dummy version of what I actually want to do didn't get because my computer suck But I just got a new computer actually But yeah, I just got my new laptop and I'm hoping to rerun my code at the more high-level and see Why don't you use it? Yeah, well probably as well, but I want to add all the bonuses foster that Just let's just you know, it's nice to test at least when I'm doing my tests to make sure the code's running fine I'm gonna use a cloud to test my code. So at least that speeds up my testing procedures. Make sure everything's going right But you're a lot. We ran into a lot of errors by mistakes big mistakes They also like I ran my code for like two days waiting for my results and they came back just NANDs errors errors errors errors And that was that was your your bad programming. It was me That's good. You take responsibility. I don't take responsibility, but it's also like when you think of the exponential distribution, right? What is a more natural parameter scale or rate? Guess is a good one. Okay, so Thinking about like arrival times a rate could be great, right? Yeah. So that's more natural, right? So the mistake that I made so I used the involved numpy Exponential distribution thing and they take in a scale parameter And so it was it's the opposite way around one over. Yeah, so the jumps are too much and I mean that it just felt natural to me, but I should have maybe read the documentation a little bit better So we call this model error. We call this modeling error. Yeah, just apply Okay. Yeah, well, let's let's jump into I think you don't need to go through this page or some thingy Talk to me about this is this important for the discussion because I know you said there's some boring math in the beginning And I'm just saying for maybe your community. They might not enjoy too much. That's I mean, so it's important It's just a just an overview, but I think we've spoken about already like I formalized some idea of stocks Then we have the expected square replication. We try to minimize. Okay, I mean variants and then Just the the two neural networks running concurrently. Is this is this the neural network? Yes, so So a lot of times I did see people use N plus one neural networks for each trade. Yeah, each strategy has own neural network so what we did is We have the C parameter here that's Like it's the memory. So it holds some memory. So Believe like so Markovic Markovian processes just need a small dimension of a memory cell. Okay, and something with that you need more Memory for you can increase the size of the memory. So so something like that could You know, like good models mean reversion Momentum stuff, I guess it's something like a memory cell could supersede that Okay idea. Yeah, and then the other neural network is just to predict the trading strategy what position you should hold in the stock Okay, okay. Yeah, so I mean coming coming to that what you're talking about there the mark of because the market of property is that The only information I need in order to predict the future is the present Yes, the fact that the entire past or the entire history is contained in the present Pretty much now is this memory cell saying that's not necessarily the case So, no, no, so if something's Markovian, you don't need a big dimension a memory So she don't need to hold a lot of information. Okay, so that just takes relevant information of like the now You know as small increments possible But if you have some sort of process that has you need a lot of information from the past data Then you can increase the size of this memory cell. Okay, and holds more information And is there I mean, I'm just trying to think what what examples of other information Would you maybe hold like the price the day before or so it depends off of what you want to go Okay, some stop. Maybe let's say you're trying to edge something on Weed forms or something. Maybe it can keep into account the weather Some not always but I mean, that's quite interesting things to think about here. Okay, that opens up quite a lot of modeling possibilities So, okay. Nice thing about neural networks. They're actually pretty flexible. Okay, not too bad Anything else you want to talk about over here? Well, we'll get to it, but so what what allows you to actually Minute like does a parameter thing exist such that it actually minimizes this function. So the first one is The projection theorem, so there is actually a trading strategy such that it minimizes this error and then from the Universal approximation theorem you can further more proximate that strategy with the neural network. Okay. Yeah, that's not confusing Let's go. I must say this is I'm definitely over my over my head. Yeah That's what I'm saying. I'm talking with you through not me Just trying to go through it myself. You're like, hey everyone. This is Yuri's project Well, it's yeah, let's discuss it. So, I mean, you know, this is this is your content. I mean stochastic processes Yeah, well, so I'm hoping everyone knows that yeah, we can skip chapters. Yeah, so we can skip I mean, that's basically a random variable that changes throughout time. Yes Martin Gale that is the current value is the best estimator for the future Yeah, intuitively as But in finance only we use like sub Martin girls because we are left with a force of interest in that Yes, because it has the upward So but remember that when you price something You need a Martin girl because it can actually be shown that if you're not using a lot of girl measure There's all the time. Yes, and with the fundamental theorems, as I said, like no arbitrage means they exist a equivalent Martin girl measure and you use the Martin girl measure to price Okay, okay, so it's important. It is important. You don't even know what the Martin girl is. Okay And then so that's chapter zero so we can basically done chapter zero. Yeah, chapter zero Chapter one theory of derivative pricing in discrete time Is this something that you want to spend me some time on like when we get there? Yeah, I think we can spend some time we can skip over binomial model anyone familiar with Stuff and we don't really use binomial model to do anything further. It was just a a nice example of something That's complete. That has no arbitrage You know binomial models often just use just to it. Yes, it's very simplistic The whole idea is that she can either go up or it can go down. Yes, and you kind of Assume jump. Yes, so it's an rate going up and down Yeah, and then that almost all forms the building block of the black skulls Model, yeah, they kind of take that to yeah, they do take it into account slightly obviously with the continuous time Yes, it's can jump anywhere and You know how the sample parts are they crazy? Yes, those those are what those are like ito processes Yeah, those those crazy things Okay And then What does Alice T. M. Sanford I can't really remember but And then that's the recurrent neural networks, yeah, okay cool formulation, okay And we'll yeah, let's jump into and talk about this type of stuff So you can actually click on the thing and just okay You want to say there's a pretty picture then people can Can people access this paper online or is this like it's Like they can go find it on my links, okay, so there's I don't think there's a good quality version So I guess maybe I'll find some way to put it up. Yeah No, look, I mean, that's the thing the views are very small They'll they'll they'll be like hey, this is quite cool. I've been doing something similar or you can improve the chair or you Yeah, that'll be very nice like I would like some feedback on how to improve. Yeah, maybe how to do some extensions because I'm planning to do My Masters in Mathematical Finance next year and I would actually like to extend the sort of thing Yeah, and that's what I'd like to say is I've got the smartest audience on YouTube. Yeah, you think about it Yeah, I mean no one's smarter than that trees So yeah, we got the smartest audience watching here Okay, so like this this is the preamble It's interesting. Yeah, that's scary. Is that that filtration thing? Yeah, so this is a filtration. Oh, yeah, let's just skip it. Should show my tattoos Oh, you've got a tattoo of the filtration being yeah, you know We can do one we can do one glimpsing to it. Hey show some skin on the channel There we go, very cool and a brownie in motion and you're brownie He actually the guy who did that what does he know vine vine or wiener Vina Vina Vina he wrote a book called cybernetics, which I'm trying to get my hands on so yeah And all about your the future and artificial intelligence and it's taking over. Yeah, he was a smart boy smart boy that guy Okay, this is still the preamble preamble. Yes, it's long. Oh gosh. Okay theory of the route of practicing in discrete time Okay Looking nasty talk to me about this so Obviously, we need some sort of Mathematical description these things so obviously something gaining information or changing over time a stochastic process Best best way to go, right? Mm-hmm. So We have some sort of stock dynamics that follow stochastic process and the tuple with The filter probability space and the stock price is called a market. Okay, right? But we just run a price thing. So we simplified a little bit further and introduced discounted prices Yes, because it makes the mats clean, but they're equivalent. Okay makes the mats clean, which is very nice Okay And I mean is that Give me a quick book explain quickly why we're doing discrete time and not continuous time just for simplicity or so also just for More realistic approaches in terms of trading and everything, right? You don't trade every day or every split second. I guess and you don't have a computer that's doing it for you in continuous time Yes, unless you're trading crypto because the crypto market never sleeps But does something trade for you continuously? You can give those little but but I guess you're they're not continuous Yeah, they just discreet at a very yeah fun fun point Okay Keep keep talking here. Okay. So yeah We have a idea of a trading strategy, right? As we spoke about earlier It's just the amount you hold at a certain time up until the next time those are predictable So just means that at time t-minus one You know the trade to make for the period t-minus one to t. Okay Yeah, so obviously you have to make the trade and then either gain or don't gain and What you're trying to do is obviously hedge a specific pay off that only happens at the end And and tell me with with this trading are you also taking in consideration fees trading fees? No, but we were we want to extend it a little bit. We're gonna okay some maybe fees Certain things like that. We did take into account maybe like public holidays But that's just, you know, you take off the amount of trading days. So that was a easy But yeah, we we want to extend it maybe take into account fees But it's not very optimal to compare something like that to the black shawls model Oh, yeah, if you can't any fees or any jumps black shawls just can't keep up Which is a problem. Yeah, this big formula that everyone seems to be using Well, there's a thing is I mean, you know, despite it on its criticism. It's still still like the main thing is it's popular Yeah, I've heard there were there were a lot of mistakes in the first paper that was written about it But you know our life works if you the first one to get something out. Well, the best example is the fact that Merton and skulls Join that hedge fund long-term council management and stuff that big time Big time they were going wall and then what's that one in a million? There was your the Thai currency got devalued the Russian bonds defaulted and they basically got wiped out Yeah Because they kind of thought the market's not They're like that basically Cation, you know, and then they didn't realize panic spreads throughout the whole market and Destroyed them and that's what there's potential yours could maybe take them on in the future Okay, let's see hopefully I can do something big and people of the future will be learning Robots a slash Jordan model because you know, I would have I would have added in my Maybe we can work on something else Okay, so talk to me what's what's happening here. This is just for assumptions coming up I need some sort of bound on the trading strategy Also, just logically you can't borrow Infinite amounts, right? A lot of people just assume you can so it's just also just makes the math scheme Also, it's just intuitive Can't bound like can't borrow infinite amount of money, right? Yeah. Yeah So this is just bounding the trading strategy Yeah, and that final bound is just like right on the bottom of the paper That's just my assumption to make my proofs easier Explain what you mean by that. Is this just just the usual one that they use is the finite credit line We just can't borrow an infinite amount of money. Yeah for mine To make my proofs work. I bounded the whole trading strategy But what so what is so it's just there's just a bound on the trading strategy There's a finite amount that you can either borrow or is that just to make the computational easier That's for the model runs quicker or so in the actual neural network and stuff. That's not necessarily It's just for the proofs of existence Okay, okay I'll betrudge I'll betrudge is basically the idea of making a risk-free profit Yes, or having the probability of making profit in a risk-free. Yeah, so it's you start with nothing Yes, there's a chance of making a gain and then the probability of making a positive gain So is is greater than zero. Yeah, okay, and you are saying here in this section. We still financing Talk to me about the stuff. What's happening? Yeah, this is just a nice baby example Just to get it run into this idea of a overdrage, right? Okay, so you're just giving a yeah A little example a two-stock example there woman. Okay, so can we skip that? Yeah, we can skip that We're gonna probably skip a lot of us. Let's not talk about too much Matt. Let's go to the definition of a super Cool, let's go. Okay. Yeah, the probability measure probability measure. So we need this idea of an equivalent martingale measure Okay, something that makes the stocks dynamic a martingale because as we said earlier If you can't find such a Measure you can actually find an arbitrage. So you can make risk-free profit Yeah, so that leads us if you like score maybe like two more pages to oh Jesus all of this Matt's Matt I got you a little limit Yeah, so here comes fundamental theorem of asset pricing one so Under no arbitrage opportunities. Okay, there's a significant martingale measure. So, you know Okay, and then you give this whole proof. Did you come up with this proof yourself? No, I Read a bunch of papers, but I'm learning a lot. It's very interesting. That's great. I Mean, yeah, that just looks yeah, it's a bit messy. I wish I could come up with something Maybe in the future like I'm getting into it. I did come up with some proofs myself in this paper Like I said you combine the Jordan model and I can be your proof guy Okay, definitely. I'll have to make coffee while you try figure out the proof Yeah, but don't you know that's the they call that like the math them they say math and musicians or machines Oh, yeah, we're taking coffee and we output proofs. There we go. Yeah, so I can be the fuel stop. Yeah, exactly Good coffee Okay pricing and replication Anything here that's worth chatting about so it's just a so replicating strategy Okay, so it's something that Replicates a bail, right? So that's a thing you're trying to do. Hey, yes So that's it just getting that whole notion of what we you know, we're building up to this Haging trying to minimize your risk, you know hedge like perfect replication and There's also introducing that notion of a complete market, which is coming just now So in that the complete market is one where every bounded claim is attainable So that means that a replicating strategy exists for each bounded claim. Oh, you see not in real life So incomplete markets in complete markets. Okay. Yeah You've got some definitions. She got another example Yeah, we got to keep it Samples in us. They take up so that's this one. This one is Introducing the notion of what happens if you do have an incomplete market So turns out when you have incomplete markets, your sets of equivalent Martin girl measures is infinite dimension So there's infinitely many equivalent Martin girl measures and then you're no arbitrage price is actually an interval Okay, not one value, which a lot of courses and notes and textbooks assume that You know the law of one price So there's no such thing as the law of one price. Okay. And so how does that then? Influence your your paper So we're gonna be working in an incomplete market where there's some sort of band of prices Won't be talking about the bands, but yeah, so there's there's no unique price. So There's no Replicating strategy, but how how do you hedge in that sense or how do you price something in that sense? When there's this interval that you can actually get no arbitrage prices Yeah. Yeah, so obviously so it's gonna add to the complexity. Yeah So with the with this interval, right? If you if you the seller you want to sell as high as possible But if you the buyer you want to buy as low as possible what where's the middle ground? Mm-hmm. Yeah, so something like that. Okay, okay And then this is still the example. Yeah, it's all examples Oh, here we go. That's what you're talking about a market is complete if every bounded contingent claim is Attainable cool. Does that mean we can skip this? Oh, so he has fundamental theorem of asset pricing to oh, yes, number two Yeah, so this comes with the another characterization of more equivalent things so if Every bounded claim is attainable then it turns out that the equivalent the set of equivalent martingale measures Has cardinality one so there's only exists one equivalent martingale measure and that Results in like a unique price and certain things like that. Yeah, okay, okay And it's because you know, that's the big difference if we had to go Up to the other one who was that one There yeah, so non-empty So that can either have one or infinitely many. Okay, and then that's just the added bonus So it's under no arbitrage The mock is complete if that happens. Yeah Jumped it. Yeah, you jumped it. That's fine. There we go. Okay, cool Talk to me about this This is your proof I made it up So to be honest, I I read papers and I like I couldn't understand anything that was going on So it's like, okay, I'm gonna make that for proof for this mail the proof. Yeah, so I was scared it was gonna be wrong My supervisor said it was fine and just even more So it's a moist nation And then that came into the second matrix and stuff just explaining why this matrix is invert one I just made claims like boom. This matrix is You know, you know, this is like I've died now. He's probably a viewer out there right now He's probably like doing the maths in his head and he's like, oh Maybe it is wrong very scared. Please if it is like hit me up Put a little comment below Okay, so you actually did this that's impressive. Yeah, so I just took a arbitrary claim ages right you have this trading strategies on the rights and this matrix just represents the linear combinations of these things and Obviously if a unique solution exists the matrix is invertible, okay And the second explanation was just why it's where it's invertible because under No arbitrage and the existence of a unique martingale measure the second equation basically says okay That matrix must be invertible for that solution to be unique. Yeah Okay, okay Let's keep going Going down here. We've got the binomial. Yeah, everyone's bad dream Should we skip it because I do I am looking at the time We've got the formula one soon. I say what should we do this as a part one in a part two video? We might not be able to finish this like like let's let's let's finish this let's finish it. Okay, we should be fine We're gonna do this. Okay Let's get by the model. Okay, let's get to the meat. Let's get to This is the big stuff. This is the big stuff. This is the big stuff Yeah, but we can we've already spoken about a lot of this introductory stuff. Just minimizing this stuff. Okay Time a lot of simplifications. Let's go down So can carry on It's a lot of the the meat. Oh, so so here's one thing That I was talking about earlier just where the training strategy actually exists that minimizes this so we use this theorem from an analysis course, so we've see so this is the projection theorem so This looks cute It's not too bad. I learned this last year already. So it is not too bad Okay, so yeah, it's just basically saying that under this Scaler product that you have with basically that squared expectation thing a Projection exists onto this closed subspace, which is the attainable claims So that's the thing that minimizes the distance between a replicable Hedge and something that's not so you just want to minimize that error and then we go further down Yeah, well, let's carry on keep going down. Yeah, we're gonna talk about the universal approximation theorem. Let's skip skip Still far. It's not too bad. Come on. That's good You know when you see like little weird things above capital letters and all is only so much rotation You can use I know it just get them. Don't you suck it in creative? So let's see you can carry on carry on. Yeah Examples of activation. I mean this this is like first-year XR, you know, everyone should Everyone should be fine. Okay. Yeah on the next page starts Just at the start to the page there. So my mouse is like You can see it's this just the PDF is giving my computer this little ring So the universal approximation theorems for neural networks This is basically just saying can we approximate that training strategy that now we've shown exists, okay? And spoiler alert we can we can we can Okay, unfortunately, I couldn't But I think with my bad computer, but I can you can in theory, okay? Yeah, so it's basically just saying that neural networks are Dancing the space of continuous functions so So dance just means that the closure of that space is equal to the continuous functions So it means that If you choose a continuous function, yeah, you can find with arbitrary Precision a neural network that approximates it So you get as close as possible to this continuous function using a neural network. Okay? I'm gonna pretend understood that This is this I feel like you're my brain is getting like worked over time Hey, I think Too much for you man. It's a lot to take in first one. We go to the juicy stuff Let's let's carry on. Let's go see some pretty pictures. Okay, so silly. So let's go to just we'll maybe just do geometric Brownian motion Okay, let's do yeah, we'll leave it written model. We'll just keep it nice and simple So we can always we can always do part two, you know, we can be one of the people if this video gets a thousand likes We're gonna do part two Maybe then maybe I can re-run the model by then. Yeah, maybe not Kind of feel like starting new research now as well as those was No, you're you're on to something you've got to You could sell this to some hedge fund manager for billions I Don't want to make money. I just want I want to do Obviously everyone wants to make money I do something but I still I first one I'll do you want to make money while you make good stuff Yes, yes, that's that's the truth. That's the dream. Okay. This is something that I have fortunately seen before This is nice Done a video on this I should make a video I should make a video kind of explaining. Let's see if I'm right This is your drift parameter and that is your diffusion parameter. Yeah, so the volatile over other you've called it drift and volatility And yes, yes, I know that that's cool. You get this through. This is I toes Lemo, yeah, she to this thing. So you solve that stochastic differential equation. Yes, which And then you get this nice formula, which keeps the stock prices above zero. Yes Do you know I keep it by zero because you're taking the limb? Yeah, well, and then the little conquer. Oh, I say Lin. How do you say that? How do you say the natural is it? Yeah, okay, just I don't know people just check just check. Okay Talk to me about the pretty pictures. Okay, so this one So this one is just 30 simulated Yeah, so this is nice and clean obviously for the data nice like 25,000 But we didn't we don't want to picture up 25,000 balls like this. Okay, but the big thing here is we just try to make it relevant right so the stock price of 100 Cool The time period of three months. Okay, so we said they're 80 trading dates So that was taken to account public holiday. We can trade volatility of nor comma naught six and a drift of nor comma naught three So this is just a pretty picture of some stuff. What could have some go up some go down So sometimes this purple one did really well. Yeah, and then this red one didn't do to do to lack So obviously now you're trying to hedge a payoff on this But you don't know if it's gonna go up or down. So can you try you've got this little final doubt? Yeah, so we have there on the right some call call payoffs on These stock parts so you can see some white zero some goods like 110. So obviously the stock price Escalade, yeah, very far. Yeah, that's quite interesting that distribution. Did you expect that shape? Hey, not really. I didn't expect anything. I was just making cool plots and just seeing how things look should have not have been somewhat normal Because remember this is First is log normal. So maybe maybe it has some sort of thing there. Also, there's a bound at the bottom So once things go down, they just hit zero, right? Okay. Yeah, so it's a bit of a shift in there in that Okay, yeah, and then so this is just explaining what I'm just saying And then oh, this looks like I didn't actually change. There's a typo there. Let's not go back up Well, let's see if any of the viewers can identify the top. Okay, so it can go down Okay, what is this validation error thing? So this was a function I made to Obviously now you want to choose hyperparameters. So you want to run different models Just to see which one is the best So around a few parameters, which you've listed there at the top. So changing the seed I mentioned That's that memory cell. So one three or five and We could only run on my terrible computer neurons of 25 25 on each Which will maybe try and make it a little bit wider and then three activation functions So these are the best Parameters, okay, I got and that three sigmoid tan H 25 25, you know that that was the best parameters. So what you do is You train your set, right? You have one validation sets. We just check the error on that validation set it then Checked all of these parameters plotted the middle one and passes those the best parameters through to another training session after it's checked that And then trains it some more. Okay, so that's how I built this System here going obviously don't see the parameters then come back then rerun it on the best parameters So just had this continuous flow checked it plotted it pass those best parameters through to the next one And then trade it some more, okay Yeah, it was quite a little time save with it. Yeah, well, it's still runs for like two days, but Time's a bit. Okay, and then talk to me about what's happening here So that you let me the black skulls did a better job. The black souls did do a bigger job All my bad computer just let's let's see. Okay, I'll try rerun it sometime and then we'll see I just have a lot of things coming up I'm hoping I'm like hoping to beat it Just couldn't do it here. Couldn't but the time pressure is a bitch But this is the thing it it beats it for so it it doesn't beat it for this one. Oh, yeah But it does beat it for Yeah, so we didn't beat it on geometric Brownian motion. So thing is black souls is Derived from this notion of the stocks following a geometric Brownian motion Also knows the exact parameters But in theory we could maybe beat it because of this discreet timeness, right? So now black souls is a perfect page in continuous time But in discreet time, you can see it actually has a distribution around zero. It's not it's not perfect Okay, so it was perfect then that pink ball would just be at zero down. Okay. Yeah, so this is a profit and loss So you all makes quite a lot of love But it was a badly trained well But it's more about the theory. Yeah, it's about the theory and I'm can it actually do it Yeah, and it actually to trade. Yeah, I mean it's not that's not too bad. So something I didn't train that Yeah, yeah, that's actually pretty good. But like I said, the formula one's coming out Yeah, well, we can actually just end it. We don't need to talk about this Do we we don't need to talk about the merchants and all these other things exactly the exact same thing just And you actually graph and you beat it this time. Yes, I'm beat at that time. Okay, so maybe just the extensions Just a quick talk to me if you want talk to me very quickly about the Yeah, so in the actual project, obviously we only did a call option and it was European so the payoffs at the end and has the same sort of structure, but You can obviously extend this to different types of Options so we want to do that. So big thing was American and the muta options Can we change the neural network to exercise? Tell us quickly what so American you can exercise any time before the expiry date European you can do it on the date The muta is basically in between European and American. Okay, so what it is is that you can only trade on specific dates So let's say maybe every three days or something. So Yeah, that's you can't trade any time before the thing it has these jumps So in those three days the stock price could plummet and come back up, but you so you can only trade on those dates, so Okay, so it's like a little bit. So you want to get it for I mean, but this I mean this like Russian is Asian There's all very so you're so Asian everything and so you want to get model so that it can do all of these Yeah, okay talk to me about These are the two extensions here. Okay, so applications only provided for aging. Okay But there are other applications in the financial interest industry like forecasting and filtering and trading This one's an interesting one. Yeah, so how many how much profit? Yeah, why don't you make it about this? Do you know how we would have got like a million views if you've made about trading? Because do you know people don't like hedging? Hedging just means less money if you're right. Yeah Pretty much like you want to make a profit. Yeah, so I haven't but I haven't done any of these extensions yet So okay, we'll see how it goes, but they are these applications and they are there's some code What why would you want to do it for filtering? What's the whole point of doing that? I was just thinking about the other things So finding the true underlying stock pattern, which is pretty much I guess for forecasting and trading It's like a middle ground. Yeah, can you get this true pattern of the stocks instead of this Disgusting view of everything long-term trends things like that. Yeah, okay. That could actually be very interesting. Yeah, okay, and then Finally talk to me about This lots extension. Yeah, so this is just obviously we only did Monte Carlo simulation so we compared the stuff to the black I mean so geometric Brownian motion model But can we train it on these two models and actually trade stocks? Obviously, I'm not gonna go out and go destroy the market now. I'll give you two hundred bucks to go behind this model Just don't try when I lose it Okay, just want to see how it performs on real days I often perform and then I choose what one one last question. We've got five minutes until the wrong pre-start One last question of every one that you read in your thing of a jig here. I like how you're referencing yourself. That's pretty cool Is that Mario? Yeah, just a quick basic quick little thing there Where's your stuff? Yeah, where's where's my stuff you didn't you didn't reference? I've got one one article out It's got one citation only So you need it you decided to get get that little thing, but anyway coming back to the question of all the people you read Who would you recommend or it's worth reading more of just their work? Like you saw this person you like one discuss like a genius. Okay, so in terms of trading and financial math and everything Watson schweizer number 12 number 12 month So he's pretty good at the stuff and sure I have in general So things about probability theory Finance and stuff like that. I think I'm good at textbook by this guy. Yeah. Yeah, you're great Yeah, I was just thinking I know that and then biggest inspiration is Melusi my whistle Six seven and eight just different things. So here's my lecture and my supervisor. Okay So we're checking those guys out and then you're like I said, we do have the formula one coming up You know do it the clerk. Let's hope you win Singapore. Did he Position go Patrick he's gonna go for it three three three four three yeah So so let's go watch that and just to everybody watching if you've also written a really cool paper and You would like to come and discuss it on the channel hit me up and Yeah, cuz we're gonna even do this as a series that could be and then you can you must join as well You can like criticize the papers as people talk about no joking Okay, cool. Anyhow, I think that further ado Cheers everyone and have a great weekend or week whenever you're watching this