Vegas Lines and Injury Reports in My Lineup Optimizers

My free lineup optimizers for MLB, NFL and NHL now pull two things you used to have to look up in another tab: the league’s injury report and the Vegas lines. The part I care about most is how the Vegas lines get used, because the first version of that rule quietly did the opposite of what I built it for. Implied team totals are the most useful number on a DFS slate that isn’t in the salary file, so this is the post about how the tool gets them, what it does with them, and the one rule I had to throw away.

Strip chart: QB game totals under three rule settings; the first Vegas rule put 0 of 10 stacks in 50+ games, the shipped rule put 9 of 10 in 47+ games
Ten NFL lineups per row, built on a FanDuel slate with test Vegas lines. My first rule made the solver dodge high-total quarterbacks; the one I shipped does the opposite.
Continue reading “Vegas Lines and Injury Reports in My Lineup Optimizers”

The MLB Lineup Optimizer Now Pulls Live Batting Orders

The MLB lineup optimizer just got an upgrade that matters more than any of the lineup rules it already enforced: it now knows who’s actually playing. Confirmed batting orders and probable starting pitchers load automatically from Major League Baseball’s own schedule data, and two new lineup filters use that information to keep bench bats and non-starting arms out of your build by default.

Until now, the tool would happily stack a hitter who wasn’t in that day’s starting nine, or a pitcher who was penciled in for Thursday, not today. That’s on the player to catch by cross-checking DraftKings against a lineup site. Not anymore — the optimizer pulls the day’s confirmed lineups itself and marks every player accordingly, the same way the NHL version of this tool already does with starting goalies.

Bar chart: 201 pitchers in the DK player pool versus 12 actually starting that day
On a real 6-game DK slate, 201 pitchers showed up in the player pool — only 12 were actually starting.
Continue reading “The MLB Lineup Optimizer Now Pulls Live Batting Orders”

NBA DFS Variance Without a Subscription

The NBA optimizer is taking shape, and the shape is strange: the stacking panel is empty, the position rules are the site’s own, and the one feature I actually care about is a number nobody else gives away for free. This is where NBA DFS variance comes in, and why it stopped being something you have to pay for.

Short version of the last three posts: basketball creates no linked scoring unit, so there is nothing to stack; I measured that across three seasons and the correlations are about an order of magnitude weaker than football’s; and the old Excel model I dug up had already reached that conclusion by deleting the columns. What survived all of that is one idea, and it came out of the spreadsheet.

Scatter plot of 3,302 NBA teammate pairs showing that players who split minutes score against each other
Continue reading “NBA DFS Variance Without a Subscription”

Every Constraint in My Excel NBA DFS Optimizer

A few days ago I wrote that a basketball rules file would come out nearly empty, and that the interesting part of an NBA optimizer is not the optimization. Then I went looking for something else and found a workbook I had forgotten I wrote: FCP Optimizer — Master v6.7, an NBA daily fantasy optimizer in Excel, with a change log that starts at version 4. So rather than speculate about NBA DFS optimizer constraints, here is the actual model, read straight out of the file.

It is a mixed integer program with about 200 binary variables, solved by CBC through the OpenSolver add-in. Everything below is what the sheet and its macros really do, not a cleaned-up version of it.

Diagram of the mixed integer program inside the Excel NBA daily fantasy optimizer, showing objective and seven constraints
Continue reading “Every Constraint in My Excel NBA DFS Optimizer”

The Textbook Fix That Made My MILP Twice As Slow

The textbook move, when a mixed-integer program solves slowly, is to tighten the linear relaxation. Add the constraint that makes the LP bound closer to the integer optimum, give branch and bound less room to wander, watch it finish faster.

I did that to the stacking constraint in my hockey lineup optimizer last week. It got twice as slow. Same slate, same solver, same lineups out the other end — 2.20 seconds a lineup before, 4.38 after. I reverted it and left a comment telling future-me not to helpfully fix it again.

Bar chart of seconds per lineup by stacking formulation: naive 3.00, cover inequalities 2.20, two-sided counters 4.38
Three formulations of the same constraint, same slate and solver. The textbook tightening is the slowest of the three.

Continue reading “The Textbook Fix That Made My MILP Twice As Slow”