# 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.

*https://stockmarketstack.com/categories/backtesting-frameworks*

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. The most-starred Python backtester in the listing has shipped nothing
since April 2023, and two of the best-known engines are copyleft.

- **Parameter sweeps and factor research** — [VectorBT](https://stockmarketstack.com/tools/vectorbt), or
  [VectorBT PRO](https://stockmarketstack.com/tools/vectorbt-pro) if you need the maintained one.
- **One strategy, one instrument, learning the ropes** — [Backtesting.py](https://stockmarketstack.com/tools/backtesting-py).
- **The same code backtesting and trading live** — [NautilusTrader](https://stockmarketstack.com/tools/nautilus-trader).
- **A hosted engine with survivorship-bias-free data included** — [QuantConnect](https://stockmarketstack.com/tools/quantconnect).
- **Allocation and rebalancing rather than entries and exits** — [bt](https://stockmarketstack.com/tools/bt).
- **No code at all** — [Composer](https://stockmarketstack.com/tools/composer).
- **A packaged desktop application you own outright** — [AmiBroker](https://stockmarketstack.com/tools/amibroker).

## 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](https://stockmarketstack.com/tools/backtrader) has well over 20,000 stars, is the name every thread recommends
first, and has had nothing merged into master since April 2023. It is a museum piece with an
excellent reputation. [QSTrader](https://stockmarketstack.com/tools/qstrader) last committed in June 2024;
[fastquant](https://stockmarketstack.com/tools/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](https://stockmarketstack.com/tools/zipline-reloaded) is Apache-2.0, and so is
[QuantConnect's LEAN engine](https://stockmarketstack.com/tools/quantconnect), the open-sourced core of a commercial cloud
platform. [bt](https://stockmarketstack.com/tools/bt) and [QSTrader](https://stockmarketstack.com/tools/qstrader) are MIT.

**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](https://stockmarketstack.com/tools/backtrader) is GPL-3.0-or-later and
[NautilusTrader](https://stockmarketstack.com/tools/nautilus-trader) is LGPL-3.0-only.

**AGPL-3.0** extends copyleft across the network: offering the library's functionality as a hosted
service counts as distribution. [Backtesting.py](https://stockmarketstack.com/tools/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](https://stockmarketstack.com/tools/vectorbt) is licensed this way, while its actively developed successor
[VectorBT PRO](https://stockmarketstack.com/tools/vectorbt-pro) is closed and paid. [StockSharp](https://stockmarketstack.com/tools/stocksharp) publishes
its source on a public repository and is described everywhere as open source; its LICENSE is a
proprietary EULA.

Open the file. It takes thirty seconds and it is the contract.

## Four 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.

**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.

**No-code** builds the strategy in a UI and runs it in the vendor's cloud. The trade is complete
and worth stating plainly: no dependencies, no data wrangling, no infrastructure — and exactly
the data, the universe and the fill assumptions the vendor chose, none of which you can inspect
or change. A no-code backtest is a claim made by the vendor rather than a measurement you made.

Ranking a Rust execution engine against a drag-and-drop cloud backtester produces nothing. Decide
which of the four you are here for, then compare only inside it.

## 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. 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 Wealth-Lab is $49.95 a month, $399.95 a year or
$1,595 for a lifetime licence. A no-code platform will typically let you build and backtest for
nothing and charge only to automate the trading, on the order of $384 a year. Open-core .NET
platforms follow the same shape from the other direction: a free tier that genuinely runs live,
with paid editions starting near $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.

## Cards

- [Adaptrade Builder](https://stockmarketstack.com/tools/adaptrade-builder.md) — Windows strategy generator — genetic programming writes the rules, you export the code.
- [AmiBroker](https://stockmarketstack.com/tools/amibroker.md) — Windows portfolio backtester scripted in AFL, sold as a perpetual licence.
- [Backtesting.py](https://stockmarketstack.com/tools/backtesting-py.md) — A single-instrument Python backtester — one OHLC series, one strategy, no live trading.
- [Backtrader](https://stockmarketstack.com/tools/backtrader.md) — An event-driven Python backtester with 122 indicators, frozen since April 2023.
- [Blueshift](https://stockmarketstack.com/tools/blueshift.md) — Free hosted Python backtesting with bundled minute data and broker execution.
- [bt](https://stockmarketstack.com/tools/bt.md) — Python backtesting for allocation and rebalancing rules, not entries and exits.
- [Build Alpha](https://stockmarketstack.com/tools/build-alpha.md) — Point-and-click strategy generation on Windows, exported as code to eight platforms.
- [Composer](https://stockmarketstack.com/tools/composer.md) — No-code rule-based stock and ETF strategies, backtested and then traded for real.
- [fastquant](https://stockmarketstack.com/tools/fastquant.md) — A one-call wrapper over Backtrader, dormant since 2023 and broken on PyPI.
- [ib_async](https://stockmarketstack.com/tools/ib-async.md) — The community continuation of ib_insync — same API, new maintainers, TWS still required.
- [Lumibot](https://stockmarketstack.com/tools/lumibot.md) — One strategy class for backtest and live, plus a built-in LLM agent runtime.
- [NautilusTrader](https://stockmarketstack.com/tools/nautilus-trader.md) — Rust core, Python API, one strategy that backtests and trades live unchanged.
- [QSTrader](https://stockmarketstack.com/tools/qstrader.md) — An institutional-shaped Python backtester whose last commit to master was June 2024.
- [QuantConnect](https://stockmarketstack.com/tools/quantconnect.md) — The open-source LEAN engine, plus a hosted cloud that runs it against real brokers.
- [QuantRocket](https://stockmarketstack.com/tools/quantrocket.md) — Zipline and Moonshot in Docker on your own hardware, wired to Interactive Brokers.
- [StockSharp](https://stockmarketstack.com/tools/stocksharp.md) — C#/.NET algo stack with 384 connectors; source is published but no longer open source.
- [StrategyQuant X](https://stockmarketstack.com/tools/strategyquant-x.md) — Machine-searches for trading strategies, then tries to break them with robustness tests.
- [VectorBT PRO](https://stockmarketstack.com/tools/vectorbt-pro.md) — Paid vectorbt — native Rust simulators, streaming indicators and a built-in MCP server.
- [VectorBT](https://stockmarketstack.com/tools/vectorbt.md) — Vectorised backtesting — thousands of parameter combinations in one NumPy pass.
- [WealthLab](https://stockmarketstack.com/tools/wealthlab.md) — Windows portfolio backtesting in C# or drag-and-drop blocks, with a built-in MCP service.
- [Zipline-reloaded](https://stockmarketstack.com/tools/zipline-reloaded.md) — The maintained fork of Quantopian's Zipline. Bring your own data — it ships almost none.

## 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, including the most-starred one in this listing, 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, Wealth-Lab 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.
