Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Horse Racing Betting Strategy

Overview

This project implements a quantitative betting strategy for horse racing, specifically targeting Trio bets. It utilizes the Shin model for probability estimation, a Discount Model for calculating trio probabilities, and the Kelly Criterion for optimal staking.

Key Components

1. Data Processing

  • processData.py: The main data pipeline script. It reads raw race results from race_results/ and trio odds from trio_odds/, processes them (normalizing odds, identifying winning combinations), and outputs a consolidated dataset to data.csv.

2. Betting Strategy

  • Strategy.py: Contains the core logic for the betting engine.
    • Shin Model: Estimates "true" win probabilities from market odds, accounting for the insider trading bias ($z$).
    • Discount Model: Calculates the probability of a specific Trio combination (1st, 2nd, 3rd in any order) based on win probabilities.
    • Kelly Criterion: Calculates optimal bet sizes to maximize logarithmic wealth growth while managing risk.

3. Machine Learning

  • train.py: Implements a PyTorch Multi-Layer Perceptron (MLP) (OddsPredictor) to predict trio odds or probabilities based on normalized win odds. This suggests a research direction into improving probability estimates beyond the standard Shin model.

4. Data Acquisition

  • scraper_.py & trio_scraper.py: Scripts responsible for scraping race results and odds data (likely from a racing authority website).

Data Structure

  • data.csv: The primary dataset used for analysis and training.
  • race_results/: Directory containing individual CSV files for race results.
  • trio_odds/: Directory containing individual CSV files for trio odds.

Usage

  • Data Prep: Run python processData.py to update data.csv from raw files.
  • Strategy Execution: Strategy.py can be run to generate recommendations for a specific set of odds (see __main__ block in the file).
  • Training: Run python train.py to train the odds prediction model.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages