Skip to content

ianalloway/nba-ratings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nba-edge

CI License: MIT

Reusable Elo, win-probability, and Kelly-sizing primitives for NBA-style models.

Why This Repo Matters

This is the library layer of the sports ML stack:

  • reusable rating logic instead of notebook snippets
  • portable win-probability helpers for downstream services
  • Kelly and implied-probability helpers for decision support
  • small, dependency-light package design

Pairs well with nba-clv-dashboard for evaluation UI. Employer one-pager: case study.

What It Includes

  • Elo updates
  • logistic win probability
  • Kelly fraction sizing
  • American odds to implied probability

Install

pip install nba-edge

Example

from nba_edge import logistic_win_prob, update_elo, kelly_fraction, american_to_implied_prob

p = logistic_win_prob(rating_diff=120)
new_h, new_a = update_elo(1600, 1580, 1.0)
stake = kelly_fraction(p, -110, fraction=0.25)

Publish

pip install build twine
python -m build
twine upload dist/*

Non-goals

  • No bundled NBA database or scrapers
  • Not a tipster product
  • Not a full modeling workflow by itself

CI

pytest + ruff on Python 3.10-3.12.

Related Repos

License

MIT

About

Elo, logistic win probability, Kelly helpers for NBA-style models (PyPI: nba-edge). Pairs with nba-clv-dashboard.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages