A hedging strategy to exploit volatility in prediction markets.
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 (never mind 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.