algobetting

r/algobetting9.1K subscribers4 active
Welcome to /r/algobetting

This community was created to discuss various aspects of creating betting models, automation, programming and statistics.

Please share the subreddit with your friends so we can create an active community on reddit for like minded individuals.

Pinnedby Wov
25
5
4.2y
Creating a collection of resources to introduce beginners to algorithmic betting.

Please post any resources that have helped you or you think will help introduce beginners to programming, statistics, sports modeling and automation.

I will compile them and link them in the sidebar when we have enough.

Pinnedby Wov
125
15
4.2y
New and looking for resources

TL;DR: I'm a former military analyst, new to betting, looking to use my background in the military and apply it to gambling. However, I'm new to creating algorithms and looking for resources.

I started this account to be the main source of my Reddit research. I'm about two months into sports betting and looking to start building my own models for various sports and betting research.

If anyone has specific resources they like for things like APIs, research papers/backgrounds, modeling templates, other subreddits, or discussion boards, please feel free to post.

I found this sub about two weeks ago, and I’ll definitely be a regular around here. I recently separated from the military with over a decade of data analysis experience, and this seems like the first resource I’ve found with actual knowledgeable individuals.

I started gambling in April while working construction with a bunch of degenerate gamblers (lol). Their degenerate tendencies got me interested. I found a couple of niche markets, focused all my attention on becoming better informed in my bets, and I’ve won a significant amount of money in the last two months. This has led me down a rabbit hole of brainstorming different theories on future models and research methods.

My current theory, though I’m aware I'm new and inexperienced, is that there isn’t enough correlation/cross-correlation in the data used for picking props or markets. I’m aiming to create my own databases/models that I can use for my future betting and understanding of how odds are created.

Daily Betting JournalDaily Discussion

Post your picks, updates, track model results, current projects, daily thoughts, anything goes.

Best Practices for Storing Trades, Open Positions, and Prices for Market Making Algorithms

Hey guys,

I’m currently working on a market making algorithm for sports betting exchanges (betfair) and need some advice on the best ways to store trades taken, open positions, and price data. Here are a few questions I have:

  1. Trades Taken: What are the best practices for storing historical trade data? By this, I mean trades that you have taken.

  2. Open Positions: How do you efficiently manage and store information on open positions? Do you read and write to a DB and balance that in real time?

  3. Price Data: What are your preferred methods for storing L3 data? How do you handle efficient storage and retrieval for analysis?

Any insights, experiences, or recommendations are helpful. Thanks in advance for your help!

TLDR: Seeking advice on best practices for storing trades, managing open positions, and storing price data in a market making algorithm. How do you balance performance, integrity, and durability?

What is your favorite prop odds API?

I need an API that has WNBA prop lines. I don't need them to be real-time - 5m is fine. Free is great but willing to pay if the price is fair as well.

Daily Betting JournalDaily Discussion

Post your picks, updates, track model results, current projects, daily thoughts, anything goes.

When is a Model Officially Ready To Use?

Hello! Just found this sub and it’s truly amazing to see other people dealing with the same stuff I am. I have been modeling sports for almost 2 years now and it’s been such a fun experience.

Specifically just for MLB, I have 5 models currently for different bets. 3 of them are pretty much done outside of some small adjustments. The first one is hitting at about 66%, the second model is hitting at about 58% and the other is about 75% over the last 2 months of the 2024 MLB season.

My question is: When would you consider a model ready to use? When it’s hitting over 52% over 1 full season?

Machine Learning keyword to get started on building a model

To the A.I. gurus here,

I would like to find a keyword to help me get started to build a true machine learning model that can learn after I train it with my insight on a football match and A.I. will use this knowledge to analyze other past games

I'm from a Python developer background, so far all my rules that I build are If-Else statements and I'm wondering if there are existing concept or plugin that can help me simplify this rule based coding

Appreciate all help, thank you

1
6
7d
Profitable Bettors and Exchanges

Just a question I've had on my mind for a while.

I see a lot of posts out there from presumably profitable bettors/traders (even outside of just arb) enquiring on how to evade being limited/banned by books.

Why don't more of you, particularly those with your own models, trade on exchanges? They have little incentive to ban profitable users, after all. Would I be correct in assuming exchanges must be sharper for this to be the case? Are there other reasons?

Best API for Live-odds?

Hi there,

