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
PythonNOASSERTIONCreated 2017-11-14vectorbt.dev
Download: v1.2.1v1.2.1 ↓1.2.12026-11-11
+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 optio

Top issues

Discussions

Latest release

v1.2.1 v1.2.1 2026-11-11
What'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

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON