Introduction¶
pyrf is a quantitative analytics library for football betting. It provides a pipeline from raw statistical models through to market-implied pricing:
- Model match outcomes with statistical distributions
- Price betting markets using payoff surfaces
- Calibrate models from live market quotes
- Identify value by comparing model-implied odds to market odds
Architecture¶
The library is built around a grid-based computation model. A GoalGrid represents all
possible scorelines (e.g., 0-0 through 10-10). Every distribution, payoff, and pricing
calculation operates on this grid, making the maths transparent and composable.
GoalGrid → Distribution.pmf() → PayoffSurface → implied_odds() → Quote
↑
Market data via calibrate()
Modules¶
| Module | Purpose |
|---|---|
pyrf.core |
Goal grids — the foundation data structure |
pyrf.models |
Statistical distributions (Poisson, Skellam, Dixon-Coles) |
pyrf.market |
Betting lines, odds, margins, and quotes |
pyrf.payoffs |
Payoff surfaces for Asian Handicap and Total Goals |
pyrf_data |
FootyIQ data client for historical match data (separate package) |
pyrf.utilities |
Helper functions |
See the Features section for detailed guides on each module.