How I created an AI journalist and data analyst for my fantasy football leagues

By Stephen Shin

A ridge regression, a replacement-level baseline and a lot of backtests. What the model does and where it is still wrong.

I built FantasySummaryBot to keep the friends in my fantasy football league engaged every week and to give us some banter talking points. There is a lot going on each week, and it helps to have one place that summarizes what happened to everyone in the league. The bot turns data from ESPN, Sleeper, nflverse and FantasyCalc into weekly Discord recaps and playoff-odds forecasts.

Underneath it is a model that answers three questions: how many points a player will score, what that is worth, and how strong a team is as a result. Each question has its own layer, and each layer feeds the next.

  1. ProjectPoints per game for each player
  2. ValuePoints above replacement, now and in future seasons
  3. Roll upTeam strength, power rankings and playoff odds

Layer 1: projecting a player

The projection is a ridge regression, a plain linear model with a penalty that keeps it from overfitting. It trains on every finished season since 2013 and sees only what was known before week 1 of that season.

Veterans get one set of inputs: points per game over the last one and last three seasons, games played, age relative to the position's peak, draft pick, whether the player changed teams, depth-chart rank and whether he is a starter. Rookies get a separate model that uses only draft pick and depth chart, because they have no history to feed it.

Games played is modeled on its own, with a flag for players who are inactive at week 1 (injured reserve, suspended, practice squad and so on). That flag says little about how well a player scores and a lot about how many games he plays, which is why games played has its own model.

To test the model, I ran a walk-forward backtest for each season from 2016 to 2025. Each run trains only on earlier seasons, predicts the season in question and compares the result to what happened. It is scored against simple baselines such as repeating last year's numbers.

Once games start, a player's actual points per game is blended with his preseason projection. After 3 games, actual and projected count equally for the current season. For future seasons it takes about 10 games, because a hot start predicts next year less well than it predicts the rest of this one. Those numbers, and a 4-week prior on games played, were chosen by backtest.

Layer 2: turning a projection into a value

For the current season, value is expected points above replacement. Replacement is the best player you could realistically pick up at that position, given lineup size and bench depth. In superflex leagues the replacement quarterback is much worse, because teams stash quarterbacks, so the same quarterback is worth more there.

The model also has to account for uncertainty. A player projected right at replacement still has real upside, because if he busts you start someone else. So instead of using one number, it averages max(0, points minus replacement) across a range of outcomes. The width of that range was measured in the backtest: 3.6 points per game for quarterbacks, 3.9 for running backs, 3.4 for wide receivers and 2.9 for tight ends.

Dynasty value is this season plus the next four, each aged along a curve. The curves are half typical shapes (running backs fall off around 27 to 29, quarterbacks hold up until their mid-30s) and half fitted from my own data. That blend backtested as well as either one alone and removed an artifact in the fitted quarterback curve.

Projected futures are then calibrated against what players like him actually delivered. Veterans fade faster than projected, because of lost jobs and injuries. Rookies beat their projections in their first two seasons, so a single flat discount undervalued rookies by about 1.7 times.

Draft picks are valued as the rookie who would be taken at that spot, using this year's class as the template. No market data goes into the model anywhere. At the end, values are scaled so the league's most valuable player is 10,000, which lets them be compared directly to FantasyCalc's.

Layer 3: rolling players up into teams

A team's roster strength is its best legal lineup each week, using each player's projected points per game multiplied by his chance to play. Chance to play comes from injury status and fades over the coming weeks. It is zero on bye weeks and for long-term injuries. The total is divided by the league average, so 100% is an average team.

Power rankings combine four things: a standardized all-play record (35%), scoring average (20%), the last three weeks (15%) and roster strength (30%).

Playoff odds come from a Monte Carlo simulation of the remaining games. Roster strength gets 25% of the weight and past scoring gets 75%. The 25% is a prior, not a tuned number. On this season's data the best weight could have been anywhere from 0 to 1, so history keeps most of the say. Strength of schedule uses opponents' scoring averages for the games already played and their current roster strength for the games still to come.

What it still gets wrong

Three problems are still open. The model under-projects quarterbacks, it reads the depth chart as of week 1 so role changes during the season are missed, and rookie quarterbacks carry a lot of uncertainty.

It also drives less than you might expect. My config does not turn on the model's values for any league, so trades, drafts and waivers use FantasyCalc's market values by default. The model's projections drive the roster strength behind the power rankings, the playoff odds and the schedule ahead. Switching the values on is one line in the config, commented out for now.

Back to the ballpark