VectorBT
Vectorised backtesting — thousands of parameter combinations in one NumPy pass.
by Oleg Polakow
Last updated
What it is
vectorbt backtests by broadcasting rather than by looping. A strategy is a pair of boolean signal
arrays; a thousand parameter combinations are a thousand columns of the same array, and one
Portfolio.from_signals call simulates them together through compiled kernels. Grid searches that
take an event-driven backtester hours finish in seconds. The price is a mental model most people
find alien: you stop thinking in bars and start thinking in matrices, and a strategy with genuine
path dependence is awkward to express.
Liveness, in numbers: the repository is not archived, v1.0.0 landed on 22 April 2026 and added an optional Rust backend alongside Numba, v1.1.0 followed on 5 July 2026 with Python 3.14, pandas 3 and NumPy 2.4 support, and the last commit to master was 2 August 2026. 121 issues are open, excluding pull requests.
Pricing
Nothing here is for sale — pip install vectorbt, no account and no key. The licence is what to
read instead of a price list. It is Apache 2.0 with the Commons Clause v1.0, which withholds only
the right to Sell: to provide third parties, for a fee, a product or service whose value derives
substantially from the software. Trading a firm's own capital on it is not selling it. Charging
clients for a service built on it is, and needs a written agreement with the author.
Data & coverage
vectorbt ships no market data and no feed of its own. The optional [full] extra installs
yfinance, python-binance, ccxt and alpaca-py for the built-in connectors; anything else arrives as
a pandas DataFrame with a datetime index, which is all the library requires. Asset classes,
markets and latency are properties of your feed, not of this tool.
Integrations
TA-Lib, ta and pandas-ta-classic for indicators, QuantStats for tearsheets, Plotly and
ipywidgets for heatmaps, Ray for distributed sweeps, and schedule plus python-telegram-bot for
unattended updates and notifications. The [rust] extra installs the vectorbt-rust engine,
which dispatches per call and falls back to Numba where Rust has no kernel.
Limitations
- No live trading. No broker connection, no order routing, no paper account — execution is somebody else's problem.
- A vectorised simulator fills at bar prices. Intrabar sequencing, queue position and partial fills are approximations, and stops are checked against OHLC rather than against the tape.
- Not OSI open source, which matters wherever a policy says open source and means it.
- Python 3.11 to 3.14 only, and v1.1.0 expects pandas 3 and NumPy 2.4 or newer. An older stack stays on the 0.28 line.
Alternatives
Backtesting.py is far smaller and event-driven, Backtrader is the classic looping engine, and NautilusTrader is the one to reach for when the same code has to place real orders. VectorBT PRO is the author's paid product — a private repository from $25 a month, and a much narrower licence: it grants Private Use only, defined as use from which no "monetary compensation, commercial advantage, or for-profit purpose" is obtained, and limits an organisation to internal evaluation, prototyping and R&D "provided it does not result in a commercial product, service, or outcome". The Commons Clause here stops at forbidding sale to third parties, so for a firm trading its own capital the free package is the more permissive of the two.
Compare it against the rest of the backtesting frameworks.
Specs
- Interfaces
- Python, Python
- Export
- None
- Asset classes
- Stocks, ETF, Forex, Crypto, Indices
- Markets
- Global
- Platforms
- Library
- AI features
- None
- Capabilities
- Backtesting, Automation, Alerts
- Pricing verified
- Capabilities verified
- Coverage verified
Also from Oleg Polakow
Also worth comparing
- Blueshift — Free hosted Python backtesting with bundled minute data and broker execution.
- AmiBroker — Windows portfolio backtester scripted in AFL, sold as a perpetual licence.
- Backtesting.py — A single-instrument Python backtester — one OHLC series, one strategy, no live trading.
- Backtrader — An event-driven Python backtester with 122 indicators, frozen since April 2023.
- bt — Python backtesting for allocation and rebalancing rules, not entries and exits.
- fastquant — A one-call wrapper over Backtrader, dormant since 2023 and broken on PyPI.
Named as a replacement for
FAQ
Is vectorbt still maintained?
Yes. The repository is not archived, v1.0.0 shipped on 22 April 2026 with an optional Rust backend and v1.1.0 on 5 July 2026 added Python 3.14, pandas 3 and NumPy 2.4 support. The last commit to master was 2 August 2026 and 121 issues are open, excluding pull requests.
Can a for-profit firm use vectorbt?
Yes, to trade its own capital. The Commons Clause withholds only the right to Sell — to provide third parties, for a fee, a product or service whose value derives substantially from the software. Running it in-house is not selling it; charging clients for a service built on it is, and that needs a separate agreement with the author.
Is vectorbt open source?
Source-available, not open source. The licence is Apache 2.0 with the Commons Clause v1.0 bolted on, and the Commons Clause is not an OSI-approved licence. If a procurement policy says open source and means it, this fails that test.
Can vectorbt place live trades?
No. There is no broker connection and no order routing. The Portfolio object is a simulator, and you need a separate execution layer to trade anything it suggests.