Releases: martineastwood/penaltyblog
Releases · martineastwood/penaltyblog
v1.6.2
v1.6.1
- Updated goals models loss functions to work with
scipy 1.16+ - Improved numerical stability of the loss function for the Negative Binomial model to improve convergence
- Added Colab notebook for implied probabilities examples
- Python 3.14 support
v1.6.0
Package Updates
Matchflow
- can now read / write data from cloud storage (e.g. S3, GCS, Azure Blob Storage) using
fsspec - Now supports multiple join strategies:
- left, right, outer, inner and anti joins
- Automatic type inference and conversion for join keys
- Customizable type coercion functions for complex join key scenarios
- Fixed bug where where executor did not recognise
.concat()function
Betting
- Updated
impliedsubmodule to add logarithmic overround removal method and return structured results - Renamed
kellysubmodule tobetting - Added
multiple_criterionfunction for calculating Kelly Criterion for multiple outcomes - Added
arbitrage_hedgefunction to calculate hedge bet sizes - Added
arbitrage_opportunitiesfunction to identify arbitrage opportunities across bookmakers - Added
value_betsfunction to identify value bets based on model probabilities - Added
odds_conversionfunction to convert between different odds formats (decimal, fractional, American) - Updated all betting utility functions to return structured output
Documentation Improvements
- Updated
Matchflowdocumentation - Updated
implieddocumentation - Updated
bettingdocumentation - Started adding Colab notebooks for interactive examples, more to come!
v1.5.1
- Restricted
scipyto version<=1.15.3due to breaking changes in theminimizefunction introduced in1.16+, which affect goal model compatibility.
v1.5.0
Package Updates
-
Pitch- Initial release of interactive
Pitchplotting library
- Initial release of interactive
-
MatchFlowFlownow has it's own query language, with support for boolean expressions and field comparisons via.query
-
Goals Models- All Goals Model's
.fitfunctions now take an optional dictionary of arguments to pass to scipy's optimiser - All GoalsModels now fit using an optional gradient (defaults to True), which improves the fit time by approx 5-10x
- All Goals Model's
-
FootballProbabilityGrid- Updated class to include more betting markets
- Now supports fractional Asian handicaps and totals
- Optionally normalizes probabilities to sum to 1 (default: True)
- Calculations now use vectorized numpy operations for improved performance
- Caching of results for repeated queries to improve efficiency
-
Goal Expectancy- Added support for removing overrounding from input probabilities
- Improved handling of edge cases in probability distributions
- Altered to using probabilities rather than odds
- Added more diagnostic output for debugging
- Optionally normalizes probabilities to sum to 1
Documentation Improvements
- Added Pitch documentation
- Updated Flow documentation with
.queryexamples - Completely rewritten documentation for Goals Models and goal expectancy
- Removed obsolete examples
v1.4.1
Package Updates
- Fixed bug in
Flow.cacheexecutor logic
v1.4.0
v1.4.0 (2025-06-19)
Package Updates
- Introduced optional
FlowOptimizerfor smart plan rewrites- New
optimize=Trueflag on all flows (off by default) - Safe, conservative rewrites: pushdown, fusion, and simplification
- Enhanced
.explain(compare=True)for before/after plan introspection - Optimizer is backwards-compatible and fully opt-in
- New
- Added
.plot_plan()onFlowandFlowGroupto visualize pipeline structure .explain()now works onFlowGroup, and supportscompare=True- New
.with_schema({...})method to cast and validate fields- Example:
Flow.with_schema({"x": int, "ts": parse_datetime})
- Example:
- Added
.rolling_summary()toFlowGroupfor windowed group summaries
(e.g. rolling 5-minute aggregates per player or team) - Added
.time_bucket()toFlowGroupfor time-based binning summaries - Added
.show()method to pretty-print results usingtabulate Flow.collect()now supports optional progress bars during execution
Documentation Improvements
- Refreshed documentation to include:
FlowOptimizerandoptimize=True.with_schema(),.rolling_summary(),.show()- Plan introspection via
.explain(compare=True)and.plot_plan() - Enhanced type hints throughout the package for improved compatibility with
mypy
v1.3.0
Package Updates
- Initial release of
MatchFlow
Documentation Improvements
- Added
MatchFlowdocumentation - Added
MatchFlowrecipes documentation - Added API references for all of
penaltyblog - Added stub file for
metricCython code - Added stub file for
modelsCython code
v1.2.0
v1.2.0 (2025-04-10)
Package Updates
- Updated Elo Ratings model to be more football-specific so that it now includes home field advantage and can predict draw probabilities
- Added new Cythonised Ignorance Score metric
- Added new Cythonised Multiclass Briar Score metric
- RPS functions now raise a ValueError exception if outcome is out of bounds
Documentation Improvements
- Updated Elo documentation
- Added Pi Ratings documentation
- Added examples for ignorance score
- Added examples for multiclass briar score
- Updated examples for RPS
v1.1.0
Performance Enhancements
- Rewrote Dixon-Coles model using Cython, achieving approximately 250x speed improvement.
- Rewrote Poisson model using Cython, achieving approximately 250x speed improvement.
- Implemented Negative Binomial Goals Model in Cython for enhanced performance.
- Added high-performance Cython implementation of the Bivariate Poisson Goals Model based on Karlis & Ntzoufras.
- Introduced Cython implementation of the Bivariate Weibull Count Copula Goals Model based on Boshnakov et al.
- Developed Pi Ratings System based on Constantinou et al.
- Migrated ranked probability score functions to Cython for improved speed.
Package Updates
- Temporarily removed Stan-based models due to dependency management challenges. Investigating improved packaging strategies for future reintegration.
- Temporarily removed Rue and Salvesen model pending revision to accurately reflect its intended methodology (previously implemented as a hybrid Dixon-Coles variant).
Documentation Improvements
- Updated and expanded model examples in the documentation.
- Enhanced type hints throughout the package for improved compatibility with
mypy. - Updated documentation to
pydataSphinx theme.
CI/CD and Testing
- Expanded GitHub Actions workflows to perform unit tests across all supported Python versions.
- Extended GitHub Actions workflows to perform unit tests on Windows, macOS, and Linux.
- Configured GitHub Actions to automatically build wheels for all supported Python versions across Windows, macOS, and Linux.