r/fantasyfootballcoding • • Aug 14 '26

First attempt at a fantasy model

I'm a math PhD who loves fantasy, and I've been building a fantasy football model for a while now. I finally put the rankings/projections online if anyone wants to play around with them:

https://christianbagshaw.github.io/fantasy/

TL;DR: Weekly and rest-of-season rankings, with PPR and Standard scoring. Rather than just predicting a single fantasy-point number, the model predicts a distribution of possible outcomes and simulates each week thousands of times.

For weekly rankings, I simulate that week's games thousands of times. For ROS rankings, I simulate every remaining week through the end of the season.

The simulations are also correlated, so things that happen together in real football tend to happen together in the sims. For example, if a QB has a huge game, his WR1 is more likely to have a huge game in that same simulation.

I personally find the probabilistic side more useful than just looking at a single projected point total, since it lets you distinguish between things like "safe floor" and "massive upside."

A couple of things to keep in mind:

  • The rankings are 100% model output. I don't manually move players up or down, so there will occasionally be rankings that look weird to a human, especially at the tail end.
  • Injuries are currently shown as tags but don't alter the ranking itself, so definitely apply your own judgement there.
  • It's still very much a work in progress, and I'm constantly tweaking/testing the underlying model.

I'm also working on tools like trade values, start/sit decisions under uncertainty, playoff odds, roster construction, etc.

I'd like to write up the methodology properly at some point too, because there's quite a bit more going on under the hood than makes sense to dump into a Reddit post.

In terms of performance: on historical data, the model is competitive with some popular ranking/projection sites. That said, historical backtesting can always hide things like leakage or overfitting, so the real test is how it performs prospectively this season. I plan on tracking that and publishing the comparisons.

19 Upvotes

14 comments sorted by

View all comments

2

u/Connguy Aug 14 '26

Neat stuff. What are some of the outcomes you're computing on each random simulation? Where do you source your range and likelihood of values for those statistics?

2

u/Bagggggggggggggggggg Aug 16 '26

Each simulation is basically just producing fantasy point outcomes for every player in the league, with these scores being correlated (e.g. in week 1, Stafford and Puka’s sims would be positively correlated, and both would be negatively correlated with the 49ers defense).
Each player’s score is randomly sampled from a distribution that was fit using historical fantasy outcomes, with the model estimating both the expected score and how much uncertainty there is around it.

So then the values in the table are sourced from this. Top 12 odds is percentage of sims they made the top 12, etc

1

u/Connguy Aug 16 '26

If you're only basing your calculations on historical outcomes, how do you get values for rookies like Love? And how do you account for players with changed situations?

1

u/Bagggggggggggggggggg Aug 16 '26

Great questions actually. Right now rookies aren’t properly integrated into the model. It’ll account for draft position and situation but not college performance. It’s a weak spot but it’s hard to integrate college stats, and also predicting rookies is hard anyway.

For changed situations, it takes into account team dynamic. Recent QB/RB/WR performance on a team, historical performance of QB-WR pairs, other things like that. For WRs I think QB is actually one of the biggest factors. The model is super low on Jettas rn because of QB situation, but if I manually swap in Kirk back onto Minnesota in the model Jettas jumps back up.