I'm looking for the best API that includes current live-odds. I worked with The-odds-API but their pre-match and live odds are way too slow.

It can be from any sportsbook.

Has anyone been limited on fliff?

And what are the best strategies to not get limited? Thanks.

Classification modeling using ONLY home team data

Every classification model example I've seen uses the binary target on the home team winning or losing. So that's how I've always built my classification models. Target is "home_win" or some variation of that.

I started thinking today about cutting my feature set in half and only using data related to the home team. Partly as an efficiency exercise. Reduce the number of variables in play, don't throw the kitchen sink at the model.

What prompted this was my collection of "differential" variables. For example, if I have "away average points" and "home average points," I'll turn that into "home average points differential" and use that engineered feature instead of the two individual features. But my differential features are always keyed to the home team, and those features are consistently among the best performers.

I'll backtest my theory of course, but I was curious how many of y'all use models that emphasize home team data vs a mix of both home and away.

Daily Betting JournalDaily Discussion

Post your picks, updates, track model results, current projects, daily thoughts, anything goes.

Pinnacle's Volume and Sharp action

Hi guys. As the title says I'm using some services to track Pinny's dropping odds but I was wondering if their is a way to track volume or sharp action. Sports Insights has some similar features but only covers American leagues.

Website with free API that works in Canada?

I know this question has been asked a lot but I am only interested in being able to place bets through an API. No need for getting historical data and definitely don't care about live/delay in odds etc.. All my placing of bets will be pre-game.

I thought Pinnacle would work but the API is not free. Not doing arb, just want to programatically place bets through Python code on the daily.

Tried scripting bots through playwright but am a beginner in it so could not circumvent the anti-bot detection of any website.

Thanks for the help!

2
4
10d
Pinnacle closing prices

Are pinnacle closing prices delayed if youre logged in but not funded ?

Algo for efficiently calculating best combination bet hedges

Hi all,

I figured this would be the place to ask for some betting related algorithms. As the Euros are on, many bookies give promotions, and I am in the market to make the most out of these promotions as I can.

Usually these are promotions like, place a 20 euro bet with minimum odds 1.5 on this match, get a 10 euro freebet! It is possible to hedge this bet at some other bookie, for a loss of at most 1 euro (dependent on the match/market), leaving a cool 10 euro freebet bought for 1 euro.

The freebet itself can then often be hedged at an "efficiency" of >80%, giving me 8+ euros back and leaving 7+ euros in profit.

For singles, I have this algo decently under control, I can simply check the cost of each hedge for all matched markets for all bookies and select the one that fulfills the requirement for the lowest cost. If #MM2 = amount of matched markets of size 2 (over/unders), #MM3 = matched markets of size 3 (money lines), #B = amount of bookies, then the brute-force approach has me check

```MM2 * #B^2 + #MM3 * #B^3 combinations.```

I don't have full support for all matched markets in football. #MM2 is in the order of 50 markets, whereas #MM3 is much smaller and contains only moneyline for FT and HT, and european handicaps, so let's say around 5. I currently support 20 bookies.

Meaning I am checking 60000 combinations for a single singles hedge.

For combination bets however where you need 2, 3 or even 5 events on the ticket to fulfill the requirement, the combinatorial explosion of the brute-force hits me in the face and the calculation of the hedges takes so long (order of 10s of minutes for a combi-2 ticket), that the odds have shifted by the time I finished and the calculated hedge is useless.

To completely hedge a combination bet, essentially you are creating a number of matched markets on the fly. If normally you had 2 MM2s, e.g. over/under 0.5 and over/under 1.5, then the combi2 matched market is:

O0.5 & O1.5

O0.5 & U1.5

U0.5 & O1.5

U0.5 & U1.5

So.. really an MM4. This is bad, as the match market size is the exponent in the formula and also the amount of MM4s has a factorial relation to the amount of MM2's => (#MM2 * (#MM2 -1))/2 = 1225 for my case. Meaning to check every combi-2 option for ONLY MM2s I now need to check 1225 * 20 ^ 4 = 196000000 options.... Jeeeeeez

For combined MM3s it's even worse, as you get a combi2 matched market size of 9! (3*3) and 20^9 = 512000000000

brrrr...

I am relatively sure there is a lot of redundancy in this though. For example, a lot of the combi2 matched markets have the same original MM2 as a base, so perhaps it is possible to cache some results related to this.
Perhaps there are some other tricks as well... I would be interested to learn of resources to read in this regard or other ideas that you whizzkids have here.

