Radar

radar · IA & agentes

Can AI & Machine Learning Beat Kalshi...or Is It Just Luck?

¶1So, you can see we have 1, 2, 3, 4, 5, 6, 7 wins in a row. And today, I thought I'd just tell you a bit about my machine learning experiment here on Calshi. So, maybe you can learn something. Basically, the video is to kind of learn a bit about machine learning and how you can, yeah, get into that by using a platform like Calshi. So, yeah, let's just have a look at how this happened and how we're going to scale this next by putting on some more stake.

¶2Okay, so the platform we're going to do this on is Calshi because we can get really fast feedback here, right? And there are some things we can kind of try to take a bit of advantage of here. So, yeah, this could not make you a billionaire, but it's more for learning and kind of seeing how we can try to begin experimenting with machine learning on, yeah, some data we have, right? So, the the event we're going to use is basically on Calshi, there's a event called Bitcoin, will it go up or down the next 15 minutes, right? And if you settle at the up and you picked up, you get $1 and if it goes the other way, of course, you get zero.

¶3And you can, of course, sell out in between if you want to, but that is basically the simple event we're going to look at today, as I have done before. So, of course, the next thing we needed to do then to actually train any type of machine learning model, we need the data, right? So, Calshi has some historical data and stuff like that. So, I just collected what I thought or what I have access to, basically. So, we found 5,335 resolved markets, so we can actually start training on.

¶4And I kind of kept 600 of them untouched, so we can do the final test to see how the model performed. So, here I kind of went a bit strange. I wanted to do like a fun run, so you can see that the line here. So, the market opens at T900, right? That's 15 minutes.

¶5And at T0, it resolves. So, I wanted to see how early kind of can I try to predict something at the end. And of course, the longer you wait, you more accuracy you get. But I said, "What can we predict just 5 minutes in with 10 minutes still left?" Because then you can kind of get a better price, sometimes at least, if you're lucky. But it could also go really the other way, so you lose accuracy, right?

¶6And it's really hard to find an edge just 5 minutes in this market. But that's what we wanted to do, just to see what we found. Uh so, like I said, how do you kind of train a simple machine learning model? This is nothing like I'm no expert at this. I'm just getting training, and I thought like talking a bit about it kind of makes me learn a bit more.

¶7So, basically, what we do in this example is that we show a model the first 5 minutes uh with the data we have, like we collected 5,000 markets. Uh so, we show 5 minutes of uh the first 5 minutes of the window. Then we tell the model also, did it finish up or down? And we just want to repeat that 5,300 times. We have some machine learning in there, like and we try to see if some patterns.

¶8Uh when the model gets the same data on the live, can it then again try to predict where it's going to end up? And the model the machine learning is really good at this, looking at these small patterns, of course. So, if you look at the results, you can see 50/50. That is kind of the baseline. Calci has 51.8.

¶9And you can see our model barely beats the Calci market. But that's pretty good. So, I was really happy to see that. Uh and it kind of crushes 50/50, of course. So, that's pretty good.

¶10So, that is kind of how you train like a very simple uh machine learning model on this data just to learn a bit more. And can this see 10 minutes ahead now? No, it can't. Because you can see there's basically no difference, at least very small difference between the market. So you can see Calchas already almost knew everything.

¶11Uh and the model found just a tiny difference uh in kind of just following the market or trying to follow the model. But one thing I noticed just in this fun experiment, so we tested this on the live data and we found like seven out of seven windows I tested this, uh we won all of them with the direction. So I thought that was pretty funny because we tested a bunch of different models and there was only one that uh went seven out of seven. So I thought just for fun, let's just place this on the live and see what happens. So I just plugged it into Calchas, we get all the data, the candles, the model, we choose yes or no, and we do a $1 order at the decision time.

¶12That was 5 minutes in, right? And what happened? Well, we won 12, we lost four, and we got a 75% directional win rate at 16 windows or trades. So that was a really good start, right? You can see we have 75% win rate.

¶13The idea today was just to see okay, we did a small sample first, 16, so the law law of large numbers like is this is going to hold up if we now continue. So what I'm going to do now, uh the same model, the same conditions, but this time I'm going to put it up to $5. Uh and we're going to see what happens, right? Five times the emotional damage. If you take a look at our balance here, we only have $56.

¶14So, we only can uh lose six times before we are bust. Uh but, the model has said we're going to win 75%, so all is good. And I actually plan to leave the training data, if I can make it happen, open so you can go get it yourself and start playing around with these machine learning models. And I might leave like a simple way to use AI cloud code uh uh code X uh that I did to actually do this. Okay, so this is what I wanted to show you.

¶15So, these were kind of the seven live runs I did with the model, and you can see here we resolved seven out of seven the directional way. And that is when I kind of switch over to the the one I showed you in the beginning of the video. So, basically, we had those seven in a row, and we also have seven in a row after that. But, what you can see here is that Cal-Chi probability was higher than the model here. Here was the same.

