wkschwartz / spreads

Statistical analysis of Vegas spreads in sports

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spreads

Statistical analysis of Vegas spreads in sports

Requirements

Spreads uses Python version 3 to download the data set and Stata version 10 or greater for analysis. Required Python packages are listed in requirements.txt.

Download and Install

Download the project from GitHub. Then install the Python requirements with Pip:

$ pip install -r requirements.txt

Usage

First, download the data set with spreads.py. For its usage instructions, run

$ python3 spreads.py --help

spreads.py writes the data to standard out, so you may want to redirect its output. For example, if you want to save the data in a file called spreads.csv, run

$ python3 spreads.py > spreads.csv

Once you have downloaded the data to, say, spreads.csv, import it to Stata using the Stata ADO program spreads_read.ado:

. spreads_read spreads.csv, clear

Testing

The Python code comes with automated unit tests. Run them, like usual, with:

$ python3 -m unittest discover

About

Statistical analysis of Vegas spreads in sports


Languages

Language:Python 100.0%