Grading code

The code that turns captured files and contest results into the numbers on this site. Published so the work can be checked.

  • grade.pyGrades one slateMatches players to DraftKings, builds the shared player pool, and scores every source's projections, ownership and lineups.
  • baselines.pyThe two baselinesThe recent-form and salary baselines every tool should beat, using only what's known at the capture minute.
  • solver.pyThe lineup solverBuilds each source's highest-projected legal lineup and the slate's perfect lineup. One solver for every source.
  • aggregate.pySeason numbers and rangesPools graded slates, works out each 95% range by resampling slates 2,000 times, and decides who leads a row.
  • sports.jsonThe rules as numbersRoster slots, the salary cap, the player-pool floor, the minimum slates before ranking and the miss floor, per sport.

What's here, and what isn't

  • Every published number comes from these files, run on the files captured before lock and the contest results downloaded after the games. This is engine version 0.3.0.
  • Season ranges use a fixed starting seed, so the same graded slates always give the same ranges.
  • Companies' files aren't here and never will be. Only the code is published.
  • The small files that read each tool's export format and match player names aren't published yet.

The rules these files follow are in the rulebook. If you find a mistake, tell us: grading errors are fixed publicly.

The DFS Benchmark Weekly

Standings changes, slate winners, the week's perfect lineups and the biggest form movers. Every Monday, starting after the first week of NBA grading.

One email a week. Unsubscribe anytime. Privacy