vectorbt
Python library for backtesting and analyzing trading strategies at scale
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you need fast, large-scale strategy backtesting and can work with Python 3.11+. The low install friction, active maintenance, and strong community adoption make it reliable. However, verify the fair-code Apache 2.0 + Commons Clause license terms before using in commercial or proprietary products—the license treatment is flagged as unclear in the metadata.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later.
- Optional Rust engine available via pip install vectorbt[rust] for precompiled speed.
- Low friction: pure Python wheel with no compiled dependencies required for the base install.
License · maintenance · safety
(unclear) — License treatment is unclear in the metadata. The description mentions Apache 2.0 with Commons Clause (fair-code), which permits free use but restricts commercial redistribution—verify the actual license terms before use in proprietary or commercial contexts.
last release 2026-07-05 (40 days) · last repo commit 2026-08-02 · 8,675 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 554,274 downloads/mo, #6,036 on PyPI
Alternatives
Verify before relying
import vectorbt as vbt
data = vbt.YFData.download("BTC-USD")
price = data.get("Close")
pf = vbt.Portfolio.from_holding(price, init_cash=100)
print(pf.total_profit())- Actual license terms and commercial use restrictions under the fair-code Apache 2.0 + Commons Clause model
- Performance characteristics and memory footprint when testing thousands of strategy configurations
- Compatibility and integration depth with TA-Lib and Pandas TA mentioned in the description
What it is and what it does
VectorBT is a backtesting library that replaces traditional loop-based simulation with matrix operations: instead of running one strategy at a time through historical bars, it packs thousands of configurations into NumPy arrays and accelerates them with Numba (and optionally Rust), executing all variants in parallel. This approach trades sequential clarity for speed, turning parameter sweeps that would take hours into seconds.
The library is built on pandas, NumPy, and Numba, with 17 runtime dependencies including scipy, matplotlib, plotly, and scikit-learn. It provides portfolio analytics (trades, drawdowns, Sharpe ratio, Calmar ratio), signal generation and ranking, indicator ecosystems, walk-forward optimization, and interactive Plotly-based visualization. It's designed for both human researchers exploring trading ideas and AI agents automating strategy discovery.
Use it for
- Test thousands of moving-average crossover parameter combinations across multiple assets and timeframes in minutes.
- Analyze portfolio performance metrics (win rate, profit factor, expectancy, Sharpe ratio) for individual strategy configurations.
- Generate and backtest random or synthetic trading signals to estimate strategy robustness and edge.
- Build walk-forward optimization pipelines for label generation and machine-learning-based strategy development.
- Visualize strategy results interactively with Plotly heatmaps, scatter plots, and animated indicator overlays.
- Download and preprocess market data from Yahoo Finance, then run portfolio simulations with fees and position sizing.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you need fast, large-scale strategy backtesting and can work with Python 3.11+. The low install friction, active maintenance, and strong community adoption make it reliable. However, verify the fair-code Apache 2.0 + Commons Clause license terms before using in commercial or proprietary products—the license treatment is flagged as unclear in the metadata.
Install
vectorbt on PyPI
Before you install
Low friction: pure Python wheel with no compiled dependencies required for the base install. Active maintenance with a recent release (40 days old) and strong community signal (8675 stars). Requires Python 3.11–3.14.
Requires Python 3.11 or later. Optional Rust engine available via pip install vectorbt[rust] for precompiled speed.
License in practice
License treatment is unclear in the metadata. The description mentions Apache 2.0 with Commons Clause (fair-code), which permits free use but restricts commercial redistribution—verify the actual license terms before use in proprietary or commercial contexts.
Quickstart
import vectorbt as vbt
data = vbt.YFData.download("BTC-USD")
price = data.get("Close")
pf = vbt.Portfolio.from_holding(price, init_cash=100)
print(pf.total_profit())
Verify before relying
- Actual license terms and commercial use restrictions under the fair-code Apache 2.0 + Commons Clause model
- Performance characteristics and memory footprint when testing thousands of strategy configurations
- Compatibility and integration depth with TA-Lib and Pandas TA mentioned in the description
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release <3.15,>=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 17 packagesnumpypandasscipymatplotlibplotlyipywidgetsanywidgetnumbadilltqdmdateparserimageioscikit-learnschedulerequestspytzmypy_extensions |
| Maintenance | Actively maintained 40 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 554,274 / month, #6,036 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Financial and Insurance IndustryIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Office/Business :: FinancialTopic :: Scientific/Engineering :: Information AnalysisTopic :: Software Development |
Evidence: vectorbt-1.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “vectorized backtesting”
- vectorbtVectorized backtesting engine that packs thousands of trading…
- pyxirrPyXIRR is a Rust-backed library that computes financial functions…
- fastjetFastJet provides Python bindings to the FastJet C++ library for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also backtesting · finlab · backtrader · nautilus_trader · pandas-ta · riskfolio-lib · lumibot · freqtrade · ft-pandas-ta · pandas-ta-classic