Open-source trading and backtesting frameworks
18 widely used open-source projects for backtesting, live trading, crypto bots, machine learning and market data, with what each is good at, where it falls short, and how actively it is maintained. GitHub numbers are refreshed every week.
Backtesting libraries · Backtest-to-live platforms · Crypto trading bots · AI and machine learning · Data and indicators
How to choose
- Learning, or porting rule-based systems with detailed orders: an event-driven library such as Backtrader or Backtesting.py.
- Testing many parameter combinations quickly: vectorbt. Then confirm the final rules in an event-driven engine.
- Going live with a broker across asset classes: LEAN or NautilusTrader; for Chinese futures and stocks, vn.py.
- Crypto: Freqtrade for directional strategies, Hummingbot for market making and arbitrage.
- Machine learning: Qlib for stock selection models, FinRL for reinforcement learning, TradingAgents for language-model agents.
- Whatever you pick, test parameters out of sample. Across our own 486 walk-forward tests the median Sharpe ratio fell from 0.32 on the training data to 0.19 on new data.
Backtesting libraries
Libraries for testing a strategy on historical data in Python. Pick by how you think about strategies: event by event, or whole arrays at once.
| Project | What it is | Language | License | Stars | Last commit | Status |
|---|---|---|---|---|---|---|
| Backtrader | Event-driven Python backtesting and live-trading library with a large community. | Python | GPL-3.0 | 23.7k | 2024-08-19 | Inactive |
| Zipline | Quantopian's event-driven backtester with the Pipeline API; the original repository is no longer maintained. | Python | Apache-2.0 | 20.2k | 2024-02-13 | Inactive |
| vectorbt | Vectorized backtesting on pandas and NumPy, built to test thousands of parameter combinations fast. | Python | Apache-2.0 + Commons Clause | 9.8k | 2026-11-08 | Active |
| Backtesting.py | Small, readable backtesting library with interactive charts and a built-in optimizer. | Python | AGPL-3.0 | 9.2k | 2026-08-05 | Slowing |
| PyAlgoTrade | Early event-driven Python backtester, now archived by its author. | Python | See repository | 4.7k | 2023-11-13 | Archived |
| bt | Portfolio backtesting built from reusable blocks, for allocation and rebalancing strategies. | Python | MIT | 3.0k | 2026-11-08 | Active |
Backtest-to-live platforms
Engines that run the same strategy code in backtests and with a real broker or exchange, across several asset classes.
| Project | What it is | Language | License | Stars | Last commit | Status |
|---|---|---|---|---|---|---|
| vn.py (VeighNa) | The most widely used open-source quant trading platform in China, now branded VeighNa. | Python | MIT | 46.3k | 2026-11-07 | Active |
| NautilusTrader | High-performance, event-driven trading platform with a Rust core and a Python API. | Rust | LGPL-3.0 | 31.4k | 2026-11-10 | Active |
| QuantConnect LEAN | QuantConnect's open-source engine: C# core, Python strategies, many asset classes, backtest and live. | C# | Apache-2.0 | 22.5k | 2026-11-10 | Active |
Crypto trading bots
Ready-to-run bots for crypto exchanges, with backtesting, paper trading and remote control built in.
| Project | What it is | Language | License | Stars | Last commit | Status |
|---|---|---|---|---|---|---|
| Freqtrade | The most popular open-source crypto trading bot, with backtesting, hyperparameter search and machine learning. | Python | GPL-3.0 | 56.7k | 2026-11-10 | Active |
| Hummingbot | Open-source framework for market making and arbitrage bots on centralized and decentralized exchanges. | Python | Apache-2.0 | 21.1k | 2026-11-09 | Active |
| Jesse | Crypto trading framework focused on simple strategy syntax and accurate backtests. | Python | MIT | 8.8k | 2026-11-10 | Active |
AI and machine learning
Research frameworks that use machine learning, reinforcement learning or language-model agents to make trading decisions.
| Project | What it is | Language | License | Stars | Last commit | Status |
|---|---|---|---|---|---|---|
| TradingAgents | Multi-agent framework where language-model agents act as analysts, researchers, a trader and a risk team. | Python | Apache-2.0 | 121.8k | 2026-11-04 | Active |
| Qlib | Microsoft's AI-oriented quant investment platform for building and testing machine-learning alpha models. | Python | MIT | 50.2k | 2026-11-04 | Active |
| FinRL | Deep reinforcement learning library for trading research and teaching. | Jupyter Notebook | MIT | 17.0k | 2026-11-03 | Active |
Data and indicators
Building blocks most strategies need: market data and technical indicators.
| Project | What it is | Language | License | Stars | Last commit | Status |
|---|---|---|---|---|---|---|
| CCXT | One API for market data and trading on more than a hundred crypto exchanges. | Python | MIT | 44.9k | 2026-11-10 | Active |
| yfinance | Free download of Yahoo Finance prices and fundamentals into pandas. | Python | Apache-2.0 | 25.9k | 2026-11-09 | Active |
| TA-Lib (Python) | Python wrapper for TA-Lib, the classic C library of 150+ technical indicators and candlestick patterns. | Cython | BSD-2-Clause | 12.4k | 2026-11-09 | Active |
Head-to-head comparisons
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. 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.