vectorbt
by Oleg Polakow · Library · also known as VectorBT, vectorbtpro
Python library for vectorized backtesting and portfolio analysis built on pandas, NumPy and Numba, with a commercial PRO edition
Overview
vectorbt is a Python library by Oleg Polakow for backtesting trading strategies as array operations rather than event loops. Signals, orders and portfolio values are represented as pandas and NumPy arrays and compiled with Numba, which makes it practical to test thousands of parameter combinations in one pass and to inspect results with interactive Plotly charts. It covers indicator construction, signal generation, portfolio simulation from signals or orders, and performance statistics such as drawdowns and trade records. The open-source edition is distributed under Apache-2.0 with a Commons Clause that forbids selling the software, and a separately licensed vectorbt PRO continues development with additional features. The vectorized model trades realism for speed: path-dependent logic and complex order handling are harder to express than in event-driven engines.
Capabilities
- Vectorized simulation of many parameter sets at once
- Portfolio construction from signals, orders or holdings
- Built-in indicators and an indicator factory
- Trade, drawdown and return statistics
- Interactive Plotly visualizations
- Numba-accelerated computation on pandas data
Typical workflows
- Sweep moving-average windows across a universe and compare equity curves
- Simulate a signal-based portfolio and export trade records to pandas
Strengths
- Fast parameter sweeps on a single machine
- Stays within the pandas and NumPy ecosystem
Limitations
- Vectorized model makes path-dependent strategies awkward
- Open-source license includes a Commons Clause restricting resale
- Newer features land in the paid PRO edition
Prerequisites
- Python with pandas, NumPy and Numba
- Price data from an external source
Who it is for
- Quantitative researchers
- Python-savvy retail traders
Alternatives & comparison
Zipline Reloaded and QuantConnect's LEAN are event-driven engines that step through time; vectorbt computes whole strategies as array operations, which is faster for sweeps but less faithful for order-level logic.
- pandas
The standard Python DataFrame library for labeled tabular data, time series and I/O to CSV, Excel, SQL, Parquet and more
Open sourceOpen source - QuantConnect
Algorithmic trading platform built on the open-source LEAN engine, with cloud backtesting, research notebooks and brokerage-connected live trading
MixedFreemium - Zipline Reloaded
Community-maintained fork of Quantopian's Zipline, an event-driven Python backtester with data bundles and the Pipeline API
Open sourceOpen source
Sources & verification
Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.
- LicenseLICENSE.md — Apache 2.0 with Commons Clausechecked Nov 1, 2026
https://github.com/polakowo/vectorbt/blob/master/LICENSE.md
Supports: license_spdx, source_model
- Official sitechecked Nov 1, 2026
- Official sitechecked Nov 1, 2026
- Repositorychecked Nov 1, 2026
- Confidence
- High
- Reviewed
- Nov 1, 2026
- Links
- Verified · Nov 2, 2026
Spotted an error?
More in Financial analysis & investing
Interactive Brokers API
Interactive Brokers LLC · Financial analysis & investing
Programmatic trading and market-data access to Interactive Brokers accounts through the TWS API, the REST-based Web API and FIX
QuantLib
QuantLib project (Luigi Ballabio and contributors) · Financial analysis & investing
Open-source C++ library for quantitative finance covering instruments, term structures, pricing engines and calendars, with Python and other bindings
Alpaca
Alpaca (AlpacaDB, Inc.) · Financial analysis & investing
API-first US brokerage offering a Trading API, Market Data API and Broker API for stocks, ETFs, options and crypto, with paper trading
Kraken API
Payward, Inc. (Kraken) · Financial analysis & investing
REST, WebSocket and FIX interfaces to the Kraken cryptocurrency exchange for market data, spot and derivatives trading and account management
PyPortfolioOpt
Robert Andrew Martin and contributors · Portfolio & wealth management
Python library for portfolio optimization: efficient frontier, Black-Litterman, hierarchical risk parity and discrete allocation
Riskfolio-Lib
Dany Cajas · Portfolio & wealth management
Python library for quantitative portfolio optimization with many risk measures, robust estimators and hierarchical clustering models