Skip to content

Install and first run

One-liner: Install once, run the MA golden-cross example end to end, and you know how this repo works.

Install

git clone git@github.com:TradeEdgeX/interpretable-ml-trading.git
cd interpretable-ml-trading
pip install -r requirements.txt

First run

  1. Download data:
mlbot data pipeline --symbols BTCUSDT \
  --start-year 2022 --start-month 1 --end-year 2026 --end-month 8
  1. Build the feature store:
PYTHONPATH=src python scripts/build_feature_store_from_config.py \
  --config config/strategies/ma_cross \
  --symbols BTCUSDT \
  --timeframe 120T \
  --root feature_store \
  --layer features_ma_cross_120T_<hash> \
  --data-path data/parquet_data
  1. Run the backtest:
PYTHONPATH=src python scripts/event_backtest.py \
  --config config/strategies/ma_cross \
  --symbols BTCUSDT \
  --timeframe 120T
  1. Read the result: results/ma_cross/<timestamp>/kpi_table.csv.

Fine print