Windows portfolio backtester scripted in AFL, sold as a perpetual licence.
Backtesting Frameworks & Algo Trading Libraries
Simulate a strategy and find out whether the edge survives costs — where the commit log and the LICENSE file decide more than any feature list.
Last updated
Nothing here needs to cost money: the engines with the most careful fill and cost modelling are free, and the real bill in this category is data. What separates them is not features but two things a feature list will not tell you — whether anyone is still fixing the code, and what the LICENSE file lets you build. Backtrader, widely used and unusually well documented, has shipped nothing since April 2023, and two of the best-known engines are copyleft.
- Parameter sweeps and factor research — VectorBT, or VectorBT PRO if you need the maintained one.
- One strategy, one instrument, learning the ropes — Backtesting.py.
- ML stock ranking across a whole universe — Qlib, if you can supply data newer than 2020.
- The same code backtesting and trading live — NautilusTrader, or Lumibot for ten broker classes, Schwab and Tradier among them.
- A hosted engine with survivorship-bias-free data included — QuantConnect.
- A hosted engine for nothing — Blueshift, minute data and two brokers, no paid tier.
- The platform on your own hardware, wired to Interactive Brokers — QuantRocket.
- Allocation and rebalancing rather than entries and exits — bt.
- No code at all — a different category: no-code strategy builders.
- A packaged desktop application you own outright — AmiBroker, or WealthLab by subscription with index-membership data bundled.
Check the commit log before the feature list
This is the one category where the most useful fact about a product is not on its website. Almost everything here is open source, feature lists converge, and the question that actually decides your next two years is whether anyone is still fixing it. Three checks, in order:
The last commit on the default branch. Not the star count, which only goes up. Backtrader is widely used, has unusually complete documentation and 63 open pull requests, and has had nothing merged into master since April 2023. It is a museum piece with an excellent reputation. QSTrader last committed in June 2024; fastquant, a wrapper over Backtrader, has been dormant since 2023 and is broken on PyPI as installed.
The newest release, not the newest commit. A repository can accumulate typo fixes for a year without cutting a release, and what you install is the release. PyPI, NuGet and the GitHub releases tab all carry the date.
Which Python it claims. This is where a dormant project actually bites. An unmaintained package breaks the release that pandas or NumPy changes under it, and nobody merges the fix — so its dependency pins quietly become your dependency pins. The maintained projects here declare a current interpreter range and drop old ones; the abandoned ones declare nothing at all.
None of this means a dormant framework is unusable. Backtesting logic does not rot the way a broker adapter does, and a stable, well-documented engine you have read is worth more than a busy one you have not. It means the bugs are now yours, and you should decide that on purpose.
Vectorised and event-driven are a claim about what can be modelled
Vendors sell this as a performance choice. It is not: it decides which strategies the engine can express at all.
Vectorised means signals are computed over the entire price series as arrays, and positions are derived from those arrays afterwards. The result is genuinely fast — tens of thousands of parameter combinations in the time an event loop does one. The cost is that nothing in the simulation can depend on the state the simulation is in. Position size as a function of current equity, a stop that trails an open trade, an order that might not fill, two instruments whose orders interact: each of these is either bolted on through a callback, at which point most of the speed is gone, or approximated in a way that flatters the result.
Event-driven means the engine replays data one event at a time and your strategy sees only what existed at that instant. It is slower by orders of magnitude, and it is the only architecture in which the backtest and the live trading loop can be the same object. That, not realism in the abstract, is the reason to accept the speed penalty.
The practical rule: factor research and parameter sweeps want vectorised; anything you intend to run with money wants event-driven. Plenty of people use one of each, and that is a sane answer.
What the engine can and cannot model
Intrabar fills. Given a daily bar, the engine knows the open, high, low and close and nothing whatever about the order in which they occurred. If your stop and your target both sit inside one bar, which filled first is a guess the framework makes on your behalf — usually the pessimistic one, not always, and rarely on the front page of the documentation. A strategy that regularly puts both levels inside a single bar is measuring that assumption rather than an edge. Feed finer bars or stop designing around it.
Commissions and slippage. Find the defaults before you read a single equity curve. Zero slippage and a flat percentage commission are common defaults, and they flatter a high-turnover strategy out of all proportion. Whether the engine can express a per-share commission with a minimum, a fill priced off the spread, borrow cost on a short, or any market-impact function at all is a real difference between these products, and it lives in the API reference rather than the README.
Look-ahead. Every framework has a convention for whether a signal computed on a bar may trade on that same bar, and they differ: trade at the close of the signal bar, at the next open, or at the next bar's close. A series shifted by one is the most common way a backtest lies, and it is invisible in the results — the curve just looks good.
Survivorship bias is yours, not the engine's. No framework in this listing fixes it and none claims to. Free equity data contains the tickers that are still listed; every company that went bankrupt, was acquired or was delisted is simply absent, so any strategy that scans a universe is being tested on the survivors. Correcting it needs a delisted-securities archive and point-in-time index membership, which is a paid data purchase in every case. It is the most expensive line in a serious backtest and the one no feature comparison mentions.
The LICENSE file, not the badge
The licences here span the full range, and the differences are the kind a legal team asks about before a commercial deployment, not afterwards.
Permissive — MIT and Apache-2.0 — puts no condition on what you build. Zipline-reloaded is Apache-2.0, and so is QuantConnect's LEAN engine, the open-sourced core of a commercial cloud platform. bt, QSTrader and Qlib are MIT, and ib_async keeps ib_insync's BSD 2-Clause terms.
GPL-3.0 and LGPL-3.0 part company on linking. LGPL lets proprietary code use the library; GPL
does not, once you distribute the result. The two best-known engines here sit one on each side of
that line: Backtrader is GPL-3.0-or-later and
NautilusTrader is LGPL-3.0-only. Lumibot is the case for reading the
file rather than the label: its README badge, setup.py and PyPI classifier all say MIT, while
its LICENSE file has held the full GPL-3.0 text since January 2021.
AGPL-3.0 extends copyleft across the network: offering the library's functionality as a hosted service counts as distribution. Backtesting.py is AGPL-3.0. Your strategies remain yours; a SaaS built on top of the library is a different conversation.
Source-available, sold as open source. Apache-2.0 with a Commons Clause is not an OSI licence — it withdraws the right to sell a product or service whose value derives substantially from the software, which is precisely what a data or signals business would be doing. VectorBT is licensed this way, and so is PyBroker, while its actively developed successor VectorBT PRO is closed and paid. StockSharp publishes its source on a public repository and is described everywhere as open source; since 16 July 2026 its licence file is a custom notice routing every use through a proprietary EULA.
Open the file. It takes thirty seconds and it is the contract.
Three jobs behind one word
Backtesting is the base job: replay history, apply costs, produce a return series and a set of statistics. Judge these on the fill and cost model, on what data formats they ingest, and on how long a sweep takes.
Live trading is a different product that happens to share a repository. It is settled by venue
and broker adapters, and by whether the backtest and the live path are literally the same code.
Ask what the framework does on a reconnect, a partial fill, or a restart while a position is
open — a backtester has never once had to answer any of those questions, which is why the engines
that take live trading seriously look heavyweight next to the ones that do not.
FinRL-X is the narrow case: one portfolio-weight vector goes either to a backtest
on bt or to Alpaca as a rebalance, with one broker and daily bars. Lumibot is the wide one: a
single Strategy subclass runs against a backtesting data source or any of ten broker classes —
Alpaca, Interactive Brokers, Tradier, Schwab, Tradovate, Polymarket and a CCXT client among them —
and since 2026 it ships an LLM agent runtime whose agents, created with allow_trading=True,
submit orders through the same loop. The library is free and complete; BotSpot, the same
company's managed cloud for it, starts at $24.50 a month, discounted from a $49 list price.
ib_async is not an engine at all but a broker adapter: the community
continuation of ib_insync, a Python client for Interactive Brokers' TWS API with no backtester,
which connects to nothing unless TWS or IB Gateway is running and logged into an IBKR account.
Research is the notebook job, and the question is not "does this strategy work" but "is there any information in this signal". It wants fast sweeps, factor and alpha plumbing, and reporting you can read; it does not care about order routing at all. This is where vectorised engines are not a compromise but the correct tool. Model-driven research has two entries of its own: FinRL trains reinforcement-learning agents in gym-style market environments, and PyBroker retrains a model you supply walk-forward, window by window, with bootstrapped bounds on the result. Pre-trained bar models are newer still: Kronos publishes open weights trained on OHLCV bars, which forecast the next bars and leave the backtest to you. FinGPT is the same idea on text: eleven LoRA adapters, fourteen instruction datasets and the notebooks that trained them, all MIT — weights and data rather than an application, and the newest adapter was last touched in October 2024. Qlib, Microsoft's ML factor-research pipeline, scores every stock in a universe each day, rebalances a top-k portfolio and reports information coefficient and excess return, with 26 benchmark models and the Alpha158 and Alpha360 factor sets. The data its CLI downloads stops in late 2020 — September for China, November for the US — and it has no broker adapter.
A strategy built in a UI rather than in code is a different purchase, and has its own section: no-code strategy builders.
Ranking a Rust execution engine against a notebook research library produces nothing. Decide which of the three you are here for, then compare only inside it. The exception is one research question — ranking stocks on point-in-time fundamentals — where a no-code ranker and a coded engine are genuinely rivals: Portfolio123 vs QuantConnect.
What any of this costs
Most of this category is free, and where money changes hands it is rarely for the engine. Cloud platforms charge for a seat plus compute, assembled per account rather than priced as a tier, and bundle the survivorship-bias-free data that would otherwise be your largest bill. Blueshift is the exception: free, with no paid tier to move to, minute data for a liquidity-filtered top-1000 US universe bundled, and live runs through Alpaca or Spring by ICICI Direct — though its docs call live deployment free only "for a limited period". QuantRocket is the self-hosted version of the platform shape: Zipline and Moonshot in Docker on hardware you pay for, US stock history back to 2007 with delisted names retained, and live trading through Interactive Brokers or Alpaca. Its free tier has no live or paper trading, and the paid price appears only after you register and answer a licence questionnaire. Desktop products are still sold outright — AmiBroker's editions run $299, $379 and $499 as one-time licences with a couple of years of updates, and WealthLab is $49.95 a month, $399.95 a year or $1,595 for a lifetime licence, with end-of-day index data that keeps delisted members. Open-core .NET platforms follow the same shape from the other direction: a free tier that genuinely runs live, with paid editions starting at $995 for the first year.
The exception that swallows all of it is data. Budget for the delisted archive before you budget for the software.
All 25 tools in Backtesting
Compiled from each vendor’s own documentation, pricing page and terms — no card here is marked hands-on yet.
Showing 25 of 25
Sort by
A single-instrument Python backtester — one OHLC series, one strategy, no live trading.
An event-driven Python backtester with 122 indicators, frozen since April 2023.
Free hosted Python backtesting with bundled minute data and broker execution.
Python backtesting for allocation and rebalancing rules, not entries and exits.
A one-call wrapper over Backtrader, dormant since 2023 and broken on PyPI.
Financial LLM adapters, instruction datasets and training notebooks, all MIT.
Gym-style market environments and deep-RL agents for trading research, MIT-licensed.
FinRL's successor, carrying one portfolio-weight vector from stock selection to Alpaca.
The community continuation of ib_insync — same API, new maintainers, TWS still required.
Open-weights transformer pre-trained on OHLCV bars. The training corpus is not released.
QuantConnect's engine without the cloud — your server, your data, your broker login.
One strategy class for backtest and live, plus a built-in LLM agent runtime.
Rust core, Python API, one strategy that backtests and trades live unchanged.
Multi-factor ranking, screening and point-in-time backtests without writing code.
Python backtester with walk-forward model training and bootstrapped confidence bounds.
Microsoft's ML factor-research pipeline. The data its CLI downloads stops in late 2020.
An institutional-shaped Python backtester whose last commit to master was June 2024.
LEAN hosted for you — a browser IDE, mounted data and live trading through real brokers.
Zipline and Moonshot in Docker on your own hardware, wired to Interactive Brokers.
C#/.NET algo stack with 384 connectors; source is published but no longer open source.
Vectorised backtesting — thousands of parameter combinations in one NumPy pass.
Paid vectorbt — native Rust simulators, streaming indicators and a built-in MCP server.
Windows portfolio backtesting in C# or drag-and-drop blocks, with a built-in MCP service.
The maintained fork of Quantopian's Zipline. Bring your own data — it ships almost none.
Head to head
Background
How this part of the industry works, rather than which product to pick.
How to
One task each, the cards that do it, and what breaks on the obvious attempt.
The words on these pages
Defined once, as this catalogue uses them.
FAQ
How can I tell whether an open-source backtesting framework is still maintained?
Star counts never decay, so they tell you nothing — check the date of the last commit on the default branch, the date of the newest release on PyPI or NuGet, and whether the package claims support for a current Python. Several of the best-known Python backtesting libraries, Backtrader among them, have shipped no release since 2023 or 2024.
What is the difference between a vectorised and an event-driven backtester?
A vectorised engine computes signals across the whole price series at once, which makes parameter sweeps enormously fast and makes any decision that depends on the current state of the portfolio awkward or impossible. An event-driven engine replays the data one event at a time, so your strategy sees only what existed at that instant — far slower, and the only architecture in which the backtest and the live trading loop can be the same code.
Can I use an open-source backtesting library in a commercial product?
It depends on the LICENSE file, not the badge. MIT and Apache-2.0 projects are unrestricted; GPL-3.0 and LGPL-3.0 differ on whether proprietary code may link to them; AGPL-3.0 reaches over the network, so offering the library's functionality as a hosted service triggers the source-disclosure obligation. Some projects described everywhere as open source are not — Apache plus a Commons Clause removes the right to sell a service whose value derives from the software, and at least one popular public trading repository ships a proprietary EULA as its licence.
Why does a backtest look so much better than the same strategy traded live?
Usually in this order — survivorship bias in the data, an intrabar fill assumption that resolved every ambiguous bar in your favour, commission and slippage left at their defaults, and a signal that quietly saw the bar it traded on. Only the third is the framework's doing; the first belongs to your data source and the other two to you.
Do I have to pay for a backtesting framework?
No. The engines with the most detailed fill and cost modelling are free and open source, and the real money in this category goes to data and compute. Paid products buy something else — a packaged desktop application (AmiBroker from $299 once, WealthLab at $49.95 a month or $1,595 for a lifetime licence), a managed cloud with survivorship-bias-free data included, or a no-code interface with no dependencies to manage. One hosted platform, Blueshift, is free outright, though it calls live deployment free only "for a limited period".