Japanese horse racing betting engine, support backtest and live bet
- Free software: MIT
- Documentation: https://xxxiio.github.io/xihr/
xihr/
__init__.py
cli.py
config/
__init__.py
settings.py
core/
__init__.py
bus.py
clock.py
engine.py
events.py
registry.py
types.py
data/
__init__.py
models.py
providers.py
repositories.py
transforms.py
strategy/
__init__.py
base.py
risk.py
rules.py
models/
__init__.py
base.py
pipelines.py
execution/
__init__.py
broker.py
router.py
slippage.py
backtest/
__init__.py
analyzers.py
metrics.py
simulator.py
storage/
__init__.py
artifacts.py
kv.py
monitoring/
__init__.py
health.py
logging.py
- Normalised data model for races, horses, and payoffs validated with Pydantic and Pandera.
- Repository pattern for simulation and live data/betting environments.
- Strategy API with scheduling, historical lookup, and bet execution helpers.
- Typer CLI for running strategies and generating analytics reports.
- Built-in example strategies (naive favourite and value betting) and sample datasets.
A runnable Jupyter notebook that demonstrates a full simulation using the sample
dataset is available at notebooks/simulation_demo.ipynb.
This package was created with the ppw tool. For more information, please visit the project page.