What if a player happens to play the worst teams at allowing points. And then plays a team that doesn’t allow that many.

In theory, that would be reflected in the different ranges of rolling average windows. So in your example, player gets 2-3 games against terrible teams -- that would show up in the "Last5" rolling average, but not as much in the "Last40" rolling average.

The same thing applies to rollover years. XYZ team now has new players & coaches, and they're 10 games into the new season. So for a little while your "Last40" rolling average will be influenced by last year's stats, but the "Last5" and "Last10" averages should balance that out.

I agree with you that using only small windows like Last5 and Last10 could really skew the results.

Ha. I don't feel like I'm getting "shit on," it's just the usual % of users here who don't know how to contribute to or advance a discussion, so they default to shutting down any further conversation. Welcome to the Internet. I appreciate you advancing the conversation.

It makes sense to me that differentials basically represent the exact same thing as away vs home stats, as you've explained it. Using [home_pts, away_pts] is likely going to get similar results to [pts_diff] -- totally agree.

My models (all sports) typically use mirrored features for both home and away. So, for MLB, [a_woba, h_woba, a_bullpen_era, h_bullpen_era] and so on. Then I'll created "_diff" features for all of those, and go full kitchen sink, at least to start.

But yeah, I actually was saying (or wondering aloud), in the original post, if you could potentially get better/improved/more efficient results by just using home team features. It seemed plausible, at least. Throw 60-80 home features at it, targeting "home_win", and at some level the model should figure out the relationships and impact to the target. It was really just a curiosity question of how much opponent stats matter. You just as easily flip it: what happens if you take out all the home features and only use away features?

Anyway, end of the day, I like to tinker with different theories and wanted to see if anyone else had gone down this road before and had any empirical evidence one way or the other.

(For the curious: I did try stripping out the away features and cycling through different home feature combos. And I did get slightly better metrics, but not major enough to conclude anything. Differentials alone still seem to get the best results, FWIW.)

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.

Without knowing the specifics of what kind of model you're using or how much historical data you have to work with, I use several different ranges of rolling averages as features in my models. So for ppg I might have a rolling average on the last 5 games, the last 10 games, the last 20 games, and the last 40 games. That assumes, of course, that I have at least one previous season's worth of historical data.

I'm not really sure, I haven't compared it to normal distribution.

Same features. Spent days playing with that feature set (different combinations, recursive elimination, you know the drill) trying to get reliable scores via regression, but it never played well when mapped against real sportsbook betting data. Kept the same features, switched to classification + Inv CDF, and it showed profitable results. I think what pushed me over the edge was the regression model showed slightly better r2, mae, and mse scores than the sportsbook but couldn't show profit. After going w/ classification, I did a raw mae and mse with the Inv CDF spread predictions and they were remarkably better than both the regression scores and the sportsbook scores. Keying against log loss made the biggest difference.

I'm testing a different approach towards the same goal and so far it seems to be showing really good results. Here's the slight twist: instead of trying to predict the score as the primary output of the model, I'm finding it's easier to predict win probability (especially if I fine tune for the lowest log loss possible) and then convert the win probability to either a point spread or a total using inverse cumulative distribution. Still tinkering, still testing, but I feel like this approach is giving me more options than trying to use points/score as the primary output.

Follow the model. And ignore specific team results for a while if it's causing recency/confirmation bias.

Definitely add some form of Kelly to make sure you're not oversizing on long shots. I had the A's on my list for something like +170 the other day, I think the wager was not even 3/4 of a percent of the bankroll.

But definitely don't start "fading" teams. There's 2,000+ games in a season. Every year I do this, there are 2-3 of those crappy teams that end up making decent profit. Believe it or not, the Nats and their sub-500 performance are my most profitable team in 2024 so far. The Angels are Top Ten. Meanwhile the Braves, Twins, and Phillies are all net losses so far.

Yeah, I shudder every time the damned White Sox show up as a value bet. But I just try to remind myself that I only need to win a few of those bets to be profitable.

(BTW, I think you're right to evaluate the bullpen as a whole and not try to get down to the individual player level. Relievers are way too volatile as individuals on a game-to-game basis, and you have no idea which of them will actually appear in any given game.)

It also covers golf, volleyball, e-sports, rating systems in general, ELO systems in particular -- the principles are all there, if you have the creativity to apply those principles to other things.

Like everyone else is saying, if you're reasonably certain you're +EV overall, max volume is better than trying to cherry pick 1-2 bets. All that does is increase your daily variance and lengthen the timeline to stability.

The 2nd question is a bit more interesting and I don't know that I've completely solved it to my own satisfaction. Lots of trial and error in there.

I use a scaled down Kelly formula like, I assume, most algo-bettors do. The scale is per single bet, though, and I found out the hard way that Kelly doesn't factor in daily volume. It works great if I want to stay in the range of 1-1.5% per game AND I'm only betting 4-6 games per day. (Fairly typical for me in a sport like NHL or NBA.)

It does not work for me in a sport like NCAAF or NCAAB. So I suppose I'm paying more attention to the larger number, % of bankroll per day, and then scaling the Kelly % per game from there.

Bankroll is established independently for me, at the start of a season. How much am I ok with losing on MLB this year? Is it $2K, $5K, $10K? And then from there I work to figure out how much I can bet per game and still keep myself hovering around the 8-10% per day figure. That might even be too high, like I said, I'm still working this out for what my comfort level is. (10% a day could be too high if I feel like it's possible that normal variance might result in 10-12 losing days in a row.)

It's an LR binary classification model, so the output is win probability.

Hard to say how big of a change this particular datapoint is causing by itself. I've got this pool of 350-400 features and a bunch of convoluted recursive functions that add & subtract features in different combinations, always testing what the new metrics would be and whether it's an improvement from the previous iteration of combos.

It's mostly just a curiosity exercise, I rarely change out the featureset for the "live production" model. But it happened to catch my eye recently so I thought I'd post about it for a fun puzzler.

I'm definitely going to remove this stat from the pool tonight and try another round of iterations, just to see what happens.

That would make sense. In the specific case of how my model is using the data, though, I'm only getting these stats for starting pitchers. And since 2021, it looks like only three pitchers (that have started games) have even used the pitch:

Fangraphs Starters Pitch Types

Kinda makes me wonder why I'm including that pitch type at all ... I think I'll go back to the sandbox and just remove that pitch, see what happens.

Yep, that's really the purpose behind grabbing the pitch type % and the pitch type performance (eg this pitcher throws 25% sliders and his slider is 1.5 runs above average), I'm using all of that to generate a specific metric for the starting pitchers. In my sandbox, I accidentally left all of the pitch type % data in the feature list, which is how I stumbled on this weird little anomaly. You're probably right about it being a simple matter of overfitting.

That datapoint doesn't make sense ...

Here's a random tidbit that I've been mulling around in my head for a few weeks.

I've got an MLB model, works fine, all good, I'm happy with it, and so on. Every couple of weeks I throw the most recently updated data into a sandbox and futz around with optimizing the feature combinations. You never know, maybe there's a better subset combination of the 400 possible datapoints than what I'm currently using, and I enjoy the hunt.

Here's the weird thing. Every time I do this exercise, there's one datapoint that keeps showing up in the list of possible feature combinations that makes all the metrics better (cv accuracy, logloss, brier, etc) -- "knuckleball %"

It's a stat that Fangraphs makes available, along with a bunch of other pitch type data. It reflects how often the starting pitcher makes use of the knuckleball. And as I look at the available data on Fangraphs, as you might expect, basically NOBODY is using this pitch. Which means that feature in my dataset is going to be "0%" almost all of the time.

It's a head scratcher. My inclination is to think "there's no logical way that statistic is useful in any way to a predictive model," but there it is, it just keeps showing up in potential feature combinations as an improvement to the metrics. What the hell do I know, maybe there's some underlying reason why it improves the overall model performance, but I'll be damned if I understand it.

Yuck, manually inputting odds ... I remember those days. How's your skill at python scripting? Depending on which specific sportsbook you want your odds from (and I assume you want specific odds from the book you're using to place bets), it could be relatively painless to scrape the numbers you want, using Beautiful Soup or Selenium or some combination of the two. That's Step 1. The next step is using the Google Sheets API library in python to write your scraped odds data straight to your spreadsheet, which is very easy to do.