¶16Here was a bit lower. Here, our model had 2% higher probability than Cal-Chi. Here, it was a bit higher, sharper, sharper. So, it's very even, right? Uh I think only this had like a 2% edge in probability uh than Cal-Chi at this moment.

¶17Uh and you can see, yeah, seven out of seven. Uh and I said seven out of seven. Let's just enter with $1 a direction for a while, and that's what we did. So, now we're going to actually switch it up. We're going to up the stake to $5, and we're going to start up the bot again, and then we're just going to monitor and see what happens.

¶18This has nothing to do with the way you should uh find edge and trade about this way. I just wanted to learn a bit more about machine learning and have some fun, too, and just see where this goes. So, let's see what happens when I kind of change this up now. So, I'm just going to say uh we are ready to start the bot again. Uh same setting as uh now.

¶19Only change we enter with like a $5-ish notional. Uh implement this and deploy the bot. Okay, so that's what we're going to do. And when this start now, I'm going to show you the first window. And I'm going to come back and we just going to track it.

¶20Uh but maybe we are lucky and we win some Well, let's just wait and see. So, I'm just going to implement this. We're going to put this up to five and see what happens. Okay, so you can see we just entered our first position here. So, you can see we went no.

¶21And if we go into this, you can kind of see this now that time left is 9 minutes, right? And let's check out our position. So, not the best start. Uh it's pretty even. So, this is just going to keep going now uh for the next 9 minutes before it resolves.

¶22And we need this to end up uh what did we buy? Down, was it? Yeah, I think it was no. So, we need to end up uh below here. So, let's just see what happens.

¶23Uh and uh yeah, uh we're going to run this basically until we don't have any more money or let's say we double. So, if we are at 100, we're probably going to stop. And if we bust, then I guess uh our model is not good enough. Okay, so you can see there are like 30 seconds left here now and let's see how we're doing. Yeah, we're doing good, right?

¶24So, we have uh $7.6. So, that's going to be like a two-something X profit. And that brings our balance up to 59. Uh yeah, this is probably going to land. It's like $20 difference with 10 seconds left.

¶25It's going up though, but uh yes. Should be pretty over now, right? So, that is kind of that's going to be our eighth win in a row. And we just translate over to the next window. So, if we check our portfolio now, um Uh, yeah, it doesn't pop up yet, but basically you can see here we are doing pretty good.

¶26So, yeah, that's a great start. So, now let's monitor the next windows and see how that's going to work. Okay. So, you can see we won again. So, that's like the Is that the ninth win in a row?

¶27Uh, but here we entered at 80. So, that was quite high. Uh, here it was 60. So, that was a bit better. But still, we are still going on the streak.

¶28So, now we passed $60. Uh, I know I said 100 in the in the opening or like before we started, but that's maybe a bit hard because sometimes we only get plus one. Let's see if we can get to 70, 75 or something. Uh, uh, and I'm just going to keep it running for a few windows. And I'm going to come back when we have a couple of more windows and we can see how we are doing.

¶29Okay, so we are back again. So, you can see this is going really well. We are at $65 now. 13 seconds left. Oh, this is really close.

¶30But, uh, it should end up right. And that is going to be another two 30 or something in profit, right? Uh, yep. And let's check out the previous one. We skipped a window.

¶31That was also 2.8. Uh, I think we are like 10 wins in a row, 12, 11, something like that. But now you can see we went from 56 to 65. So, that means that, uh, yeah, we have a 60% uh, return the last 24 hours plus 11. So, this is going really well.

¶32Okay, so we are back again. 73, this is a really close one, right? But uh it's 20 seconds left. And $73. >> [sighs] >> I didn't actually expect this, but let's see if this goes in now because it's really close.

¶33Uh needs to move $1. Uh 4 seconds. Yeah, looks like it's going to go in again. So, is that 12 in a row I think think? Let's head over to our portfolio here.

¶34So, we entered at 50. Okay, so that was pretty good. Here we entered at 56. So, we are at $73 now. And how many wins in a row?

¶35I think it's 12 or something. And the percentage, 100% gains in 24, not 24 hours, just a couple of hours. So, $20 up. So, I'm just going to keep the model running. I'm going to check back now in maybe like three windows or something, 45 minutes.

¶36And yeah, let's see where we are then. This is going really good. Okay, so we are back. I think we have lost some bets now because we are at 77. Still up from the last four windows.

¶3726 seconds left. Uh yeah, this should be pretty good, I think. 8.3. So, I guess we broke our streak, but let's check this out. So, this is 15 seconds.

¶38Yeah, this is looking pretty uh secure. Uh which Where did we lose? Okay, so we lost one of those. We lost here. Uh okay, so we bought in at 48.

¶39So, that is a bit interesting, actually. But uh that is kind of as 50/50 as you get it. So, of course you will get some variance around that, but still we are grinding pretty good here. So, so far this has been a really cool experiment. Uh and after we do one more hour, I'm just going to talk a bit of few things about the machine learning model and kind of how you can do the same to start learning a bit.

¶40So, we are back again, 18 seconds left, and how are we doing? Again, we're just doing very good. You can see our balance now is now $88. So, uh, this went a bit better than expected. Let's just run this out now, and we're probably going to secure that back again.

