Fantasy Premier League (FPL) Optimization

Hello!

I’m excited to share a project I’ve been working on that combines two of my passions: Julia programming and Fantasy Premier League (FPL). I’ve developed JFPL-Optimization, a Julia implementation of an existing Python FPL optimization tool.

Project Overview

JFPL-Optimization is designed to help FPL managers identify the optimal team based on expected points (derived from predictive models like fplreview) and other factors. It uses mathematical optimization techniques to solve the complex problem of team selection and planning in FPL.

Key Features

  1. Multi-period Optimization: Plan your team over multiple gameweeks.
  2. Customizable Settings: Adjust parameters like transfer strategies, chip usage, and budget allocation.
  3. Integration with FPL Data: Uses player data and predictions from sources like fplreview.
  4. Sensitivity Analysis: Run multiple simulations to understand the robustness of your strategy.

Advantages over the Python Implementation

While this project is a re-implementation of an existing Python tool, it offers two significant advantages:

  1. Improved Performance: When running many simulations for sensitivity analysis, the Julia solver is notably faster than its Python counterpart.
  2. Solver Flexibility: Thanks to JuMP, it’s incredibly easy to swap between different solvers. This flexibility allowed me to discover that HiGHS is significantly faster than Cbc for this particular optimization problem. (Cbc was previously the standard in the Python implementation.)
  3. Easy Integration with Commercial Solvers: For those with access to commercial solvers like Gurobi, you can achieve a substantial speed boost by changing just two lines of code!

Technical Details

  • The project uses JuMP for modeling the optimization problem.
  • HiGHS is the default solver, but you can easily switch to others.
  • The repository includes scripts for multi-period optimization and sensitivity analysis.

Getting Started

You can find the full project, including installation instructions and usage guidelines, on GitHub: JFPL-Optimization

Contribution and Feedback

I’m always looking to improve the project and would love to hear your thoughts, suggestions, or contributions. Feel free to open issues or pull requests on GitHub, or discuss ideas here in the comments.

Conclusion

If you’re interested in FPL, optimization, or just curious about practical applications of Julia in sports analytics, I encourage you to check out the project. I believe it showcases some of Julia’s strengths, particularly in numerical computing and optimization.

Looking forward to your feedback and happy optimizing!

12 Likes