6 ms·
For those interested in games of chance, I've been playing around with Betfair's Exchange Hi Lo card game [1]. I came up with an algorithm to, given a game stat
by jpcooper 6y ago
For those interested in games of chance, I've been playing around with Betfair's Exchange Hi Lo card game [1]. I came up with an algorithm to, given a game state, quickly compute the odds of all subsequent outcomes in polynomial time.
Based on this algorithm, I've been building a bot [2] to integrate with Betfair's games API to play automatically for me.
After finishing the first iteration, running it for a bit and losing a few Euros, I quickly realised that some of my assumptions as laid out in the README were wrong (I will be updating this soon). Namely, I wasn't accounting for Betfair's commission on winnings (silly me). I currently have an EU-based account, which has a 6.5 per cent commission on winnings. UK-based accounts have the minimum at 5 per cent. The commission has an effect on the cheapest profitable odds you can provide, which has an effect on whether people want to match bets at those odds.
With this in mind, it quickly becomes clear that any unmatched bets you see in the market are far from the maximum profitable odds. This makes sense, and competing based on odds becomes impossible at this point. I am led to believe that the only way to make money is by having a UK-based account plus getting the bets to the market first. I have a few ideas on how to do this.
If I can get the bets to match at odds that guarantee profit in the long-run assuming UK-based commission of 5 per cent, then I'm going to call it a day.
Regardless, I'm not expecting to make too much money from this. I have a lot of free time right now (looking for a job), so if anyone wants to get into anything else available on Betfair together, then please get in touch at the email on my Github through [2]. My discrete probability and programming are okay, but it would be great to have someone who could share their statistics knowledge.
[1] https://games.betfair.com/exchange-hi-lo/standard https://games.betfair.com/exchange-hi-lo/standard
[2] https://github.com/jpcooper/betfair-exchange-hi-lo-odds https://github.com/jpcooper/betfair-exchange-hi-lo-odds
- teej 6y ago... you’re aware of the adage “the house always wins” right?
- klinskyc 6y agoBetfair is peer to peer, so the house just takes a rake (similar to poker). This means it is hypothetically possible for both you and the house to win.
- jpcooper 6y agoOn Betfair the house is you. You determine the odds. Let's assume that cards are dealt randomly. If I know the exact probabilities of every outcome I bet on, and I always bet with odds which have a margin over those probabilities, then I win in the long run.
- biztos 6y agoForgive my ignorance, but: why would anyone bet against you?
- asdf3331 6y agofor fun
- jpcooper 6y agoConsider the case of betting with a traditional bookmaker. The bookmaker lays (bets against) an outcome. You back (bet for) the outcome. Each party is betting against the other.
- albedoa 6y agoI'm a long-time poker player and recent political bettor. Gamblers routinely overestimate their edge or don't care whether they win. Often it's a mix of both. There are still many many many people who are willing to bet on the results of the US presidential election: https://www.thedailybeast.com/gamblers-bet-big-on-trump-and-now-they-now-claim-fraud https://www.thedailybeast.com/gamblers-bet-big-on-trump-and-...
- jpcooper 6y agoWhat do you base your political bets on?
- albedoa 6y agoFor one-offs, picking the favorite is good enough for most players. Thy are just seeking entertainment and maybe to win a little money. For instance, in a race between two candidates priced at $0.70 and $0.30 (ranging from $0.01 to $0.99 before resolution), many players are happy to pick the favorite indicated by the market. Of course, if those prices are accurate, then they will lose money in the long-run after fees. For players who are betting more frequently and over a longer term, it's like any other speculation: You might assess the $0.30 underdog to have a 40% chance of winning. She is still the underdog, but you profit over the long run by buying her at her too-low price. Those players are scooping that value wherever they can find it. For major electoral events that involve a populist with a large, loyal, and misinformed fanbase, the value pretty much finds you. Both of the described groups are making lots of money because the markets are wildly mispriced.
- aj7 6y agoEconomic reasoning states that the vig will absolutely swamp any small edge you may discover.
- jpcooper 6y agoSomeone has to provide a market. That person has to do it profitably. I am assuming that this is possible, otherwise it would not be possible to play the game. My reasoning could of course be off. Could you elaborate?
- jonahx 6y ago> Someone has to provide a market. That person has to do it profitably. But by this reasoning no one would play blackjack at the casino. That is, how do you know people laying these bets aren't just gambling at a disadvantage? You could view the whole thing as one more novelty game the casino is spreading.
- jpcooper 6y agoI am assuming that all computer players of this game have access to the algorithm which I have discovered. I am assuming that all computer players have figured out the simple formula which gives them the cheapest profitable odds to back or lay an outcome given the commission and the outcome's probability (thanks to one of your previous comments). I am assuming that there will be punters who bite at the odds I provide. If there weren't, then the game would not be sustainable. I came across a "betting guide" for sale for this game which claims to advise on bets based on the "trends" seen in the game. I don't know what this means, but it gives me hope that there are people out there willing to part with their money in my direction. Failing that, the novelty was an interesting one, and it's all about the journey, dude!
- jonahx 6y agoTo clarify, I'm not saying your assumptions are necessarily wrong, or that you shouldn't try to test them and see what happens. I'm just proposing another possibility is that everyone playing on both sides is a "punter" having fun (or deceiving themselves). In any case, that everyone is losing long-term. With 5% vig I'd guess that's the most likely possibility.
- kirykl 6y agoUsing a bot is acceptable under their terms?
- jpcooper 6y agoYes. They provide various APIs for this.
- ghgr 6y agoThanks for sharing (I recommend taking a look at his GitHub repo [2], where he nicely described the game and his approach). Some time ago I had a similar project with BetFair soccer matches. I assumed that the number of goals from each team is given by a Poisson process. Then, I used the largest market (Win/Lose/Draw) to estimate this parameter. With this information I could estimate the "fair" odds of more exotics bets (like e.g. team A will score 3 goals more than team B), which were often mispriced, and then use the Kelly criterion to estimate how much to bet. All in all a nice project, but... at the very end -just before deploying the bot- I realised that the BetFair Exchange is not open to Germans, so I wrote a blog post and open sourced the code. Still, a nice learning opportunity :-)
- jpcooper 6y agoThanks. I would like to point out again that the code is out of date, and the margins displayed there are miscalculated due to not accounting for commission. The general spirit remains. Did you backtest and show potential returns? Can you link to your model? Did you come across "Scoring dynamics across professional team sports: tempo, balance and predictability" [1]? They apply a Poisson model to team sports. I mentioned this paper to a company involved in betting who I interviewed with once, and they told me that they were doing something similar, but way more involved. It demotivated me somewhat regarding implementing it, making me wonder whether there really was any juice left to be squeezed from it. [1] https://link.springer.com/article/10.1140/epjds29 https://link.springer.com/article/10.1140/epjds29
- ghgr 6y agoI wasn't aware of that paper, but it seems we came to a similar conclusion. From the paper: > Across all sports, scoring tempo - when scoring events occur - is remarkably well-described by a Poisson process, in which scoring events occur independently with a sport-specific rate at each second on the game clock. So, yes, basically that was my concept. Estimate its parameters and then you'll have the "real" odds. Any difference with the market ones is a potential of profit (considering the house fees). I couldn't backtest it since I couldn't find free historical data for all types of markets (then again, maybe I didn't look hard enough). I forward tested it, though, and it seemed to work. My code is here [1], which also links to a blog post describing the method. Feel free to take a look and contact me to discuss these ideas. Also, if you're interested in mathematically modelling probabilities, we are looking for team members to develop a product to estimate the risk of default in loans. After all, a loan is another kind of bet, that takes place in a slightly harder to model environment. [1] https://github.com/ghgr/BetFair_Arbitrer https://github.com/ghgr/BetFair_Arbitrer
- chillydawg 6y agoHeh. I used to work on those products, way back in 2008 or so. Let me save you some time: you won't get any action at good odds. Or, if you do, it'll be a tiny amount. Betfair run their own bots on those markets AND they get their bets into the market BEFORE the market opens to the public. Good luck anyway!
- jpcooper 6y agoThanks for the heads up. It's good to get confirmation that that actually happens. I'd be surprised if it didn't. I'm not too far from implementing my final idea to get profitable bets in. If that (probably as you say) fails, then it was a fun learning experience.
- plafl 6y agoAnd they will cannibalize your profits, up to 60%, if you start to make significant money. And they can kick you out anytime they want. It's all in the terms and conditions.
- chillydawg 6y agoIMO the premium charge is much better than commission as a pricing model. It's less predictable day to day but long term it better aligns incentives between the winning customers and the exchange. They don't really kick people off unless they're exploiting bugs in the exchange or engaged in illegal activity. They certainly won't ban you for winning on the exchange.