// the find
polakowo/vectorbt
The backtesting engine that gives you an unfair advantage. Run thousands of trading ideas before others finish one.
vectorbt is a vectorized backtesting library that runs thousands of strategy parameter combinations simultaneously by representing them as NumPy arrays and accelerating the hot path with Numba (JIT) and an optional Rust engine. It's aimed at quant researchers who want to sweep large parameter spaces in seconds rather than waiting hours on loop-based engines like backtrader. The open-source edition is the free tier of a commercial product, VectorBT PRO.
The core idea is genuinely fast: packing 10,000 SMA combinations into a single vectorized pass with Numba is orders of magnitude quicker than running them sequentially, and the benchmarks back this up. The optional Rust engine adds precompiled speed for anyone who doesn't want Numba's JIT warm-up overhead. The analytics layer is thorough — Sharpe, Calmar, Omega, Sortino, drawdown duration, expectancy — all grouped by parameter combination without extra code. Broadcasting across assets and parameter dimensions is handled automatically, so multi-asset sweeps don't require manual reshaping.
The license is Apache 2.0 with Commons Clause, which means you can't build a product on top of it without a commercial agreement — fine for personal research, a legal problem if you're shipping a service. The open-source edition is visibly the stripped-down version of PRO; important features (live trading, advanced order types, event-driven simulation) are either absent or limited, and the README leans into upselling. Numba's JIT compilation means the first run of any new function has significant cold-start latency — painful in notebooks where you restart the kernel often. The API surface is large and the custom accessor pattern (`df.vbt.something`) adds a layer of indirection that makes stack traces and debugging harder than working with plain pandas.