8.9k stars · AGPL-3.0 · v0.6.6 on PyPI (2026-07)
The lowest-friction Python backtester — 20 lines to a full trade log, equity curve and parameter sweep.
▶Repo detailsthe review · specs · pros & cons · install
What it is
A small Python backtesting framework: define entry and exit rules as a class, hand it a dataframe of candles, and get back a full trade log, an equity curve, a drawdown profile and an interactive chart. Parameter sweeps and optimisation are built in.
Why it matters
Edition 1 gave you STUMPY to find repeating shapes in three years of EURUSD. Finding them is the easy half — almost all of them are noise, and the only way to tell which is to test them. This is the shortest path from "STUMPY found a motif" to "here is what it returned across three years, after spread." Your 2%-a-month target is a testable claim, and the value of this library is that testing is cheap enough that you will actually run twenty ideas instead of falling in love with the first one.
- The least ceremony of any Python backtester — a working test really is about twenty lines
- Built-in optimiser and interactive charts showing exactly where each trade opened and closed
- Heavily documented with a large body of public examples for Claude Code to draw on
- AGPL-3.0. Fine for your own research, a genuine problem if backtesting becomes a feature customers use inside ScalpingMate — check this before you build on it
- Single asset, single timeframe by design. It will not model a portfolio
- Like every backtester it flatters you until you subtract spread, slippage and overnight financing yourself
pip install backtesting

