About this project
VectorBT is the open-source community edition of VectorBT PRO, a hybrid backtesting library for quantitative trading research. Its central idea is to avoid looping over bars one strategy at a time: configurations are packed into NumPy arrays, the hot path is accelerated with Numba and an optional precompiled Rust engine, and thousands of parameter combinations run at once.
Core capabilities described in the README:
- Fast, vectorized backtesting and strategy research built on pandas, NumPy and Numba.
- Optional Rust engine for precompiled speed without JIT overhead.
- Pandas-native API with custom accessors and high-performance operations.
- Flexible broadcasting for multi-asset analysis and large-scale parameter sweeps.
- Indicator ecosystem with custom indicators and integrations such as TA-Lib and Pandas TA.
- Portfolio backtesting with trade, drawdown and performance analytics, including QuantStats integration.
- Signal tooling for generation, ranking, mapping and distribution analysis.
- Built-in data access with preprocessing and synthetic data generation.
- Robustness testing with walk-forward optimization and label generation for ML workflows.
- Interactive visualization with Plotly, Jupyter widgets and browser-friendly dashboards.
- Automation tools for scheduled updates and Telegram notifications.
- A composable Python API intended for rapid experimentation and AI agent-driven workflows.
Installation is via pip (`pip install -U vectorbt`), with extras for the Rust engine (`vectorbt[rust]`), all optional integrations (`vectorbt[full]`), or both (`vectorbt[full,rust]`). Docker images are also published.
The README demonstrates usage through short examples: buying and holding Bitcoin since 2014, a dual-SMA crossover strategy, generating 1,000 random strategies across two symbols, testing 10,000 dual-SMA window combinations across three symbols with a heatmap of total returns, inspecting a single configuration's statistics (returns, drawdown, win rate, Sharpe, Sortino, Calmar, Omega, expectancy and more), plotting a portfolio, and animating Bollinger Bands across multiple symbols. An example app for exploring candlestick patterns interactively is included in the repository.
Licensing: fair-code under Apache 2.0 with Commons Clause. Source is public and free to use by individuals and organizations, but products or services that are primarily this software may not be sold; optional dependencies may carry more restrictive licenses. The README also carries a disclaimer that the software is for educational purposes only.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.