Editorial verdict Outdatedchecked 05.12.2026
What it is good at
Backtrader is the classic Python event-driven backtesting library that more than one generation of algo traders learned on. A strategy is a class, the Cerebro engine feeds data bar by bar, and analyzers (Sharpe, SQN, TimeReturn), sizers and commission schemes plug in around it. Its strengths are multiple data feeds and timeframes inside one strategy, resampling and replay (splitting a daily bar into intraday chunks, for example), filters such as Renko, TA-Lib support and pyfolio integration. Data loads from CSV, pandas or online sources. The documentation and samples are thorough, and years of community answers and code snippets mean almost any problem has already been solved by someone.
Weak spots
The project is unmaintained: the last commit to master and the last PyPI release date from April 2023, and GitHub issues are disabled. Live trading modules rely on IbPy and Oanda's old non-streaming REST API, with no crypto exchange connectors. The metaclass-heavy architecture is hard to debug, and pure Python gets slow on large minute-level datasets. Compatibility with new Python, pandas and matplotlib versions is yours to verify and patch.
Who it is for
People learning event-driven backtesting who want to understand broker simulation, sizers and analyzers on a mature, well-documented codebase. Good for study projects and for testing ideas on daily and hourly equity data.
Versus alternatives
For new projects, use backtesting.py, which is lighter and simpler for a single idea, vectorbt for fast vectorized sweeps over thousands of parameter combinations, or NautilusTrader when you need to trade live with the same code. Backtrader keeps an edge in sheer volume of examples and flexible multi-timeframe handling.
Security
If you use the live module with Interactive Brokers or Oanda, run it on a demo account first: the code has not changed since 2023 and broker APIs have moved on. Install only the backtrader package from PyPI, and vet forks promising fixes before installing, especially if they ask for broker credentials.
- Last master commit and PyPI release: 1.9.78.123, 19 April 2023
- License: GPL-3.0
- GitHub issues disabled; questions go to community.backtrader.com
- Live trading via Interactive Brokers (IbPy), Oanda and Visual Chart
Stars by day
GitHub dataGitHub ↗
| Topic | Algo trading & backtesting |
| Language | Python |
| Created | 10.01.2015 |
| Last release | 19.11.2016 |
| Releases / tags | 0 / 139 |
| Contributors | 56 |
| Commits total / 90d | 2.4k / 0 |
| Watchers | 650 |
AlgoScore breakdownmethodology →
Topic neighboursAlgo trading & backtesting →
| # | Repository | AlgoScore | ★ | 30d growth | Push | Label |
|---|---|---|---|---|---|---|
| 1 | nautechsystems/nautilus_traderProduction-grade Rust-native trading engine with deterministic event-driven architecture | 90 | 32k | — | today | Use it |
| 2 | vnpy/vnpy基于Python的开源量化交易平台开发框架 | 87 | 47k | — | 24 d | |
| 3 | coding-kitties/investing-algorithm-frameworkFramework for quantitative trading. Complete framework for development, backtesting, and deploying automated trading algorithms and trading bots. | 87 | 2.3k | — | 1 d | |
| 4 | microsoft/qlibQlib is an AI-oriented Quant investment platform that aims to use AI tech to empower Quant Research, from exploring ideas to implementing productions. Qlib supports diverse ML modeling paradigms, including supervised learning, market dynamics modeling, and RL, and is now equipped with https://github | 85 | 51k | — | today | For research |
| 5 | QuantConnect/LeanLean Algorithmic Trading Engine by QuantConnect (Python, C#) | 85 | 23k | — | today | Use it |
| 6 | pst-group/pysystemtradeSystematic Trading in python | 85 | 3.7k | — | 33 d | |
| 7 | stefan-jansen/machine-learning-for-tradingCode for Machine Learning for Trading, 3rd edition — from data sourcing to live execution. | 84 | 22k | — | today | |
| 8 | polakowo/vectorbtThe research engine that gives you an unfair advantage. Run thousands of trading ideas before others finish one. | 84 | 10k | — | 6 d | Use it |