Investigates whether the backtest engine is ready to power a customer-
facing "test plan against history" feature on /plans (e.g. COVID, war
periods). Combines code review with 4 synthetic-data smoke tests run
against the running engine.
TL;DR:
Engine itself is sound — deterministic, fast (~250-325 candles/sec),
multi-timeframe data pipeline works, intra-candle policies wired
correctly, runs the same strategy code as live trading.
Ship blockers for customer feature:
- Zero engine unit tests (1,984 LOC backend, 0 *.test.* files)
- No Alpaca data source — only Kraken auto-fetch + CSV/JSON upload
means stock plans can't be tested without manual CSV
- Log noise (~25k lines per 5k-candle backtest)
- Production gate is intentional ("not yet production-ready" comment
in flags.ts) — not an oversight
Recommended path: admin-only POC first (low risk, no flag changes),
plus the user's-own-trade-replay source as a v1 product alternative
that's truthier than synthetic historical scenarios.
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>