Project Overview
This interactive app shows what would happen if you placed £10 bets on different outcome strategies across multiple football leagues over an entire season. No guesswork — just data, scraped with Selenium and engineered with care. See whether betting on favourites, underdogs, draws, second favourites, or even random selections would have brought profit... or not!
Data Collection
Scraping:
Match results and bookmaker odds were scraped from a selection of European leagues using Selenium, designed to handle dynamic JavaScript content and scrolling challenges. Each league was processed page by page with automatic scrolling to capture every fixture result and odds.
Cleaning & Prepping:
The raw data was cleaned, transformed, and structured into consistent DataFrames, ready for feature engineering and simulation logic.
Feature Engineering
Custom features were engineered to track the outcomes of betting strategies including home win, away win, draw, favourite, second favourite, Le Underdog (highest odds), and random pick. Each strategy’s returns are calculated cumulatively across fixtures — showing real rolling profit or loss across entire seasons.
Return Calculation Logic
Each simulated £10 bet either returns (10 x odds - 10)
if successful, or -10
if not.
These fixture-by-fixture returns build running totals that clearly show whether a strategy would have been profitable or disastrous.
Visualization
The app provides dynamic visualizations: select leagues, load them in, and view beautiful plots of cumulative strategy returns. You can also compare the best and worst performing strategies per league with clean bar charts and color-coded legends.
Key Insights
The results show just how sharp the bookmakers are. Favourites and second favourites often lose money in the long run. Le Underdogs? Fun — but dangerous! Some leagues offer better surprises than others, and this project makes it easy (and fun) to explore them.
Deployment
The entire framework — scraping, feature engineering, analysis, and plotting — is deployed to Streamlit Cloud for quick, on-demand exploration.
Expandability
This system is designed for growth. Future enhancements could include live data feeds, more leagues, custom strategy definitions, or even user-submitted betting models.
Final Word
Play with it, spot the patterns, and see who really comes out on top. Built by someone who’s been there, fallen, got back up, fallen again — and now? Sitting with a beer, crunching peanuts and numbers. 🍻