Home / Backtesting & trading frameworks

vectorbt

Backtesting & trading frameworks9,996 GitHub starsPython⏱ Last commit 3 days ago
Plain-language introduction · vectorbt

Compare backtest setups using Python.

vectorbt is a Python toolkit for quantitative research. It can combine historical prices and rules in code to compare backtest setups. You still need to write code and check the data; it is not an automatic profit button.

Good fit: people willing to learn Python, tabular data and backtesting to compare research setups. Not a fit: someone seeking one-click trading advice or unable to check data and risk.

Cost and license: the community edition is available at no charge under Apache 2.0 plus Commons Clause, which restricts selling products or services whose value derives substantially from the software. Read the original terms before commercial use. PRO is a separate paid product; data and computing can also cost money.

First step (about 3 minutes): read the official local-prices example below. Identify its six synthetic prices, starting cash and fee, then see how the output follows from those inputs. This reading step needs no installation, market-data download or trade. Running it requires setup; PyPI version 1.2.0 requires Python 3.11 through 3.14.

The example prices are invented, not market quotes; the sample return is not a prediction. Real backtests are affected by fees, slippage, data bias and overfitting. Sources checked 2026-11-05; we did not install or run this project.

Official local-prices example ↗ · Community license ↗ · Package requirements ↗

No project-authorized introductory video has been verified for embedding. Use the official text example above.

Vectorized Python backtesting and strategy research toolkit

What it is

A Python library for backtesting, algorithmic trading, and research that packs thousands of strategy configurations into NumPy arrays, accelerated with Numba and an optional Rust engine, so grid searches run all at once rather than bar by bar. It covers portfolio backtesting with trade and drawdown analytics, a rich indicator ecosystem, walk-forward optimization, and interactive Plotly visualization. The design suits human researchers working at scale as well as AI agents driving experimentation in code. Some advanced capabilities—parallelization, limit orders, leverage, and portfolio optimization—live in the separate paid VectorBT PRO edition rather than the community edition. The community license adds Commons Clause restrictions to Apache 2.0.

At a glance

RecommendedOur rating, based on popularity, maintenance and how ready it is for real use.

Best forProfessional quants
Used forBacktesting, Strategy research
MarketsMulti-market
StackPython
Learning curveSteep learning curve
Practical valueHigh practical value
CostFree edition with license restrictions
HardwareNo GPU needed
MaintenanceLast commit 3 days ago

Popularity snapshots

Daily snapshots of GitHub stars. Star changes are not a count of users or usage. Snapshots since 2026-11-02 (up to 30 days): first-to-last change +364 , latest 9,996. Gaps mean no snapshot was taken that day.

In the author's words

Find your trading edge, using a powerful toolkit for backtesting, algorithmic trading, and research.

Open on GitHub ↗This week's trending toolsChinese page

Similar tools