That sucks, and I feel your pain! As others have said, if you can backtest your model on previous seasons, absolutely do that. There's nothing quite like a large set of data to assure you that the model is fine, or that it does indeed need some adjustments. If you can't get backtest data, can you at least look at ALL of this season's games (even the ones you didn't bet) and look for any weird patterns? Like (just making this up for illustration) are home teams suddenly failing to cover more often than usual in the past few weeks? Maybe underdogs are having an above-average hot streak that you'd expect to regress to normal? Try to find some objective measurements along those lines, or even within your own betting data.

In general I would say adjust your model as an absolute last resort. If you change it now you basically have to reset to zero and start the tracking process all over again.

Good luck with whatever you decide to do!

divs = li.querySelectorAll('div[aria-label*="Moneyline,"]')
divs.forEach(div => {
const ariaLabel = div.getAttribute('aria-label');
labelArray = ariaLabel.split(',');
team = labelArray[0].trim();
moneyline = labelArray[2].replace("+","").trim();
oddsObject = {'team':team,'price':moneyline}
currentOdds.push(oddsObject)
});

That's the heart of the code, which as you can see is a simple selector based on the aria-label and whether it contains the type of odds I'm looking for ("Moneyline", "Run Line", etc)

You could very easily just do this with Selenium based on that same logic and skip the whole "turn it into a Chrome extension" business. That's what I eventually did.

OP asked for something more "beginner friendly" because Mack's book was too advanced, and "Mathletics" is definitely for beginners haha

They do not. Betfair was available for a short time in New Jersey (which is zero help to me, I don't live there) but not any more. Prophet Exchange is only available in two states (not mine!), and SportTrade is available in maybe three states (again, none of them mine). It sucks.

1 - Players like to win and like to play well individually, no matter what the game. It makes them look good, they didn't get where they were by being soft and lacking motivation.

2 - Other sports bettors and the mainstream narrative is often about motivation - this stuff is going to be priced in to some extent at least. My gut tells me it might be 'overpriced'.

This, this, and more of this. Trying to mind read a player's motivation, let alone a whole team, is a fool's errand. If a team has nothing to play for because they're already eliminated, individuals still have motivation. If a team has nothing to play for because they already clinched a playoff berth, that will usually be reflected in the active lineup/roster (good players get rested, for example).

But that doesn't mean the markets won't buy into the Motivation Narrative and do weird things to the prices. I'm a little surprised at the number of professional bettors I've heard mention things like "this is a revenge spot for Team X," or "Team Y got embarrassed last time out, they've got something to prove now," and even "Team Z is coming off a big emotional win, expect them to play flat in the next game." If the pros talk like this, you can be sure they're betting into the markets like this.

So far, every research project I've done on the historical data -- do teams win more after getting blown out, do teams win less after "emotional" nail-biter wins, is there any impact in "let-down" or "bounceback" games -- has shown zero impact.

Other have already mentioned the rake. I'll add that playing DFS, for me personally, didn't offer as lucrative payouts as straight-up old school betting. Granted it's been probably 10 years since I did DFS and I'm sure the product offering has expanded, but back then it was strictly competing against hundreds of other players for a shared prize pool. You'd have everyone submitting such similar lineups (because of so many online tools and optimizers) it was nearly impossible to find an edge. At least with sports betting, it doesn't matter of 10,000 of us end up betting the same team -- if we win, we all win 100% of the promised payout.

I want to get more into that space, I just don't know much of what's out there. Seems like every time I start researching it, I keep finding platforms and apps that won't take US customers, or if they do, it's limited to certain states.

As an example if we monitor all the games of a single day and find a trend where green has not rolled for the last 150 games. Placing a bet on green gives us more EV. Chances of green rolling has not changed however it is more likely for it to appear in next 150 rolls.

As much as I wish this were true, it's the exact same logic as the old lady sitting at the slot machine who runs out of money and says to me, "you should take this machine, it hasn't hit in a long time, it's due for a big winner."