Quant Library · Match pricing · Football
Match Price Engine
Two teams in, a probability for all forty-nine scorelines out.
A Dixon–Coles bivariate Poisson fitted by weighted maximum likelihood on results, blended with a second fit on shots on target. It is the model every football number on the platform starts from.
Inputs
5What it takes
| Name | Type | Units | Where it comes from |
|---|---|---|---|
| matches | list of (date, home, away, home goals, away goals) | counts | your database, or the platform's football-data ingest |
| shots optional | list of (date, home, away, home shots on target, away shots on target) | counts | the same ingest · omit it and the engine fits on goals alone, which is slower to learn and noisier |
| as_of | datetime | - | the moment you are pricing at · every match after it is excluded, which is what makes a backtest walk-forward |
| half_life_days optional | float | days | your choice; 240 is what the platform's backtest chose |
| blend_weight optional | float | 0 to 1 | your choice; 0.4 on shots is what the backtest chose |
Outputs
5What it gives back
| Name | Type | Units | Notes |
|---|---|---|---|
| attack, defence | dict per team | log goal rate | |
| home_advantage | float | log goal rate | |
| rho | float | - | the low-score correction, about −0.05 in every league we have fitted |
| rates(home, away) | (lambda, mu) | goals per match | |
| score_matrix | 11 x 11 array | probability |
Method
How it works
- Weight every past match by w = exp(−ξ (T − t)), with ξ set from the half-life you chose.
- 4 further steps in the licensed specification
Assumptions
- Goals arrive at a rate that is constant within a match and independent between the two sides, except for the four scorelines τ corrects.
- 2 further assumptions in the licensed specification
Limits
- It knows nothing about team news, and team news is most of the gap to the closing line.
- 2 further limits in the licensed specification
In the package
- The full specification: inputs, method, assumptions and limits
- The validation panel as measured on the day of purchase
- A reference implementation extracted from the running source
- Perpetual commercial use for one entity
Reference modules:
- 3 module(s), named in the licensed specification and shipped in the package
Read this before you buy. The platform's own walk-forward tests say the closing line forecasts football better than these models do. What they give you is a coherent price for every market and match, before the market opens, with the band and the working attached. Any model here that has been beaten by something simpler says so in its limits, and the validation panel above is generated from the platform's result files rather than typed in.