Leveraging past years’ match data, the PAT model employs advanced statistical techniques to generate predictions. These predictions are then compared against the actual match results to assess the accuracy of the model. Moreover, an automated betting simulation script is developed to evaluate the profitability of the predictions, with each match simulated as a $100 wager based on odds data sourced from platforms like Bet365. Through this project, we explore the intersection of predictive analytics, sports forecasting, and betting simulations in the context of soccer.
- Install/Download PAT execution file according to your operating system.
- Ensure Python (or Python3) and pip (or pip3) are installed on your system.
-
Clone this repository to your local machine.
-
Navigate to the
automation-dynamic-v1
folder.cd automation-dynamic-v1
-
Before running the automation scripts, you need to update the configurations in the
config.py
file to match your system setup.-
Setting the Absolute Path to PAT Console Executable (PAT_CONSOLE_EXE_DIRECTORY):
- Locate the
config.py
file in theautomation-dynamic-v1
folder. - Find the variable named
PAT_CONSOLE_EXE_DIRECTORY
in the configuration section. - Set the absolute path to the PAT Console executable file on your system. This file is typically named
PAT3.Console.exe
or similar. - If you're using Windows, the path might look like:
PAT_CONSOLE_EXE_DIRECTORY = "C:\\Program Files\\Process Analysis Toolkit\\PAT3.Console.exe"
- For Linux or macOS, the path might look like:
PAT_CONSOLE_EXE_DIRECTORY = "/path/to/PAT3.Console"
- Locate the
-
Setting the Absolute Path to Output Directory (OUTPUT_DIRECTORY):
- In the same
config.py
file, locate the variable namedOUTPUT_DIRECTORY
. - Set the absolute path to the
automation-dynamic-v1
folder on your system. - This path is where the output files generated by the automation scripts will be saved.
- For example, if the
automation-dynamic-v1
folder is located on your desktop, the path might look like: - If you're using Windows, the path might look like:
OUTPUT_DIRECTORY = "C:\\Users\\YourUsername\\Desktop\\automation-dynamic-v1"
or
- For Linux or macOS, the path might look like:
OUTPUT_DIRECTORY = "/Users/YourUsername/Desktop/automation-dynamic-v1"
- In the same
Once you've updated these configurations, the automation scripts will be ready to run on your system.
-
-
Ensure that the betting simulation CSV dataset files are in the
betting_simulation
folder, and the match and player datasets for all seasons are in theDatasets
folder. -
Install the required Python libraries using pip or pip3:
pip3 install -r requirements.txt
To execute the main PAT model for all matches of the given dataset, use the following command:
python3 main.py -t ./template.txt
Above command may take hours to complete. but, (Note: To test the model with sampling, use the -s flag):
python3 main.py -s -t ./template.txt
For more detailed analysis of individual features, you can run the isolated features PAT model using:
python3 reproduce_results.py
After executing the commands, the automation will generate predictive models for soccer matches and simulate betting outcomes. The output will display the net profit (original and new) for each season based on the betting simulation.
Example Output:
season 1516 net profit (original, new): ($-3020.0, $-1625.0)
season 1617 net profit (original, new): ($-373.0, $-1393.0)
season 1718 net profit (original, new): ($-2135.0, $-799.0)
season 1819 net profit (original, new): ($920.0, $3038.0)
season 1920 net profit (original, new): ($1199.0, $1785.0)
season 2021 net profit (original, new): ($1182.0, $2081.0)
- Install PAT execution file according to your operating system.
- Ensure Python (or Python3) and pip (or pip3) are installed on your system.
- Ensure SQLite installed
- Have good Internet access