Skip to content

fantasyfb v0.5.0

Choose a tag to compare

@tefirman tefirman released this 25 May 04:43
· 242 commits to main since this release

fantasyfb v0.5.0

Best ball support across the draft and simulation stack (#31), and cost-plus-N keeper support across the salary cap V2 stack (#29).

pip install --upgrade fantasyfb

Highlights

  • Best ball drafts and sims. SeasonSimulator.simulate_season(best_ball=True) auto-fills the optimal weekly lineup (fixed slots greedily, then flex), and snake-draft cockpit gains bestball / nearestbestball commands that rank players by upside-weighted VORP (points_rate + 0.5 × points_stdev − replacement_rate) — high-ceiling players climb the board because their boom weeks always count.
  • Best ball–aware projections. compute_best_ball_team_projections Monte Carlos per-player weekly projections into team-level (avg, stdev) for the season simulator, capturing the variance benefit that comes from competing players for the same slot.
  • Cost-plus-N keeper pricing. New --keeper-surcharge flag (default 5) on salary-cap-draft; keeper price = last year's salary + surcharge. Pass --keeper-surcharge 0 for the previous behavior of using the CSV salary as-is.
  • Keepers wired through the salary cap V2 stack. build_board accepts a keepers DataFrame and excludes keeper players from the dollar pool (VORP is still computed on the full pool for correct replacement levels), so inflation starts at ~1.0 regardless of how many keepers are in the league. MockSalaryCapDraft and backtest_salary_values gain parallel keeper support for accurate mock drafts and surplus comparisons.
  • Per-team keeper budget validation. If any team's keeper commitments exceed the cap, those keepers are dropped with a warning before the draft starts. Resume-safe: keepers already present in an --inprogress file are skipped when --keepers is also passed.
  • Yahoo team name handling. Draft cockpits now default to real Yahoo team names instead of generic placeholders, and the keepers CSV fantasy_team column accepts the user's actual Yahoo team name.

Also in this release

  • _simulate_playoffs guards against unsupported bracket sizes — anything other than 4 or 6 playoff teams returns early, covering DraftKings / Underdog best-ball formats with no traditional playoff bracket.
  • build_board no longer raises KeyError: 'fantasy_team' when called on a bare projection pool.

See CHANGELOG.md for the full list.