Case study
Shrub — Prediction Swing Trading
A hedging strategy to exploit volatility in prediction markets.
- Timeline
- May 2026 — Present
- Stack
- Hedging, DevOps, Solutions Architecting (for lack of a better word), Python, Math/Statistics
- 15%Return/trade
- 195%Increased quant skills
- 20+Hours spent on Kalshi hoping my hedge logic would work
Everyone wants to bet. Nobody wants to lose. So how do you set up a strategy to always* win? By betting on everyone else.
This project started in April 2026, just as the NBA regular season was coming to a close. I remember a friend of mine deciding that sports betting was a great way to make money. So he placed a bet on the favorites, saying “Bro, there’s almost no risk of losing”. You can probably guess what happened next. In a generational turn of events, the Charlotte Hornets defeated the New York Knicks 110-96, and my friend was distraught. His woes aside, this gave me an interesting (if not entirely original) idea. Hedging bets.
The short version of how it works is this: in any event where there are two teams, or two possible outcomes, you can make money by placing one bet on the underdogs, then placing another bet later on the favorites (most likely to win). It’s a little more complex than that, since there are specific amounts of money on each side and specific odds changing throughout the game that you need for this to be mathematically profitable, but that’s the idea of it. You bet on the underdog, their likelihood of winning increases enough, then you bet on the other side. If your numbers work out right, no matter who wins, you guarantee yourself a small profit.
V0 - The Basics
I started by doing this manually, only to find that it takes quite a while when all you have is a calculator and a sheet of paper. Too long. By the time I managed to crunch the numbers and determine that the current odds were possible to make a profit if I put in exactly $21.87, the odds would shift and I’d have to recalculate.
My first step was to make a tool that would show me the math calculations in a nice-looking grid so I could see it myself. That way, all I had to do was place a bet, then spend a minute putting in the details, then I’d get a nice grid showing exactly which scenarios would put me in the green and exactly how much money I’d make.
V1 - Going deeper
Eventually I got tired of that. What if, instead, I could code a tool to place the bet for me? I could place the first bet manually, then once it became possible to lock in a profit, the tool would hedge exactly however much was needed to lock in a small profit, enough to make me a few pennies. Not the most profit, but still a sure one. Who knows? Maybe in a few millennia, I’d become a thousand-iare. Overall, a pretty simple tool and a pretty logical process. You bet once, then the tool balances it out. But I wanted more.
The Strategy
At this point, if you’ve been following along, you’re probably looking at this window and going, “That’s stupid. What if you bet on the underdog and they get blown out? After all, there’s a reason why they’re the underdog: they’re probably the worse team!”
You would be right. A few ill-fated bets later (luckily in a demo environment, so I didn’t lose any real money), I realized that it is disappointingly often that the underdogs get blown out. So you can’t just hope, pray, or otherwise assume that things will go in your favor. And that taught me a few things. First, that if your system is set up to bet all or nothing, you will either surf the tide up or crash along with it. I was still trying to minimize risk. I wasn’t betting on a team anymore, but I was betting on a direction, and I was going all or nothing. The second thing I learned was the importance of picking your markets and picking your games. I didn’t realize it at first, but I was simply hoping that there would be a swing in the odds. If your market is more volatile, it’s more likely to swing, which increases the chance of a favorable opportunity. But if you blindly bet on the underdog every time across every game ever, you will lose more often than not.
So I learned some things: stop losses, among some other concepts. My goal, essentially, was to minimize any chance of loss as much as possible. And by the time I was ready to bet again, I had it all figured out.
The Feedback
Over the summer, I got the chance to talk to someone who had been adjacent to the quant space for quite a few years. We got to talking, and eventually I asked him if he wanted to see this neat little tool I’d been building. He agreed, so I showed him the tool.
I’ll leave the nice comments aside for now, and focus on the biggest problem with my tool so far, one that he pointed out almost immediately: I was focusing too hard on minimizing my risk of loss, which was good. But I wasn’t focused on my upside. On a good trade, I was still making pennies. On a bad one, I was losing a bit more than pennies. The overall outcome didn’t come down to “Is my hedging logic good?”, it came down to “Was I lucky when I placed the first bet?”. I’m not the luckiest person; if I were, developing this kind of a tool would be pointless. His thoughts had me thinking. How can I keep minimizing my losses but make my trades genuinely profitable? That way, I make enough good trades and make enough on the good trades where I offset the occasional loss.
So I learned some things: How to hedge properly, among other concepts. The goal this time around was to keep minimizing my losses, but this time keep more than just pennies. What I did this time was implement something called a partial hedge, which would make bets piecemeal so I could lock in a small profit early. Then, I’d still have some capital left over to ride out the tide and see where it goes for the chance of a decent chunk of change. It’s not perfect, but the upside is better and the downside is minimal as ever.
Today’s State
There are many pieces to this puzzle. I haven’t even begun to go into the actual Python code or the development of the tool, the optimizations I had to bring in to minimize fees as much as possible, the usability and legibility I had to figure out, and how I got around to implementing the hedging logic above, which seems pretty complex. Nor have I gone into the “How do I scan for the right bet to make?” part (to be honest, I’m not sure I want to give away all my secrets, but I’m sure you can figure some of them out).
But where I am today is an interesting spot. I’ve partaken in some actual quant work (on a very small scale). I’ve done some iterative development. I’ve come up with a product idea that solves a real problem for a real user base (nevermind that this user base consists of my echo, my shadow, and me for now). I’ve gotten feedback from a professional. And I’m nowhere near done.
I’ve been picking and choosing markets myself for now. But there’s no reason for me to keep that part of the process manual. I’m looking at ways to automate the beginning, middle, and end of this process. That’s a work in progress.
There’s also something I’ve found distinctly annoying about this whole thing: if my computer isn’t actively on while the game progresses, no hedged bet will be made, and I’m back to hoping the underdog wins. Not ideal. So I’m now exploring options to keep this system always-on so I can make sure the tool is always ready for the trades I make. When I get both of those done, this could be continuously sitting there and generating revenue 24/7.
There’s a long way to go with this, and I’m pretty excited to see what other ideas I come up with. Like I said, I’m nowhere near done.
This project started in April 2026, just as the NBA regular season was coming to a close. I remember a friend of mine deciding that sports betting was a great way to make money. So he placed a bet on the favorites, saying “Bro, there’s almost no risk of losing”. You can probably guess what happened next. In a generational turn of events, the Charlotte Hornets defeated the New York Knicks 110-96, and my friend was distraught. His woes aside, this gave me an interesting (if not entirely original) idea. Hedging bets.
The short version of how it works is this: in any event where there are two teams, or two possible outcomes, you can make money by placing one bet on the underdogs, then placing another bet later on the favorites (most likely to win). It’s a little more complex than that, since there are specific amounts of money on each side and specific odds changing throughout the game that you need for this to be mathematically profitable, but that’s the idea of it. You bet on the underdog, their likelihood of winning increases enough, then you bet on the other side. If your numbers work out right, no matter who wins, you guarantee yourself a small profit.
V0 - The Basics
I started by doing this manually, only to find that it takes quite a while when all you have is a calculator and a sheet of paper. Too long. By the time I managed to crunch the numbers and determine that the current odds were possible to make a profit if I put in exactly $21.87, the odds would shift and I’d have to recalculate.
My first step was to make a tool that would show me the math calculations in a nice-looking grid so I could see it myself. That way, all I had to do was place a bet, then spend a minute putting in the details, then I’d get a nice grid showing exactly which scenarios would put me in the green and exactly how much money I’d make.
V1 - Going deeper
Eventually I got tired of that. What if, instead, I could code a tool to place the bet for me? I could place the first bet manually, then once it became possible to lock in a profit, the tool would hedge exactly however much was needed to lock in a small profit, enough to make me a few pennies. Not the most profit, but still a sure one. Who knows? Maybe in a few millennia, I’d become a thousand-iare. Overall, a pretty simple tool and a pretty logical process. You bet once, then the tool balances it out. But I wanted more.
The Strategy
At this point, if you’ve been following along, you’re probably looking at this window and going, “That’s stupid. What if you bet on the underdog and they get blown out? After all, there’s a reason why they’re the underdog: they’re probably the worse team!”
You would be right. A few ill-fated bets later (luckily in a demo environment, so I didn’t lose any real money), I realized that it is disappointingly often that the underdogs get blown out. So you can’t just hope, pray, or otherwise assume that things will go in your favor. And that taught me a few things. First, that if your system is set up to bet all or nothing, you will either surf the tide up or crash along with it. I was still trying to minimize risk. I wasn’t betting on a team anymore, but I was betting on a direction, and I was going all or nothing. The second thing I learned was the importance of picking your markets and picking your games. I didn’t realize it at first, but I was simply hoping that there would be a swing in the odds. If your market is more volatile, it’s more likely to swing, which increases the chance of a favorable opportunity. But if you blindly bet on the underdog every time across every game ever, you will lose more often than not.
So I learned some things: stop losses, among some other concepts. My goal, essentially, was to minimize any chance of loss as much as possible. And by the time I was ready to bet again, I had it all figured out.
The Feedback
Over the summer, I got the chance to talk to someone who had been adjacent to the quant space for quite a few years. We got to talking, and eventually I asked him if he wanted to see this neat little tool I’d been building. He agreed, so I showed him the tool.
I’ll leave the nice comments aside for now, and focus on the biggest problem with my tool so far, one that he pointed out almost immediately: I was focusing too hard on minimizing my risk of loss, which was good. But I wasn’t focused on my upside. On a good trade, I was still making pennies. On a bad one, I was losing a bit more than pennies. The overall outcome didn’t come down to “Is my hedging logic good?”, it came down to “Was I lucky when I placed the first bet?”. I’m not the luckiest person; if I were, developing this kind of a tool would be pointless. His thoughts had me thinking. How can I keep minimizing my losses but make my trades genuinely profitable? That way, I make enough good trades and make enough on the good trades where I offset the occasional loss.
So I learned some things: How to hedge properly, among other concepts. The goal this time around was to keep minimizing my losses, but this time keep more than just pennies. What I did this time was implement something called a partial hedge, which would make bets piecemeal so I could lock in a small profit early. Then, I’d still have some capital left over to ride out the tide and see where it goes for the chance of a decent chunk of change. It’s not perfect, but the upside is better and the downside is minimal as ever.
Today’s State
There are many pieces to this puzzle. I haven’t even begun to go into the actual Python code or the development of the tool, the optimizations I had to bring in to minimize fees as much as possible, the usability and legibility I had to figure out, and how I got around to implementing the hedging logic above, which seems pretty complex. Nor have I gone into the “How do I scan for the right bet to make?” part (to be honest, I’m not sure I want to give away all my secrets, but I’m sure you can figure some of them out).
But where I am today is an interesting spot. I’ve partaken in some actual quant work (on a very small scale). I’ve done some iterative development. I’ve come up with a product idea that solves a real problem for a real user base (nevermind that this user base consists of my echo, my shadow, and me for now). I’ve gotten feedback from a professional. And I’m nowhere near done.
I’ve been picking and choosing markets myself for now. But there’s no reason for me to keep that part of the process manual. I’m looking at ways to automate the beginning, middle, and end of this process. That’s a work in progress.
There’s also something I’ve found distinctly annoying about this whole thing: if my computer isn’t actively on while the game progresses, no hedged bet will be made, and I’m back to hoping the underdog wins. Not ideal. So I’m now exploring options to keep this system always-on so I can make sure the tool is always ready for the trades I make. When I get both of those done, this could be continuously sitting there and generating revenue 24/7.
There’s a long way to go with this, and I’m pretty excited to see what other ideas I come up with. Like I said, I’m nowhere near done.
This project started in April 2026, just as the NBA regular season was coming to a close. I remember a friend of mine deciding that sports betting was a great way to make money. So he placed a bet on the favorites, saying “Bro, there’s almost no risk of losing”. You can probably guess what happened next. In a generational turn of events, the Charlotte Hornets defeated the New York Knicks 110-96, and my friend was distraught. His woes aside, this gave me an interesting (if not entirely original) idea. Hedging bets.
The way it works is this: imagine you have a two-sided event (which is a fancy way of saying an event with two outcomes), one is the favorite (most likely to win) and one is the underdog (least likely to win). What I came up with was placing a bet on the underdog before the game with the expectation that the odds will shift, and at some point during the game, the underdog’s odds will be higher than they are right now. Once they are, you bet on the other side (the favorite), and you bet bigger than you bet on the initial bet. If your numbers work out right, you set up a situation where no matter who wins, you guarantee yourself a small profit.
V0 - The Basics
I started by doing this manually, only to find that it takes quite a while when all you have is a calculator and a sheet of paper. Too long. By the time I managed to crunch the numbers and determine that the current odds were possible to make a profit if I put in exactly $21.87, the odds would shift and I’d have to recalculate.
My first step was to make a tool that would show me the math calculations in a nice-looking grid so I could see it myself. That way, all I had to do was place a bet, then spend a minute inputting the parameters of the bet, such as how much it was, what the odds were, how much in fees Kalshi would rob (sorry, charge) me, etc. Then, it would load a nice grid showing the various odds levels that could happen and the various amounts of money at each odds level I could put, and in each square, the amount of money I’d net.
V1 - Going deeper
Eventually I got tired of that. What if, instead, I could code an automated system that could place the bet for me? I could place my initial bet before the game for games where I thought the odds would shift enough to make a profit. Then, as soon as the odds shifted enough to lock profit, the tool would hedge exactly however much was needed to lock in a small profit, just enough to outweigh the fees and make a couple of pennies, but still a guaranteed profit. Who knows? Maybe in a few millennia, I’d become a thousand-iare. Overall, a pretty simple tool and a pretty logical process. You bet once, then the tool balances it almost perfectly evenly later on. But I wanted more.
The Strategy
At this point, if you’ve been following along, you’re probably looking at this window and going, “That’s stupid. What if you bet on the underdog and they get blown out? After all, there’s a reason why they’re the underdog: they’re less likely to win and probably the worse team!”
You would be right. A few ill-fated bets later (luckily in a demo environment), I realized that it is disappointingly often that the underdogs get blown out. So you can’t just hope, pray, or otherwise assume that the odds will shift in your favor. And that taught me a few things. First, that if your system is set up to bet all or nothing, you will either surf the tide up or crash along with it. No matter the fact that it’s a hedge and the whole goal is to reduce risk, if you go all or nothing, you are risking quite a bit. The second thing I learned was the importance of picking your markets and picking your games. What I was essentially doing, though I didn’t initially realize it, is betting on volatility. I was hoping that there would be a swing in the odds. I won’t go into why, but the basic idea is that if your market is more volatile, it’s more likely to swing throughout the game, which increases the chance of the odds shifting in your favor. If you blindly bet on the underdog every time, more often than not, you will lose.
So I learned some things: stop losses, among some other concepts. The goal, essentially, was trying to minimize my downside as much as possible. And by the time I was ready to bet again, I had it all figured out.
The Feedback
Over the summer, I got the chance to talk to someone who had been adjacent to the quant space for quite a few years. We got to talking, and eventually I asked him if he wanted to see this neat little tool I’d been building. He agreed, so I showed him the tool.
I’ll leave the nice comments aside for now, and focus on the biggest problem with my tool so far, one that he pointed out almost immediately: I was focusing too hard on minimizing my downside, which was good. But I wasn’t focused on my upside. On a good trade, I was still making pennies. On a bad one, I was losing a bit more than pennies. The overall outcome didn’t come down to “Is my hedging logic good?”, it came down to “Was I lucky when I placed the first bet?”. I’m not the luckiest person; if I were, developing this kind of a tool would be pointless. His thoughts had me thinking. How can I keep minimizing my losses but make my trades genuinely profitable? That way, I make enough good trades and make enough on the good trades where I offset the occasional loss.
So I learned some things: Kelly hedging, the half-Kelly criterion, among other concepts. The goal this time around was to keep minimizing my losses, but this time keep more than just pennies. This time, I implemented a partial profit lock. As the odds continue to shift, you keep placing small bets on the favorite’s side. Eventually, you get to a point where no matter who wins, you lock a small profit. But this time, you have some additional capital to throw around. Say you bought 30 shares the first time, then through the series of next bets, you ended up buying 20 shares. Essentially, you’ve gotten rid of your risk without using up all your capital, which leaves those extra ten shares to ride out the tide. It’s not perfect, but the upside is better and the downside is minimal as ever.
Today’s State
There are many pieces to this puzzle. I haven’t even begun to go into the actual Python code or the development of the tool, the optimizations I had to bring in to minimize fees as much as possible, the usability and legibility I had to figure out, and how I got around to implementing the hedging logic above, which seems pretty complex. Nor have I gone into the “How do I scan for the right bet?” part (to be honest, I’m not sure I want to give away all my secrets, but I’m sure you can figure it out).
But where I am today is an interesting spot. I’ve partaken in some actual quant work (on a very small scale). I’ve done some iterative development. I’ve come up with a product idea that solves a real problem for a real user base (nevermind that this user base consists of my echo, my shadow, and me for now). I’ve gotten feedback from a professional. And I’m nowhere near done.
I’ve been scouting markets myself for now. But there’s no reason for me to keep that part of the process manual. I’m looking at ways to automate the beginning, middle, and end of this process. That’s a work in progress.
There’s also something I’ve found distinctly annoying about this whole thing: if my computer isn’t actively on while the game progresses, no bet will be made, and I’m back to hoping the underdog wins. Not ideal. So I’m now exploring options to move the hedging part of this system to the cloud. When I get both of those done, this could be always-on, sitting there and generating revenue 24/7 (or losing it, but I’d rather not think about that).
There’s a long way to go with this, and I’m pretty excited to see what other ideas I come up with. Like I said, I’m nowhere near done.
This project started in April 2026, just as the NBA regular season was coming to a close. I remember a friend of mine deciding that sports betting was a great way to make money. So he placed a bet on the favorites, saying “Bro, there’s almost no risk of losing”. You can probably guess what happened next. In a generational turn of events, the Charlotte Hornets defeated the New York Knicks 110-96, and my friend was distraught. His woes aside, this gave me an interesting (if not entirely original) idea. Hedging bets.
The Math
The way it works is this: imagine you have a two-sided event (which is a fancy way of saying an event with two outcomes), one is the favorite (most likely to win) and one is the underdog (least likely to win). I came up with an idea to place a bet on the underdog before the game with the expectation that at some point during the game, the odds would shift somewhat. Even if the underdog never actually won the game or even had the points advantage, if they started to perform well or even look like they could perform well, the odds would shift. The reason this happens is that odds are based at least partially on sentiment, and that’s doubly true on prediction markets, since they’re P2P platforms, which means you aren’t betting against the house, but you’re betting against other people who believe in the other outcome.
Anyway, at the exact point the odds have shifted past a certain margin, if you bet exactly the right amount on the other side (the favorite), you can set up a situation where no matter who comes out on top, you win a small profit.
Let’s take a simple example without any complications such as vig or fees. The Boston Celtics vs. the Washington Wizards. One team is known to be historically one of the greatest basketball franchises of all time. Despite losing their star player, they managed to end up the 2-seed in their conference. I digress, though. The other team is, to put it lightly, not so great. (I would also like to point out that this was written before the start of the 2026-2027 season, so if the Wizards suddenly become the greatest team ever, I will bite my hat).
The current odds for the Wizards are set at +300 (or 4.00). Let’s take that as . , which is the underlying implied probability that the Wizards will win. This makes . This means (Celtics odds at = now) . Based on these odds, if you were to bet $100 on the Wizards and you won, your return () would be $400, which nets you a profit of $300.
Different sportsbooks calculate these odds differently, but prediction markets like Kalshi don’t actually set these odds. These odds are driven by what bets people have made, similar to a stock market. If a lot of people think the Wizards will win and bet on the Wizards (AKA buy a stock of the Wizards for this game), that would drive up the odds of the Wizards, and vice versa.
So let’s assume we decide to bet $100 on the Wizards (). At some point later () during the game, the Wizards are down 25-15, then go on an incredible run for 45 seconds where they score 10 consecutive points to bring the score up to 25-25. Suddenly, people start to think that maybe, just maybe, the Wizards have a chance at winning. So they start betting on the Wizards. Because enough people bet, the Wizards’ stock goes up, and suddenly the odds are 3.00 for the Wizards, which implies a probability of 33% ().
We now have a situation where the odds are imbalanced, in a sense. And that’s where we capitalize. For the next few seconds while these odds hold, we can place a bet on the Celtics. . Because the odds have shifted (and we’re assuming no fees), there must now exist a mathematical sum of money that we can place on the Celtics to even out our first bet. Let’s calculate.
. . Right now, , so . , and . If we were to bet on the Celtics now and they win, our total payout would be . Vice versa, if we bet on the Celtics now and they lose, our total payout would be $400 from the first bet. The exact point where the payouts are equal can be found like this:
Regardless of who wins, your total investment is . If the Wizards win, you lose everything on the second bet but get $400 from the first one, which gives you a net profit of $33.33. If the Celtics win, you lose everything on the first bet but get $400 from the second bet, which nets you $33.33. Perfectly balanced, right? That’s the ideal scenario, but we can take it a step further.
We can calculate the exact bounds for profitability, for situations where the odds aren’t exactly 1.50. So let’s go back to just before we placed the second bet. The question now is, what is the least (and the most) we can bet on the Celtics to lock in, at worst, a net zero.
Net profit if Wizards win:
Our goal is “don’t lose money”, so we set the above to . here. Our net profit if the Wizards win is $0, and our net profit if the Celtics win is
The other side is the same idea. If the Celtics win, our net profit is the equation above, which we can set equal to 0 to find the minimum we can bet. When we do this, . This makes our profitability bounds , with each direction affecting the payouts from each outcome. Our optimal , that is, the amount where the payout is even no matter who wins is $266.67.
In real life, it gets more complicated. For example, with fees, or something called a “vig”. These are extra complications because the house often bakes them in to either make more money or to prevent people from hedge bets like this or arbitraging bets. In those cases, the total implied probabilities might add up to 102%, which shrinks your bounds for profitability. There’s also the possibility that the odds don’t shift as much as you want them to, so to lock a profit on an initial $100 bet, you’d have to hedge $10,000, which is the kind of capital most people can’t throw around. And lastly, there’s the time issue. By the time you make the trade, the odds could’ve shifted so your positions are no longer optimal, or worse, no longer profitable.
V0 - The Basics
I started by doing this manually, only to find that it takes quite a while when all you have is a calculator and a sheet of paper. Too long. By the time I managed to crunch the numbers and determine that the current odds were possible to make a profit if I put in exactly $21.87, the odds would shift and I’d have to recalculate.
My first step was to make a tool that would show me the math calculations in a nice-looking grid so I could see it myself. That way, all I had to do was place a bet, then spend a minute inputting the parameters of the bet, such as how much it was, what the odds were, how much in fees Kalshi would rob (sorry, charge) me, etc. Then, it would load a nice grid showing the various odds levels that could happen and the various amounts of money at each odds level I could put, and in each square, the amount of money I’d net.
V1 - Automating It
Eventually I got tired of that. What if, instead, I could code an automated system that could place the bet for me? I could place my initial bet before the game for games where I thought the odds would shift enough to make a profit. Then, as soon as the odds shifted enough to lock a small profit, the tool would hedge exactly however much was needed to lock in a small profit, just enough to outweigh the fees and make a couple of pennies, but still a guaranteed profit. Who knows? Maybe in a few millennia, I’d become a thousand-iare.
Kalshi and Polymarket, two of the largest prediction market platforms, have API integrations. Kalshi’s API integration is remarkably simple, so despite having a slightly more complicated fee structure, I started with them. The process flow was simple:
- Use a REST API call to read existing positions
- Open websocket for continuous price readings
- Run an indefinite function to see if profit lock is possible
- If possible, place bet
- Use websocket to see fill status
Overall, a pretty simple tool and a pretty logical process. You bet once, then the tool balances it almost perfectly evenly later on. But I wanted more.
The Broken Strategy
At this point, if you’ve been following along, you’re probably looking at this window and going, “That’s stupid. What if you bet on the underdog and they get blown out? After all, there’s a reason why they’re the underdog: they’re less likely to win and probably the worse team!”
You would be right. A few ill-fated bets later (luckily in a demo environment), I realized that it is disappointingly often that the underdogs get blown out. So you can’t just hope, pray, or otherwise assume that the odds will shift in your favor. And that taught me a few things. First, that if your system is set up to bet all or nothing, you will either surf the tide up or crash along with it. No matter the fact that it’s a hedge and the whole goal is to reduce risk, if you go all or nothing, you are risking quite a bit. The second thing I learned was the importance of picking your markets and picking your games. What I was essentially doing, though I didn’t initially realize it, is betting on volatility. I was hoping that there would be a swing in the odds. If your market is volatile, the odds are more likely to swing. Especially in prediction markets, which are more user-driven, this means you can see significant swings in the odds, despite the actual probabilities of a specific team winning not changing. That creates more opportunities for profit, as long as you choose them correctly. If you blindly bet on the underdog every time, more often than not, you will lose.
So I learned some things: stop losses, among some other concepts. The goal, essentially, was trying to minimize my downside as much as possible. And by the time I was ready to bet again, I had it all figured out.
The Feedback
Over the summer, I got the chance to talk to someone who had been adjacent to the quant space for quite a few years. We got to talking, and eventually I asked him if he wanted to see this neat little tool I’d been building. He agreed, so I showed him the tool.
I’ll leave the nice comments aside for now, and focus on the biggest problem with my tool so far, one that he pointed out almost immediately: I was focusing too hard on minimizing my downside, which was good. But I wasn’t focused on my upside. On a good trade, I was still making pennies. On a bad one, I was losing a bit more than that. The overall outcome didn’t come down to “Is my hedging logic good?”, it came down to “Was I lucky when I placed the first bet?”. I’m not the luckiest person; if I were, developing this kind of a tool would be pointless. His thoughts had me thinking. How can I keep minimizing my losses but make my trades genuinely profitable? That way, I make enough good trades and make enough on the good trades where I offset the occasional loss.
The Better Strategy
So I learned some things: Kelly hedging, the half-Kelly criterion, among other concepts. The goal this time around was to keep minimizing my losses, but this time keep more than just pennies. This time, I implemented a partial profit lock.
As the odds continue to shift, you keep placing small bets on the favorite’s side. Eventually, you get to a point where no matter who wins, you lock a small profit. But this time, you have some additional capital to throw around. Say you bought 30 shares the first time, then through the series of next bets, you ended up buying 20 shares. Essentially, you’ve gotten rid of your risk without using up all your capital, which leaves those extra ten shares to ride out the tide. It’s not perfect, but the upside is better and the downside is minimal as ever.
Today’s State
There are many pieces to this puzzle. Not least of which is the scanning that must happen before betting in order to understand which bets are the right ones to make where the underdog won’t immediately get blown out (to be honest, though, I’m not sure I want to give away all my secrets, but I’m sure you can figure it out).
But where I am today is an interesting spot. I’ve partaken in some actual quant work (on a very small scale). I’ve done some iterative development. I’ve come up with a product idea that solves a real problem for a real user base (nevermind that this user base consists of my echo, my shadow, and me for now). I’ve gotten feedback from a professional. And I’m nowhere near done.
Improvements
I’ve been scouting markets myself for now. But there’s no reason for me to keep that part of the process manual. By using a cheap LLM to scrape the internet for data such as injury reports or expectations for the game, I can automate the scouting process and have it either auto-select or suggest games to bet on. Even better, with an LLM that has more context and can obtain more information than I can, I can even expand this to other markets that aren’t even sports. With nothing to go off of, those markets are even more volatile. At some point, this process from beginning, middle, to end can be run via an agent. But that’s a work in progress.
There’s also something I’ve found distinctly annoying about this whole thing: if my computer isn’t actively on while the game progresses, no bet will be made, and I’m back to hoping the underdog wins. Not ideal. What I’m exploring now is a way to host just the backend on the cloud. This way, if I ever need to see what’s going on, I can still pull that up on my computer, but I can host the backend via a VPS (which is just a computer on the cloud) so this system is always on. That also means I can configure it to work from my phone, so I can send Telegram messages for certain commands just in case things go sideways. When I get both of these done, my system could be always-on, continuously scouting and choosing opportunities.
There’s a long way to go with this, and I’m pretty excited to see what other ideas I come up with. Like I said, I’m nowhere near done.