Daily Betting JournalDaily Discussion

Post your picks, updates, track model results, current projects, daily thoughts, anything goes.

Stats Considering Number of Games

For others out there, how do you guys consider certain stats as features given the number of games that have occurred? For example if I'm trying to predict a player's point totals for a basketball game - it doesn't make much sense to me to consider his ppg for a small sample of game's played as an accurate measurement of his true ppg. So in practice how are certain player stats weighed in order to have realistic values?

Thoughts on building an AI model to pick over/under on NBA games

I am currently building an AI model that uses a multitude of features and is trained on past seasons to predict the total score of NBA games. Then using those predictions, I will bet the over or under based on the lines set by the books. As of now I have tons of historical data on NBA games which contains dozens of stat lines. I manipulated these datasets to have rolling averages instead of the metrics for a given night. So for a given game we would have features such as team_assists_5Gavg which would represent the average team assists in the last 5 games instead of the team_assists for that night since we wouldn't know that in advance for obvious reasons. The features also include the opponent's rolling averages.

When I perform testing I like to use a whole season as it contains about 1,200 games and is big enough to provide some insight. The first metric I watch for is the average difference between the model's prediction and the actual total score. So far Ive been able to create models that score around the low 15s mark. I performed the same test on the lines set by Vegas for the 2023 season and found that the average difference was about 13 points. Which makes me believe in theory that if I am able to get a better average difference than the bookies I could profit since the predicted score will fall between the bookmaker's line and the actual score more often than not.

The second test I ran is to simulate a whole season of bets placed using the model's predictions and historical lines for those games. Some models have been able to perform around the 53-55% mark which is not so bad.

Finally I ran some tests to simulate betting actual money spread out across all the games and it provided some pretty positive returns.

Lets say that hypothetically I am able to fine tune a model to have average difference very close to Vegas and generate 58% wins on tests performed on multiple previous seasons. I would then have to come up with a betting strategy that would involve finding the right balance between risk and profit. I could technically divide the 1200 games in a season to 24 batches of 50 games for which I bet a certain amount evenly and do that for the course of a whole season.

The choice of the size of the batches is then also an important consideration and we would have to take variance into account.

But this same model could be used for other sports and if the model is able to peform at similar levels then the batch sizes could be way bigger making things less risky and the profit much quicker. I could technically bet on dozens of games every couple days.

I understand that we are still playing against the betting companies who have more resources and expertise to have an edge over us. But in a way I still believe that the over-under is mostly a bet against ordinary people who for the most part do not rely on analytics to make their decision.

Let me know if you have any thoughts I'd love to hear what people think of these types of approaches and if they could be pretty good in application or if I am missing something.

Which machine learning model for my use case?

I am sure this has been asked before but I have not found the specific answer I am looking for. My current strategy for betting is to find “locks” in alternative player props even if they dont pay well, and parlay (3-5 picks) them to be a +100 bet. I have done this for basketball and football.

This has been overall good, but I am determining these “locks” by hand which is time consuming and inefficient. I am about to graduate as a computer engineer so i have some technical background, but wanted to know if anyone had any input on which machine learning model I should choose.

Currently got the web scraping part done, and the overall idea would be i give the machine learning model a players historical stats during the season, the opposing team, and it tells me if there is a certain lock for that player and what it would be. I think an unsupervised model would be better, but that is my naive thought.

Please comment or PM me if you have any questions about it, if you would be willing to help, or if you have any course/paper that i would find useful :)

Daily Betting JournalDaily Discussion

Post your picks, updates, track model results, current projects, daily thoughts, anything goes.

Need a Speedy Sports Betting Odds API (US Sports Only)

I'm on the hunt for a lightning-fast API that delivers both live and pre-match odds for US sports. Speed is crucial, ideally matching the real-time updates you see on sports betting sites.

Here's the kicker: I'd love it if this API functioned like a WebSocket, allowing for continuous updates instead of constant polling. This would be a game-changer for my project.

For reference, I'm only interested in the major US leagues: NHL, NBA, NFL, and MLB.

If anyone has experience with a stellar API that fits this bill, please share your wisdom! Thanks in advance!

Circa Odds API?

Can anybody point me to a reasonably priced odds API that covers circa? I almost exclusively bet pregame so it doesn't need to be crazy fast, I am using the-odds-api right now and it gets the job done.