Best Python backtesting libraries in 2026
Eight libraries, compared on what their own users praise and complain about rather than on feature lists. We make Manifold-BT, so it is listed first and its weaknesses are listed too; a comparison that only its author could love is one nobody cites. Every fact here was read on 19 September 2026 from PyPI, GitHub, the projects’ docs and issue trackers, and dated reviews; each quote links to where it was said. Reddit and StackOverflow could not be read, so nothing is attributed to them.
The short version
- Research: sweeps, walk-forward and Monte Carlo with realistic costs, on your own machineManifold-BT →
- Learning, or one instrument and a chart in minutesBacktesting.py →
- Vectorized screening of signal-heavy ideas in NumPyvectorbt →
- Going live from the code you backtested, with order-book fidelityNautilusTrader →
- A hosted platform with the data and the brokers includedQuantConnect →
- A crypto bot that backtests and trades on an exchangeFreqtrade →
- US equity factor research, or old Quantopian codezipline-reloaded →
- Live trading in pure Python through Interactive Brokers, and you accept 2023 codebacktrader →
Side by side
| Library | Engine | Multi-asset | Parameter search | Costs modelled | Live | Licence | Latest release | Price |
|---|---|---|---|---|---|---|---|---|
| Manifold-BT | Rust core, vectorized signals then a sequential fills pass | Yes, one shared account | Sweeps on every core, 2-D heatmaps, stability, walk-forward (Pro), Monte Carlo | Maker/taker fees, market-impact slippage, funding, partial fills, signal delay | No | Python package on GitHub, Rust core compiled in the wheel | 0.26.0, 2026 | Community free; Pro $19/mo or $290 once |
| vectorbt | NumPy + numba, optional Rust backend since 1.0 | Yes, as array columns | Vectorized parameter grids; walk-forward and more in PRO | Fees, slippage, stops | No (signal export) | Apache 2.0 + Commons Clause (source-available) | 1.1.0, 5 Jul 2026 | Free; PRO $25/mo, $240/yr, $500 lifetime (personal use) |
| Backtesting.py | Pure Python, next() per bar | No, one instrument per backtest | Grid or SAMBO optimize(), parallel, heatmap | Commission, spread, margin, trade-on-close | No | AGPL-3.0 | 0.6.6, 22 Jul 2026 | Free |
| backtrader | Pure Python, event-driven | Yes | optstrategy, single process | Commission schemes, slippage, configurable | Yes, Interactive Brokers, Oanda | GPL-3.0 | 1.9.78.123, 19 Apr 2023 | Free |
| NautilusTrader | Rust core, event-driven, nanosecond time | Yes, multi-venue | None built in | Order-book replay, latency and fill models | Yes, venue adapters | LGPL-3.0 | 1.231.0, 2 Aug 2026 (2.0 in rc) | Free; Pro and Cloud tiers on a waitlist |
| QuantConnect / LEAN | C# engine with Python, event-driven, cloud nodes | Yes, curated universes | Cloud optimization, three parameters, billed in credits | Fee, fill, slippage, settlement, margin models per security | Yes, 20+ brokerages | LEAN Apache-2.0; platform hosted | Continuous | Free tier; Researcher $60/mo; team plans per seat; credits |
| Freqtrade | Pure Python bot, pandas signals | Yes, crypto pairs | Hyperopt, no walk-forward | Fees; no slippage, every limit order fills | Yes, ~12 exchanges tested | GPL-3.0 | 2026.8, 31 Aug 2026 | Free |
| zipline-reloaded | Pure Python, event-driven, Pipeline API | Yes, US-equity universes | None built in | Commission and slippage models | No | Apache-2.0 | 3.1.1, 19 Jul 2025 | Free |
Manifold-BT
A research library with a Rust core under a Python expression DSL. Signals are evaluated vectorized over a whole universe in one shared account, then a sequential pass models fills with explicit costs: maker and taker fees, market-impact slippage, funding on perpetuals, partial fills, and a signal delay so bar t decides and bar t+1 fills. A parameter grid is one native call across every core, with 2-D heatmaps, a stability score, Monte Carlo, and walk-forward on Pro; look-ahead and exposure diagnostics rerun the strategy on truncated windows and compare the trades. Data comes from free connectors (Binance, Bybit, Hyperliquid, dYdX, Deribit, Dukascopy, Yahoo Finance), Databento and Massive on Pro, or a CSV or DataFrame you already have. There is a documentation server over MCP so a coding agent writes strategies that compile, which matters more than it sounds: measured on eight tasks, an agent with the engine but no reference got 8 of 24 runs right, and 18 of 24 with it.
What it does not do, said plainly. It does not trade live; it is research software, and the intended workflow is to validate here and deploy on a platform built for execution. It is young, first released in 2026, with a community to match: you will not find a decade of forum threads. The Rust core is not open source; the Python package is on GitHub and the engine ships compiled in the wheel. Walk-forward, GPU sweeps, simulation below one minute and the look-ahead diagnostics are Pro, $19 a month or $290 once, and the free Community tier caps a session at 256 parameter combinations. Its connectors are crypto-first; for US equities with corporate actions you bring the data or use a Pro connector, where QuantConnect’s hosted library is ahead. The published benchmarks against vectorbt and RaptorBT are on the benchmarks page and follow CI; they were measured against vectorbt’s numba path, before its 1.0 Rust backend.
Choose it if the work is research: many parameters, a universe in one account, costs the market will actually charge, and checks that catch a backtest that lies, from a library you install in one line and run where the electricity is already paid for.
vectorbt
The reference for vectorized backtesting in Python: signals as NumPy arrays, a portfolio simulated across every column at once with numba, Plotly charts built in. The open-source version is alive, with 1.0.0 in April 2026, 1.1.0 on 5 July 2026 and an optional Rust backend since 1.0, and 9,100 stars. The licence is Apache 2.0 with a Commons Clause, so source-available rather than OSI open source: internal use is fine, selling a product built on it is not. vectorbt PRO is a separate paid membership, $25 a month, $240 a year or $500 for life, personal and non-commercial use.
“can evaluate a thousand parameter combinations in roughly the time an event-driven framework takes to run one” quanttradingtools.com, July 2026
The complaints cluster on three things. Memory: sweeps on large frames blow up, with users reporting a 7-million-row job failing to allocate and, in older threads, a 24 GB peak. The learning curve, which the same July 2026 review calls the steepest of the research tools, because everything is pandas broadcasting. And the pull of PRO: the maintainer wrote in July 2023 that the community version will be maintained but that entirely new features should come from the community, and a June 2026 issue showing the open-source and PRO versions returning 3,877 versus 4,972 trades on identical code was closed without a reply.
“The given stats from the Portfolio.from_signals function from vectorbt are different than the stats from vectorbtpro” GitHub issue #855, June 2026
Two things it would be unfair to say: that the open-source version is abandoned (it is not), and that it cannot do path-dependent logic (it can, through order functions and numba callbacks; the fair criticism is that this is awkward and thinly documented).
Choose it if you think in NumPy, your ideas are signal-heavy rather than path-dependent, and you want the fastest way to screen thousands of variants.
Backtesting.py
The simplest way to write a first backtest in Python: a Strategy class with init() and next(), a Backtest object, an interactive Bokeh chart, and a built-in optimizer with grid and model-based search that runs in parallel. Version 0.6.6 shipped on 22 July 2026 under AGPL-3.0, with about 9,000 stars. It is one person’s project: 406 commits by the maintainer, 2 by the next contributor, and a gap from December 2021 to January 2025 during which a company forked it to keep releases going.
“Backtesting.py is great when you just want something that works. It’s easy to install, has excellent documentation, and doesn’t suffer from the bloat of other backtesting libraries” Greyhound Analytics, April 2022
The limit users hit is the one it chose: one instrument per backtest. The request for a shared-cash portfolio has been open since September 2019 and gets re-filed every year; MultiBacktest, added in 0.6.3, reruns a strategy over several datasets but does not share the capital. The optimizer also slows down on long intraday series, and plotting has broken on Bokeh upgrades more than once.
“currently only one stock is supported right? Because if I have a strategy which uses 2 stocks, how would I deal with that?” GitHub issue #1105, January 2024
It would be wrong to call it abandoned (eight releases in 2025-2026), to say it lacks fractional units (fixed in 0.6.2) or bracket orders (documented), or that AGPL bans commercial use (it constrains distributing modified copies, not using it).
Choose it to learn, or whenever one instrument, a commission rate and a chart in minutes is exactly the job.
backtrader
The pure-Python framework a generation learned on: event-driven, every asset class, Interactive Brokers and Oanda live trading built in, 23,000 stars and still about 205,000 PyPI downloads a month. The last release, 1.9.78.123, is dated 19 April 2023, and so is the last commit. The issue tracker is switched off, the community forum was offline when we checked, and 63 pull requests wait on the repository, including a Yahoo data fix with four approvals since 2023 and a fix for an AttributeError on Python 3.10+ opened in May 2026.
“Verified in jupyterlab that this fix works. Please merge ASAP!” pull request #488, February 2024
What still holds: it is stable, it does not produce wrong numbers, and the documentation is the most consistently praised of any library here. What does not: there is nowhere to ask for help, a strategy is verbose by modern standards, and parameter sweeps run one backtest at a time in one process. The forks (backtrader2, lucidinvestor) have not picked up the pace either.
“the library is stable and widely used. It doesn’t crash or produce incorrect results” quantt.co.uk, August 2026
Two claims to avoid: that development stopped in 2018 or 2020 (it was 2023), and that the author walked away with a statement (we found none; he is active on other projects). Also the 20x speed figure some 2026 posts quote against vectorbt comes with no hardware or method, so it is not repeated here.
Choose it if you want live trading in pure Python through Interactive Brokers and you are comfortable maintaining 2023 code yourself. Do not start a new system on it.
NautilusTrader
A production-grade event-driven trading platform with a Rust core: order-book replay at nanosecond resolution, latency and fill models, and the same event loop driving live trading through venue adapters, so the code that backtested is the code that trades. 29,000 stars, LGPL-3.0, version 1.231.0 on 2 August 2026 with 2.0 in release candidates, and releases every couple of weeks. Pro and Cloud tiers exist on a waitlist with no public price.
“This is pretty comprehensive. I work at a quant firm, and we don’t even have some of this implemented in code.” Hacker News, August 2025
The friction is all on the way in. The README itself says breaking changes can occur between releases, and they do: about thirty in 1.231.0, about fifty in the 2.0 release candidate. There is no beginner path in the docs (a discussion asking for one in August 2025 has zero replies), the data catalog is a known rough edge the maintainer once called a bit of a mess, and there is no parameter optimisation layer at all: no grid search, no walk-forward, an issue from 2022 that never became a feature.
“for a simple daily-bar strategy it is unambiguous overkill” quanttradingtools.com, July 2026
Unfair: calling it slow because of Cython (that predates the Rust migration), or saying it leaks memory (the reported leaks are fixed and closed).
Choose it when you are going live and your edge depends on execution mechanics. Find the strategy somewhere lighter first.
QuantConnect
The most complete hosted platform: a web IDE, a free data library across equities, options, futures, forex and crypto that reviewers call point-in-time corrected, an open-source engine (LEAN, Apache-2.0, 21,700 stars), and live trading through more than twenty brokerages. The free tier gives one backtesting node with a 20-second launch delay and 200 backtests a day, no live trading; Researcher is $60 a month with two nodes; team plans are $120 to $1,080 per user per month. Optimization jobs and local data downloads are metered in credits, at roughly $0.15 to $0.60 an hour per node and about $0.05 per symbol-day of minute data. Running LEAN locally needs Docker.
“Being able to unify the code and backtest and run with the same code was a huge win for me.” Trustpilot, September 2025
The complaints are the platform’s, not the engine’s. Users on paid nodes report being throttled with “Too many backtest requests; please slow down”, a research kernel that times out and loses work, and a pricing model its own forum calls confusing. Trustpilot sits at 3.9 out of 5 over 67 reviews with 18% one-star, and there are no integrations with EU exchanges.
“I found the pricing structure and process confusing and spent money unnecessarily” QuantConnect forum
Unfair: saying you must pay to backtest (the free tier is real, within its limits), that every dataset costs credits (cloud backtests on most price data are free), or that the CLI charges on every run (the founder disputes it; report it as contested).
Choose it if you want one hosted platform from idea to live orders, with the data problem solved for you, and the per-node, per-credit model fits how often you run.
Freqtrade
The most used open-source crypto bot: 54,500 stars, GPL-3.0, monthly releases (2026.8 on 31 August 2026), a dozen exchanges tested and CCXT behind them, with data download, backtesting, hyperopt and dry-run in one CLI. Its documentation is unusually candid about its own limits, which is a real strength.
“All orders are filled at the requested price (no slippage) as long as the price is within the candle’s high/low range.” Freqtrade docs
For backtesting specifically, that sentence is the problem. No slippage and every limit order filling makes a tight trailing stop look like a perfect trade, and the most recurring issue on the tracker, still in March 2026, is that backtest signals do not match dry-run signals. The built-in look-ahead detectors miss cases (an open issue from February 2025 shows a strategy that uses future data and passes both), hyperopt has no walk-forward and nudges toward overfitting, and a three-pair, three-year daily backtest taking over ten minutes has been reported. It is crypto only.
“signals generated in dry-run mode do not match those produced by backtesting” GitHub issue #12894, March 2026
Unfair: saying it has no look-ahead tooling (it has two analyses), that it cannot see inside a candle (it can, at a cost), or that backtest-to-live divergence is an engine bug (several such issues trace to strategy code).
Choose it if you trade crypto on a centralised exchange and want one framework from backtest to live, and you validate the backtest elsewhere before you trust it.
zipline-reloaded
The engine that ran Quantopian, kept alive by a single maintainer after the platform closed in 2020. Apache-2.0, 1,900 stars, version 3.1.1 on 19 July 2025 with Python 3.13 wheels. Its Pipeline API is still the most expressive way in Python to define cross-sectional factors over a US equity universe, and it is where the Machine Learning for Algorithmic Trading and Trading Evolved books send their readers.
“Zipline-Reloaded is a huge leap forward” followingthetrend.com, December 2021
The state of it in September 2026: no human commit since July 2025, seven bug reports filed in February 2026, one titled DataPortal correctness bugs, with no answer, and the default data bundle dead since Quandl discontinued it in 2018, so you write or buy your own. Installation is the most cited pain, with issues describing days lost, and the event loop is slow for optimisation. There is no live trading path.
“I wasted countless hours over many days with this and I’m about to give up.” GitHub issue #130, September 2022
Unfair: calling it dead (3.1.1 is recent enough and installable), or US-only (it defaults to NYSE but ships other calendars). Fair: maintenance-only, one maintainer, no working free data out of the box.
Choose it for daily-bar factor research on US equities with your own data, or to run code you wrote for Quantopian.
How to choose, in one pass
Ask three questions. Will this code trade live? If yes, and execution mechanics are your edge, NautilusTrader; if yes, and you want the data and brokers included, QuantConnect; if yes, in crypto on an exchange, Freqtrade. If no, is the strategy one instrument and an indicator? Backtesting.py, and move on when it is not. If no, and it is a universe, costs and validation: vectorbt if you think in NumPy and screen rather than simulate fills, Manifold-BT if you want the fills, the funding and the walk-forward modelled for you on your own machine. zipline-reloaded and backtrader are the answers to specific questions, factor research on US equities and pure-Python live trading through Interactive Brokers, and neither is where a new project starts.
Frequently asked questions
What is the best Python backtesting library?
There is no single one, and any page that says otherwise is selling something, this one included. It depends on the job. For research (parameter sweeps, walk-forward, Monte Carlo, realistic costs) on your own machine, Manifold-BT is what we build and what we would pick. For a first backtest on one instrument, Backtesting.py. For vectorized screening in NumPy, vectorbt. For going live with order-book fidelity, NautilusTrader. For a hosted platform with data and brokers, QuantConnect. For a crypto bot, Freqtrade. For US equity factor research, zipline-reloaded. backtrader still runs, with live trading through Interactive Brokers, but it has not been maintained since April 2023.
Which Python backtesting library is the fastest?
Only three of the eight have been benchmarked against each other with published methodology: Manifold-BT, vectorbt and RaptorBT, on this site's benchmarks page, which tracks CI. Those numbers were measured against vectorbt's numba path; vectorbt 1.0 added an optional Rust backend in 2026 and has not been re-measured here. For the others the honest answer is that the event-driven engines (backtrader, zipline, NautilusTrader, Freqtrade) pay a per-bar loop on every run, which is the right design for live parity and the wrong one for a large grid, and that no reproducible cross-library benchmark exists for them. Blog posts quoting a 20x figure between backtrader and vectorbt publish no hardware or method; we did not repeat them.
Which of these are open source?
Fully open source under an OSI licence: backtrader (GPL-3.0), Backtesting.py (AGPL-3.0), NautilusTrader (LGPL-3.0), Freqtrade (GPL-3.0), zipline-reloaded (Apache-2.0), and the LEAN engine behind QuantConnect (Apache-2.0, the platform itself is hosted). vectorbt is source-available under Apache 2.0 with a Commons Clause, which forbids selling a product built on it, and vectorbt PRO is a paid membership for personal use. Manifold-BT's Python package is on GitHub and the Rust core ships compiled in the wheel; the Community tier is free and Pro is paid.
Which Python backtesting libraries support live trading?
backtrader (Interactive Brokers, Oanda), NautilusTrader (venue adapters, backtest-to-live parity), QuantConnect (20+ brokerages on paid plans) and Freqtrade (about a dozen tested crypto exchanges). Manifold-BT, vectorbt, Backtesting.py and zipline-reloaded do not place orders: they are research tools, and the usual workflow is to validate there and deploy on one of the first four.
Keep reading
Run your first backtest
Install Manifold-BT and reproduce the backtest above in seconds. The Rust core runs years of bars sub-second so you can sweep parameters instead of waiting.