Backtrader vs Backtesting.py
Backtesting.py is the faster start: a short API and good charts, but one instrument at a time. Backtrader takes longer to learn but handles several data feeds, timeframes and detailed order logic.
Side by side
| Backtrader | Backtesting.py | |
|---|---|---|
| Category | Backtesting libraries | Backtesting libraries |
| What it is | Event-driven Python backtesting and live-trading library with a large community. | Small, readable backtesting library with interactive charts and a built-in optimizer. |
| Best for | Learning backtesting, strategies with complex order logic, and porting rule-based systems such as MT4/MT5 Expert Advisors. | Beginners and quick single-instrument experiments. |
| Language | Python | Python |
| License | GPL-3.0 | AGPL-3.0 |
| GitHub stars | 23.7k | 9.2k |
| Last commit | 2024-08-19 | 2026-08-05 |
| Latest release | — | — |
| Status | Inactive | Slowing |
GitHub statistics as of 2026-11-10. Status: active = commits in the last 90 days, slowing = in the last year, inactive = older, archived = read-only.
Strengths · Limitations
Backtrader
Strengths
- Realistic event-driven simulation: orders, stops, partial fills, commissions
- Huge amount of examples and community answers
- Multiple data feeds and timeframes in one strategy
Limitations
- Slow for large parameter sweeps compared with vectorized libraries
- No longer actively developed; plotting can break with newer Matplotlib
- Live-trading brokers are dated
Backtesting.py
Strengths
- Easiest API of the libraries here
- Good charts out of the box
- Built-in parameter optimization and heatmaps
Limitations
- One instrument per backtest; no portfolio of assets
- AGPL-3.0 license matters if you build a product on it
- Fewer order types than event-driven engines
Which one to choose
Backtesting.py is the faster start: a short API and good charts, but one instrument at a time. Backtrader takes longer to learn but handles several data feeds, timeframes and detailed order logic.
All frameworks · Descriptions are our own summary and may lag behind each project's documentation. Check the project's license before using it in a product. Nothing here is investment advice.