learning_ai_invt_trdg/docs/backtest
Devin 2fa41dd000 docs(backtest): engine readiness assessment
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>
2026-05-10 10:20:19 +00:00
..
ENGINE_READINESS.md docs(backtest): engine readiness assessment 2026-05-10 10:20:19 +00:00