VectorBT is a vectorized trading strategy backtesting framework that simulates thousands of strategy configurations in a single pass over historical price data. It operates as a parameter optimization engine, a portfolio performance analyzer, a technical indicator calculator, and a financial data fetcher, all built around a DataFrame-centric data model that uses NumPy broadcasting for signal alignment and compiled code acceleration for performance.
The framework distinguishes itself through its ability to run large-scale parameter sweeps by constructing every combination of strategy parameters as a single array dimension, enabling one-pass evaluation of the full grid. It includes a walk-forward validation framework for testing strategy robustness across changing market conditions, and generates interactive visualizations using Plotly for exploring backtest results and indicators. The project also provides external data source abstraction for fetching market data from providers like Yahoo Finance.
Beyond its core backtesting and optimization capabilities, VectorBT supports computing custom technical indicators, generating crossover trading signals, and analyzing portfolio performance with trade-level metrics and drawdown statistics. It can schedule recurring analyses and send notifications through Telegram, and offers a one-line backtesting interface for quick strategy evaluation.