Backtest Engine
Strategy simulator, walk-forward and Monte Carlo testing, portfolio backtester, and 94 strategy template modules across 6 categories.
Part of FlintTrade: the open-source self-hosted trading software monorepo built with Python, React, TypeScript, and Rust.
Language: Python
Public surface
src/flinttrade_backtest/simulator.py: single-strategy event-driven backtestsrc/flinttrade_backtest/engine.py: entry point used by the Lab route and CLIsrc/flinttrade_backtest/portfolio_backtest.py: multi-strategy portfolio runs via VectorBTsrc/flinttrade_backtest/strategies/: 94 ready-to-run template modules (_indicators.pyand_mixin.pyare helpers, not templates)
(See the source for the full surface.)
Install
This package is part of the FlintTrade monorepo. Install via the workspace from the repo root:
uv pip install -e packages/services/backtestIf you only want to use the package in isolation, the package's pyproject.toml,
Cargo.toml, or package.json lists its dependencies. The supported path is the
root workspace.
Tests
python -m pytest packages/services/backtest/tests/ -v --import-mode=importlibFor the full test matrix, see the contributor guide at docs/DEVELOPER_GUIDE.md.
How this fits in
This package's role in the wider FlintTrade architecture is documented in docs/ARCHITECTURE.md. For the end-user features it provides, see docs/USER_GUIDE.md.
Contributing
Contributions are welcome. Read contributing.md at the repo root before opening a pull request.
License
AGPL-3.0. Same as the parent repository. See LICENSE for the full text.