backtest-monorepo-parallel is a production-ready TypeScript monorepo template that lets you backtest trading strategies across 9 crypto symbols simultaneously — achieving ~6 300× real-time aggregate replay speed on commodity developer hardware. It wires together a zero-import dependency-injection runtime, MongoDB for durable persistence, and Redis for O(1) candle lookups, all in a single Node process with no IPC overhead.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/backtest-kit/backtest-monorepo-parallel/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Build the workspace, spin up infrastructure, and run your first parallel backtest in minutes.
Architecture
Understand the monorepo layout, DI runtime, and how strategy files reach the IoC container without imports.
Mode A: Parallel Runner
Run all 9 symbols concurrently with the
--entry flag and cache candles for maximum throughput.API Reference
Explore BaseCRUD, BaseMap, strategy schemas, and the full IoC container surface.
Why backtest-monorepo-parallel?
Traditional backtesting frameworks fork a process per symbol or serialize symbols sequentially. This template takes a different approach: allBacktest.background(...) calls share one Node event loop, one MongoDB connection pool, and one Redis pool. The result is near-linear scaling with zero subprocess overhead.
6300× Speed
Replays 9 symbols × 27 days of 1m candles in a few minutes of wall time on a laptop.
Zero-Import DI
Strategy files access
globalThis.core at evaluation time — no imports, no bundler hooks.Atomic Writes
Every
write*Data() is a single findOneAndUpdate with upsert:true — no application-side locks.Getting started
Build workspace packages
Compile
@pro/core and @pro/main into CJS bundles and rolled-up type declarations.Extend the monorepo
Add new services, strategies, and Mongo collections following the scaling patterns.
Performance at a glance
| Metric | Value |
|---|---|
| Aggregate replay speed | ~6 326× real-time |
| Event throughput | ~103 events/sec (one Node process) |
| Symbols in parallel | 9 (BTC, POL, ZEC, HYPE, XAUT, DOGE, SOL, PENGU, HBAR) |
| Candle frame covered | 2026-04-01 → 2026-04-27 (38 880 candles/symbol × 9) |
| Hardware | i5-13420H, 16 GB DDR4-3200, NVMe SSD |
These numbers were measured with a hot Mongo + Redis cache (candles pre-warmed via
--cache). Cold-start times are dominated by the initial CCXT HTTP fetch, not the backtest engine itself.