A backtesting and strategy-research platform for US index futures / ETFs (SPY, QQQ and others), built around one principle: prove an edge with honest, disciplined testing before trusting it — and archive it cleanly when it fails.
⚠️ Status: research. This is not a live or profitable trading system. Its value is the engineering and the methodology: a disciplined pipeline that tested ~20 families of strategies and falsified all of them with proper statistical tests. That negative result is documented on purpose — avoiding self-deception is the point.
- Backtest engine — bar-by-bar simulation with realistic execution: intrabar stop/take-profit priority, trailing stops, break-even logic, time stops, and a pluggable fill model (ideal vs conservative with slippage + spread) so paper results can be reconciled against a realistic baseline.
- Strategy definitions as data — strategies ("playbooks") are described in YAML and loaded by the engine, so new ideas can be added without touching the core.
- Statistical validation — every strategy is judged on expectancy per trade, with walk-forward / out-of-sample windows, and permutation tests to check that results aren't just luck. Strategies that look good in-sample but fail a permutation test are archived, not shipped.
- Full-stack — Python/FastAPI backend with a React frontend for running and inspecting backtest campaigns.
- Entries fill at the close of the signal bar, with slippage and commission from the cost model, while exits under the conservative model fill at the next bar's open. Real execution could only act after that close, so entries are slightly optimistic. Since no strategy survived, a stricter entry would only reinforce the negative result.
- Max drawdown is computed on realized equity (trade closes), not marked to market.
Across ~20 strategy families (pattern-based, momentum, mean-reversion, stat-arb, event-driven, cross-asset), none produced a robust edge on free retail data for liquid US/crypto markets. Each was killed by a pre-written rule, not by wishful re-interpretation. The real deliverable is the research discipline: pre-registered hypotheses, pre-written kill rules, honest statistics, and reusable infrastructure.
Python · FastAPI · React · numpy / pandas · pytest · yfinance ·
YAML-driven strategy config
# Backend (run from backend/: server.py imports its routes relative to it)
cd backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn server:app --reload --port 8001 # the frontend expects 8001 ; API docs at http://127.0.0.1:8001/docs
# Frontend (from the repository root, in another terminal)
cd frontend && npm install && npm startCI (GitHub Actions) runs the full pytest suite on every push to main
(620 tests, no network or API keys required — the suite blocks outbound sockets on itself,
so a test that phoned home would fail instead of passing quietly on a connected machine),
plus a
separate smoke check on the backtest-campaign tooling
(backend/scripts/backtest_campaign_smoke.py).
# from the repository root (pytest.ini lives there), backend venv active
pip install pytest
pytestRun from backend/, pytest ignores pytest.ini and also collects the integration
scripts, which need market data and a running server.
backend/
├── engines/ # backtest engine, execution, fill models, pattern detectors
├── backtest/ # campaign runner
├── knowledge/ # YAML strategy definitions & campaigns
└── scripts/ # research / audit scripts (one-off analyses)
frontend/ # React UI
docs/ # methodology, roadmaps, verdicts, spec
Solo project — autodidact. The interesting part is the methodology, not a P&L curve.