¶41174% up. Uh, yeah, again, we just collect win after win. Uh, yeah, it's not going to be 95, it's going to be 88, right? And let's refresh that. 174%.

¶42So, I'm just going to keep this running. Why not? But, the video is probably going to end here because, uh, yeah, I wanted to edit it and put it out today. But, I think we're going to do one thing now. So, let's head back to, uh, CodeX.

¶43So, I'm just going to say, "Now analyze our $5 stake performance since we bumped this up. Look at the model prediction compared to cash your market. Uh, also calculate our luck. Execute this as a quant researcher would have done, so we can get a bit more math into this, maybe." Uh, yeah. Uh, what can I say?

¶44This went kind of all over my expectations. I don't know how many. I think we just lost one, two, maybe. I think we just lost one trade. Not trade, but prediction.

¶45So, that was an insane return. So, we really we did like 30 100 some X percent in just like a couple of three, four hours or something. Three hours? Uh, of course, that's not going to keep up in the long run, but it's interesting. And let's just do the calculations here, and I'm going to kind of get to my point here.

¶46So, while we wait for that, I went ahead and I put this up on GitHub. So, I kind of just This is just my simple way of training the model we did here. So, if you are a bit unsure how to get started, this is just something you can check out on GitHub. It's like a markdown file how you can actually get the data I used in my testing because all of these are kind of free APIs, right? We have some documentation in here and how you can kind of fetch the data.

¶47I include a prompt to actually train this. So, you can kind of read everything here. Please read this before you run this through like a Codex or something. And we can kind of try to you can try to emulate what I did here today, but don't expect any results because this is just to learn. And from here, you can kind of try to tune a few parameters, see what you like, see how the performance is.

¶48So, of course, be aware don't put any stake behind this, but I think it's just a good way to kind of learn about how you can start dipping your toes into some machine learning like I'm doing and looking a bit more at data and stuff like that. So, it's pretty interesting and I wouldn't say this is the perfect use case because the it's just we don't really have enough rich data, I think, to find an edge here. So, everything we have done today does not really have an edge. This is more like gambling, experimenting, but it's still interesting, right? So, yeah, we don't have the results back yet, but just wait for that.

¶49But, I'm going to leave a link in the description to this GitHub repo here if you want to take a look. And yeah, I don't really have anything so much here. We have some information about the data set and stuff like that. And all of this data is, of course, through the historical cal sheet data. Right?

¶50So, yeah, go check it out if you want to. I even left in some Python code here how I trained this. So, you can kind of get the same setup that I have. Okay, so you can see here is kind of the analysis. So, you can see 13 wins out of 14 on the $5 entries, plus 31 after fees.

¶51So, a great result, right? You can think, "Oh, we found like a free money glitch, right?" But, I think we got to be a bit more careful. You can see the win rate is 93%. And yeah, other than that, net P&L like 31, return on money spent 45%. Because here we can kind of see if we just look at the data here, do we actually beat that just following the the Kelsey market?

¶52Here we kind of have a bit of a leg up, right? You can see we predict a bit more. Yeah, this was 2%, right? I kind of want to look at the more Yeah, I can't really find like we find 2% above the Kelsey price, 1% above, 2%. So, there's not like we have like a big edge here, basically, right?

¶53And if you kind of ask I asked something like and based on the model and the math, what would you expect to see after 1,000 windows of this? And if you take a look at this kind of if you look at kind of expected net P&L after fees on 1,000 windows, approximately minus $12. So, that doesn't look too good, right? So, here even though we kind of we have like insane results today, this is probably not going to last just because we have such a small sample size. But, that doesn't say that it's impossible to find something that could give like a positive P&L here after 1,000 windows.

¶54It's not impossible. All you have to do is just just improve this uh projected model a bit better, then you suddenly going to see like a a positive P&L. Uh but if you're interested in this, I thought this was just a fun experiment, and it kind of shows that you can have like a small streak of luck. It went up a lot better than I thought, but uh still I think it kind of proves the point here. And we will kind of expect here after 1,000 windows that our win rate kind of goes down to around 70%.

¶55It's not going to be 93, right? And if you just think uh yeah, we're just going to plus $2,000, that's not going to happen, right? But um but all in all, I think this was super interesting, and I'm going to leave uh a link to this Git Hub if you want to check it out. Also, it's not sponsored by Kalshi, but I do have like a referral link if you want to kind of try this out. You can help me out by just following this referral link if you yeah, want to.

¶56You don't have to, but if you want to sign up, you can just click on my referral link, and it kind of helps the channel out a bit. So, yeah. Thank you for tuning in. Hope this gave you some inspiration and wanting to try this out for yourself, and try to be a bit more um calculated about how you spend your money on these platforms like Polymarket, Kalshi, sports book, and stuff like that. Don't just go in blindly without thinking about the statistics behind it and trying to leverage AI to help you make better decisions in this space.

¶57So, yeah. Thank you for tuning in. Have a great day, and hopefully I'll see you again soon.