Skip to content

LeSingh1/edge-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

edge-models

Player prop projection models for 13 sports. Give the model a player's recent game log and a betting line, and it returns a calibrated probability that the player goes over, plus the expected value and a Kelly stake for a slip.

I built this for EdgeBoard, a prop betting tool I was working on. The models are trained on about 147 million synthesized (player, line, outcome) rows pulled from real game logs going back years. This repo ships the trained calibrators and the prediction code so you can run it yourself.

What it does

  • Projects a stat from a player's recent games, weighted toward recent form.
  • Turns the projection and a line into a raw over probability (normal model).
  • Corrects that probability with an isotonic calibrator trained per stat type. The correction is clamped to +/-0.20 so a sparse bucket cannot fake confidence.
  • Scores flex and power slips with the real PrizePicks payout tiers and quarter Kelly staking.

Results

Held out test split, one row per sport, sorted by lift over a no-skill baseline.

sport accuracy brier logloss baseline lift test rows
NFL 94.7% 0.046 0.184 0.252 +26.9% 1.04M
NHL 92.3% 0.060 0.217 0.281 +22.8% 3.05M
NCAAF 93.8% 0.053 0.203 0.262 +22.4% 1.04M
SOCCER 94% 0.052 0.198 0.249 +20.6% 3.33M
NPB 93.1% 0.058 0.214 0.268 +20.3% 0.33M
MLB 92.2% 0.059 0.214 0.264 +19% 3.22M
PGA 91.4% 0.064 0.227 0.259 +12.4% 3.03M
WNBA 87.7% 0.087 0.291 0.307 +5.1% 2.33M
AFL 88.3% 0.085 0.284 0.298 +4.7% 3.17M
NBA 88.3% 0.084 0.280 0.290 +3.3% 3.22M
SACB 87.6% 0.088 0.291 0.301 +3.3% 3.33M
TENNIS 86.7% 0.090 0.296 0.306 +3% 3.04M
LoL 82.9% 0.123 0.391 0.393 +0.6% 0.07M

Honest read: the edge is real but uneven. NFL, soccer and college football beat baseline by 20% or more because their lines are softer. NBA, tennis and esports are close to efficient, so the lift there is small. I would not bet the LoL model. Full notes per sport are in results/backtest.md.

Run it

git clone https://github.com/LeSingh1/edge-models
cd edge-models
node src/predict.js --sport nfl --stat "Pass Yards" --line 248.5 --log 270,233,251,288,240
node tests/calibration.test.js

How it works

The full write up is in docs/methodology.md. Short version: recent-weighted projection, normal model for the raw probability, per stat isotonic calibration with a +/-0.20 clamp, then EV and Kelly. The clamp is the most important piece. Without it, thin calibration buckets produced fake 95 percent calls that contradicted the projection.

Per sport models

  • NFL: +26.9% lift, 94.7% accuracy
  • NHL: +22.8% lift, 92.3% accuracy
  • NCAAF: +22.4% lift, 93.8% accuracy
  • SOCCER: +20.6% lift, 94% accuracy
  • NPB: +20.3% lift, 93.1% accuracy (stale)
  • MLB: +19% lift, 92.2% accuracy
  • PGA: +12.4% lift, 91.4% accuracy
  • WNBA: +5.1% lift, 87.7% accuracy
  • AFL: +4.7% lift, 88.3% accuracy
  • NBA: +3.3% lift, 88.3% accuracy
  • SACB: +3.3% lift, 87.6% accuracy
  • TENNIS: +3% lift, 86.7% accuracy
  • LoL: +0.6% lift, 82.9% accuracy

Each sport also has its own focused repo (edge-nfl, edge-nba, and so on) for people who only care about one league.

What is here and what is not

Included: the trained calibrators in models/, the projection, calibration and EV code in src/, per sport model cards, a test, and the full results above.

Not included: the scrapers and the raw 147 million training rows. That lives in the private app. This repo is the model, not the data warehouse.

License

MIT. Not financial advice. Sports betting has a built in house edge and most people lose. If you use this, bet small and bet responsibly.

About

Player prop projection models for 13 sports, with isotonic calibration and EV tooling

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors