polakowo /vectorbt
The research engine that gives you an unfair advantage. Run thousands of trading ideas before others finish one.
★ 9,858⑂ 1,310👁 136⑃ 130● 498▤ 8
+13
Daily
9,858
stars
1,310
forks
136
watchers
130
prs
498
issues
8
releases
README
简体中文 / English |
Features ·
Installation ·
Examples ·
Links
Trading research at scale.
VectorBT is a Python toolkit for trading research. Explore market data, build indicators and signals, and compare thousands of ideas across assets and timeframes. NumPy arrays, Numba acceleration, and an optional Rust engine let you run large experiments in a few lines of Python.
---
Move from exploring price patterns to evaluating strategies in one workflow. Inspect trades, fees, drawdowns, and portfolio performance, then explore the results with interactive charts. Built for traders, researchers, and AI agents, VectorBT brings data analysis, strategy simulation, and visualization together in a composable Python API.
VectorBT is the open-source community edition of VectorBT PRO.
PRO extends the library with parallelization, additional data integrations, portfolio optimization,
pattern recognition, event projections, limit orders, leverage, and over 100 other features,
with new features added weekly.
See VectorBT vs PRO or browse
PRO feature examples.
Features
Fast, vectorized backtesting
Research strategies at scale with pandas, NumPy, and Numba.
Backtesting examples →
Optional Rust engine
Use precompiled kernels for supported operations without JIT compilation.
Rust engine →
Pandas-native API
Work with custom accessors and high-performance operations directly on pandas objects.
Pandas integration →
Flexible broadcasting
Analyze multiple assets and sweep large parameter grids with flexible array broadcasting.
Broadcasting API →
Rich indicator ecosystem
Build custom indicators and use integrations for TA-Lib, Pandas TA, and more.
Indicator features →
Portfolio backtesting
Analyze trades, drawdowns, and performance, with QuantStats integration.
Portfolio analysis →
Signal tooling
Generate, rank, map, and analyze the distribution of trading signals.
Signal features →
Built-in data access
Fetch market data, preprocess it, and generate synthetic time series.
Data features →
Robustness testing
Run walk-forward optimization and generate labels for machine learning workflows.
Robustness testing →
Interactive visualization
Explore results with Plotly charts, Jupyter widgets, and browser dashboards.
Plotting features →
Automation tools
Schedule data updates and send Telegram notifications.
Scheduling and notifications →
Composable Python API
Combine building blocks for rapid experimentation and AI agent-driven workflows.
Python workflows →
Installation
sh
pip install -U vectorbt
To install the optional Rust engine:
sh
pip install -U "vectorbt[rust]"
To install all optioTop issues
#156How to access algorithm time for intraday strategies?15 comments · 2021-05-30#243please clarify dividends, reinvestment, recurring investment12 comments · 2021-09-22#748VectorBT - Telegram - Issue: ImportError: cannot import Unauthorized, ChatMigrated10 comments · 2024-09-19#788Download Data Has Problem9 comments · 2025-04-30#398vbt.BinanceData.download do not accept klines_type parameter8 comments · 2022-03-01#802Calculation of profit factor6 comments · 2025-08-03#426multiple entry signals6 comments · 2022-03-29#539Calculation of Stop price5 comments · 2022-12-09
Discussions
#867We built 19 Borsa Istanbul research systems but still cannot prove a real trading edge — what are we missing?1 comments · 2026-07-29#866Deflating the Sharpe after a grid search (the winner is a max over N)1 comments · 2026-07-25#863📈 BDE Score — 开源多因子 API,跨市场评分 + GitHub Action badge0 comments · 2026-07-10#851AI options flow signals as vectorbt features — open source Claude Code investment skills0 comments · 2026-05-13#848Long/Short signals fire independent of shortonly direction?1 comments · 2026-05-01#842FinancialData.Net adapter for vectorbt (daily and intraday data)0 comments · 2026-04-10#830Only profitable exits ?1 comments · 2026-03-05#823Backtesting Is Easy. Execution Is the Hard Part.0 comments · 2026-01-05
Latest release
v1.2.1 v1.2.1 2026-11-11What's Changed test(generic): support pandas 3.1 timedelta expectations by @JohnDReynolds in https://github.com/polakowo/vectorbt/pull/895 fix(indicators): select unmapped input columns by @JohnDReynolds in https://github.com/polakowo/vectorbt/pull/889 fix(data): initialize download kwargs in from_data by @JohnDReynolds in https://github.com/polakowo/vectorbt/pull/890 fix(utils): preserve dictionary state on rejected loads by @JohnDReynolds in https://github.com/polakowo/vectorbt/pull/891 fix(records): pass group_by to top_n and bottom_n masks by @wavebyrd in https://github.com/polak