Repository navigation
fantasyfb v0.5.0
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 fantasyfbHighlights
- 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 gainsbestball/nearestbestballcommands 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_projectionsMonte 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-surchargeflag (default5) onsalary-cap-draft; keeper price = last year's salary + surcharge. Pass--keeper-surcharge 0for the previous behavior of using the CSV salary as-is. - Keepers wired through the salary cap V2 stack.
build_boardaccepts akeepersDataFrame 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.MockSalaryCapDraftandbacktest_salary_valuesgain 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
--inprogressfile are skipped when--keepersis also passed. - Yahoo team name handling. Draft cockpits now default to real Yahoo team names instead of generic placeholders, and the keepers CSV
fantasy_teamcolumn accepts the user's actual Yahoo team name.
Also in this release
_simulate_playoffsguards 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_boardno longer raisesKeyError: 'fantasy_team'when called on a bare projection pool.
See CHANGELOG.md for the full list.