## Beating the bookies with their own numbers.
This repository contains the code to reproduce our betting strategy for football games, as described in the paper [*"Beating the bookies with their own numbers - and how the online sports betting market is rigged"*](https://arxiv.org/abs/1710.02824), by Lisandro Kaunitz (1,2), Shenjun Zhong (3) and Javier Kreiner (4).
1. Research Center for Advanced Science and Technology, The University of Tokyo, Tokyo, Japan.
2. Progress Technologies Inc., Tokyo, Japan.
3. Monash Biomedical Imaging Center, Monash University, Melbourne, Australia.
4. Data Science department, CargoX, Sao Paulo, Brazil.
Citation:
```
@inproceedings{BeatTheBookies,
Author = {Lisandro Kaunitz and Shenjun Zhong and Javier Kreiner},
Title = {Beating the bookies with their own numbers - and how the online sports betting market is rigged},
Journal = {arXiv:1710.02824v1},
Year = {2017}
}
```
## Disclaimer
This repository contains a dataset, code and the link to an online dashboard that shows online suggestions from our betting strategy. If you are a sports betting aficionado and decide to test our suggestions with paper trading or real betting, please bear in mind that you are doing it under your own risk and responsibility. We do not claim any responsiblity for: A) the use that you might make of our code, B) the information contained in our online dashboard or C) any monetary losses you might incur during your betting experience.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## Online Dashboard
Our strategy was based on finding mispriced odds online. We provide the dashboard we used with the suggestions of our strategy. You can find a general non-mathematical short explanation of the strategy ([here](http://wp.me/p7wVWn-9Z))
The dashboard shows the games and odds that our strategy suggests as mispriced. We would definitely bet on these games if the bookies did not block our accounts. Other than that, we truly believe that the effort of deploying such a strategy is completely worthless, considering the time spent on the betting and the monetary reward.
This is how the dashboard looks like. It displays the upcoming games, odds, bookmaker and the remaining time to the onset of the game.
![Alt text](/figures/dashboard.png?raw=true "Dashboard with list of games")
You can follow the upcoming games online at:
```
http://42.2.153.218:9090//
```
## How to run the code
We provide matlab/octave code to reproduce all the figures and analysis in the paper.
1. Clone this repository
```
git clone https://github.com/Lisandro79/BeatTheBookie.git
```
2. Download the dataset either from
Google Drive ([link](https://drive.google.com/drive/folders/0B3zgn2ueCERNWnJRSnpIQTBDWEU?usp=sharing))
or
Dropbox
* [closing odds](https://www.dropbox.com/s/g9vpjjlxjeruc3u/closing_odds.zip?dl=0)
* [odds_series](https://www.dropbox.com/s/gqp3m6o5zsd8v63/odds_series.zip?dl=0)
* [odds_series_b](https://www.dropbox.com/s/t26rwzvlwtt6xnb/odds_series_b.zip?dl=0)
* [paper trading, real betting](https://www.dropbox.com/s/z4qi44s1dn4kuuv/paper_trading_real_betting_series.zip?dl=0)
* [closing odds sql db](https://www.dropbox.com/s/adj7xivk40vuvl7/closing_odds_sql_db.zip?dl=0)
* [odds series sql db](https://www.dropbox.com/s/sftxhxq03jd12j6/odds_series_sql_db.zip?dl=0)
* [odds series b_sql db](https://www.dropbox.com/s/x6aookfjw25ne6q/odds_series_b_sql_db.zip?dl=0)
Note: The sql database files are ~1.8GB of data. Due to space restrictions, the SQL databases are only available for download via Google Drive or Dropbox.
3. Install mysql and import the database dumps:
```
mysql -u root -p < [file with first dump]
```
4. Install Matlab or
5. Install Octave and the required Packages:
```
sudo apt-add-repository ppa:octave/stable
sudo apt-get update
sudo apt-get install octave
sudo apt-get install octave-control octave-image octave-io octave-optim octave-signal octave-statistics octave-nan
```
The scripts were tested with Matlab, but they should work fine in Octave too with little adjustment.
# Historical analysis of closing odds.
These analysis reproduce figures 1 and 2 from our paper. Place file "closing_odds.cvs" into "/data". Folder structure should look like this:
```
data/
figures/
sql/
src/
```
The first time the scripts are run, set "runStrategy" to 1, so that the script can generate the results of the strategy (after that "runStrategy" can be set to "0" to save some time). Then run:
```
cd src/
Figure1.m
Figure2A.m
```
The rest of the code is self explanatory.
## Historical analysis of odds series.
This analysis corresponds to Figure 2B and Figure 3 from the paper. Unzip files "odds_series" and "paper_trading_real_betting_series" in /data/. The folder scrutcure should look like this:
```
/data/odds_series/
/data/odds_series_b/
```
These two folders should contain several thousand files (one for each game).
Then run these scripts:
```
cd src/
Figure2B.m
Figure3.m
```
## Dataset Description
For those interested in perfoming their own analysis with the dataset we provide two sql databases. Both are provided in the form of sql dumps exported from mysql databases:
(1) **"closing_odds.csv"** and **"closing_odds_sql_db"**. Historical closing odds and match information for 880,494 football matches from 2000-01-01 to 2015-09-06 for 912 leagues around the world. The csv file is a matrix of games (rows) x features (teams, scores, league, etc). See the matlab scripts for a description of the features
(2) **"odds_series"** and **"odds_series_sql_db"**. Continuous odds series (series of odds with odds movements) and match information for 31,074 football matches from September 2015 until March 2016 for 553 leagues around the world.
(3) **"odds_series_b"** and **"odds_series_b_sql_db"**. Continuous odds series (series of odds with odds movements) and match information for 82,786 football matches from March 2016 until November 2016 for 658 leagues around the world.
**Database structure:**
* Table "matches": contains information about the football matches
| Field for table "matches" | Column Description |
| ------------- | ------------- |
| ID | auto increment id of table |
| league | the league of the match (e.g. Spanish League) |
| team1 | local team |
| team2 | away team |
| result | result of match |
| result_det | detailed result of match (goals in first half, goals in second half, etc) |
| date | datetime of the match |
* Table "odds_history": for each match-bookmaker-outcome combination there is an entry in this table
| Field for table "odds_history" | Column Description |
| ------------- | ------------- |
| odds_history_id | id in odds_history table |
| ID | id of match referring to matches table |
| bookmaker | name of the bookie |
| bettype | type of bet (e.g. 1x2) |
| result | outcome for which the odd is offered |
| disabled_date | date the odds on offer were disabled (could be null, i.e. they were still active until beginning of match), not available in historical odds database |
* Table "odds_history_series": for each entry in table odds_history this table contains the odds series, i.e. one entry each time the odds are updated
| Field for table "odds_history_series" | Column Description |
| ------------- | ------------- |
| odds_history_series_id | auto increment id |
| odds_history_id | entry in odds_history table to which these odds are related |
| odds_datetime | time at which these odds were offered |
| odds | odds value |
| opening_closing | specifies if the entry cor
没有合适的资源?快使用搜索试试~ 我知道了~
BeatTheBookie.zip
共54个文件
m:29个
jpg:5个
png:5个
需积分: 5 0 下载量 123 浏览量
2023-08-22
14:12:54
上传
评论
收藏 7MB ZIP 举报
温馨提示
这个存储库包含一个数据集、代码和一个在线仪表板的链接,该仪表板显示了我们博彩策略的在线建议。如果您是体育博彩爱好者,并决定用纸质交易或真实博彩来测试我们的建议,请记住,您这样做是在承担自己的风险和责任。对于以下情况,我们不承担任何责任:A)您可能使用我们的代码,B)我们在线仪表板中包含的信息,或C)您在投注体验中可能遭受的任何金钱损失。
资源推荐
资源详情
资源评论
收起资源包目录
BeatTheBookie.zip (54个子文件)
BeatTheBookie-master
sql
closing_odds_csv_export.sql 779B
_config.yml 26B
src
generate_closing_odds_csv.php 9KB
aux_files
calc_prob.m 326B
._calc_prob.m 4KB
subdir.m 3KB
._subdir.m 4KB
calc_payoff.m 358B
._calc_payoff.m 4KB
._calc_sure_bet.m 4KB
calc_odds_earnings.m 245B
._run_corr.m 4KB
calc_sure_bet.m 475B
._calc_odds_earnings.m 4KB
run_corr.m 315B
Figure3.m 6KB
Figure2B.m 6KB
Figure2A.m 6KB
Figure1.py 5KB
aux_plot
plot_earning_trend.m 2KB
drawbrace.m 3KB
._plot_earning_trend_H_A.m 4KB
._plot_earning_trend.m 4KB
._calc_money_bks_H_A_opCls.m 4KB
plot_earning_trend_H_A.m 1KB
calc_money_bks_H_A.m 3KB
calc_money_bks_H_A_opCls.m 3KB
._calc_money_bks_H_A.m 4KB
generate_odds_series_csv.php 8KB
unpack.py 727B
collect.py 2KB
generate_odds_series_b_csv.php 8KB
Figure1.m 5KB
Figure2A.py 8KB
strategies
beatTheBookie.m 2KB
randomBetStrategy_timeseries.m 5KB
beatTheBookie_timeseries.m 4KB
randomBetStrategy.m 3KB
LICENSE 34KB
figures
screenshots
Screenshot from 2016-12-18 17_03_27.png 78KB
output.pdf 4.86MB
figure_limits.jpg 182KB
WilliamHill.jpg 98KB
figure_limits.pdf 182KB
Screenshot from 2016-12-16 23_06_06.png 325KB
figure_limits.odp 323KB
test.png 29KB
Betway.jpg 84KB
Interwetten.jpg 109KB
image10.png 797KB
SportingBet.jpg 94KB
dashboard.png 77KB
.gitignore 38B
README.md 11KB
共 54 条
- 1
资源评论
hello_中年人
- 粉丝: 7
- 资源: 324
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功