Skip to content

Releases: martineastwood/penaltyblog

v1.6.2

22 Oct 16:48

Choose a tag to compare

  • Fixed bug in PoissonGoalsModel where weights parameter was not being handled correctly in the gradient function.

v1.6.1

18 Oct 15:03

Choose a tag to compare

  • 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

23 Sep 16:40

Choose a tag to compare

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 implied submodule to add logarithmic overround removal method and return structured results
  • Renamed kelly submodule to betting
  • Added multiple_criterion function for calculating Kelly Criterion for multiple outcomes
  • Added arbitrage_hedge function to calculate hedge bet sizes
  • Added arbitrage_opportunities function to identify arbitrage opportunities across bookmakers
  • Added value_bets function to identify value bets based on model probabilities
  • Added odds_conversion function to convert between different odds formats (decimal, fractional, American)
  • Updated all betting utility functions to return structured output

Documentation Improvements

  • Updated Matchflow documentation
  • Updated implied documentation
  • Updated betting documentation
  • Started adding Colab notebooks for interactive examples, more to come!

v1.5.1

20 Aug 17:54

Choose a tag to compare

  • Restricted scipy to version <=1.15.3 due to breaking changes in the minimize function introduced in 1.16+, which affect goal model compatibility.

v1.5.0

15 Aug 18:37

Choose a tag to compare

Package Updates

  • Pitch

    • Initial release of interactive Pitch plotting library
  • MatchFlow

    • Flow now has it's own query language, with support for boolean expressions and field comparisons via .query
  • Goals Models

    • All Goals Model's .fit functions 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
  • 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 .query examples
  • Completely rewritten documentation for Goals Models and goal expectancy
  • Removed obsolete examples

v1.4.1

24 Jun 09:24

Choose a tag to compare

Package Updates

  • Fixed bug in Flow.cache executor logic

v1.4.0

19 Jun 19:34

Choose a tag to compare

v1.4.0 (2025-06-19)

Package Updates

  • Introduced optional FlowOptimizer for smart plan rewrites
    • New optimize=True flag 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
  • Added .plot_plan() on Flow and FlowGroup to visualize pipeline structure
  • .explain() now works on FlowGroup, and supports compare=True
  • New .with_schema({...}) method to cast and validate fields
    • Example: Flow.with_schema({"x": int, "ts": parse_datetime})
  • Added .rolling_summary() to FlowGroup for windowed group summaries
    (e.g. rolling 5-minute aggregates per player or team)
  • Added .time_bucket() to FlowGroup for time-based binning summaries
  • Added .show() method to pretty-print results using tabulate
  • Flow.collect() now supports optional progress bars during execution

Documentation Improvements

  • Refreshed documentation to include:
    • FlowOptimizer and optimize=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

25 May 19:39

Choose a tag to compare

Package Updates

  • Initial release of MatchFlow

Documentation Improvements

  • Added MatchFlow documentation
  • Added MatchFlow recipes documentation
  • Added API references for all of penaltyblog
  • Added stub file for metric Cython code
  • Added stub file for models Cython code

v1.2.0

10 Apr 20:19

Choose a tag to compare

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

15 Mar 19:05

Choose a tag to compare

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 pydata Sphinx 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.