Install pyenv:
brew install pyenvInstall Python:
pyenv install 3.13.5 Switch to Python version:
pyenv local 3.13.5 Verify Python and version
which python
python --version In the root folder of the project. Start by creating a virtual environment for managing dependencies:
python -m venv venvActivate the virtual environment:
source venv/bin/activateInstall requirements:
pip install -r requirements.txtplaywright installpython main.py matches --coupon <MIDWEEK | SATURDAY | SUNDAY> --days <DAYS_OF_THE_MONTH_FOR_THE_COUPON>python main.py matches --coupon MIDWEEK --days 7python main.py predictions --filename <DATA_FILE_PATH>python main.py predictions --filename data/matches_2_2026_MIDWEEK.jsonpython main.py bets --filename <DATA_FILE_PATH> --balance <STARTING_BALANCE>python main.py bets --filename data/matches_2_2026_MIDWEEK.json --balance 1000 The application uses statistical models to identify value bets and determine optimal stake sizes.
The "True Probability" (
The "Odds" (
The Expected Value measures the profitability of a bet. It is calculated as the difference between the expected return and the stake.
Where:
-
$P$ is the true probability (as a decimal between 0 and 1). -
$O$ is the decimal odds.
A positive EV indicates a value bet, meaning that over the long run, the bet is expected to be profitable.
The Kelly Criterion is a formula used to determine the optimal size of a series of bets. It balances risk and reward to maximize the logarithm of wealth.
The optimal fraction of the bankroll to bet (
Where:
-
$EV$ is the expected value. -
$O - 1$ is the net odds (odds minus the stake).
The application uses a configuration file (config.ini) to set parameters for the betting strategy:
- min_expected_value: The minimum EV required to place a bet. Bets with EV below this threshold are ignored.
- max_odds: The maximum allowable odds. Bets with odds higher than this value are skipped (often to avoid high variance).
-
kelly_fraction: A multiplier applied to the Kelly fraction (
$f^*$ ). It is common to use a "Half Kelly" (0.5) or other fraction to reduce volatility.