Repolode
polakowo

polakowo/vectorbt

Python toolkit for trading research that backtests thousands of strategy ideas across assets and timeframes using vectorized NumPy and pandas operations.

Open-source alternative to:TradingView

Stars
9,709
Forks
1,263
Open issues
135
Last commit
4 days ago

Repolode describes open-source projects and does not give investment advice. Trading and investing can lose money: assess the risk yourself and follow the laws where you live before using this project.

What is it?

VectorBT is a Python library for trading research. It covers the full path from exploring market data and building indicators and signals to simulating portfolios and reviewing trades, fees, drawdowns and performance statistics. Computation runs on NumPy arrays with Numba acceleration, and an optional Rust engine provides precompiled kernels for supported operations, so large parameter sweeps can be expressed in a few lines.

The API is built around pandas objects, with custom accessors and flexible broadcasting across multiple assets and parameter grids. Results can be explored with Plotly charts, Jupyter widgets and browser dashboards. Built-in helpers fetch market data, generate synthetic series, and support walk-forward optimization and label generation for machine learning workflows.

The project is the community edition of VectorBT PRO, which adds features such as parallelization, extra data integrations, limit orders and leverage.

Key features

  • 01Vectorized backtesting with pandas, NumPy and Numba
  • 02Optional precompiled Rust engine for supported operations
  • 03Portfolio analysis of trades, drawdowns and performance statistics
  • 04Flexible broadcasting to sweep large parameter grids
  • 05Interactive Plotly charts and Jupyter widgets

Use cases

  • Comparing thousands of moving-average or indicator parameter combinations on historical prices
  • Evaluating signal quality and trade expectancy across multiple assets
  • Running walk-forward optimization before deploying a strategy
  • Generating labels for machine learning models built on price data

Quick start

  1. 1

    Install vectorbt from PyPI

    pip install -U vectorbt
  2. 2

    Optionally install all integrations (TA-Lib, Pandas TA, etc.)

    pip install -U "vectorbt[full]"

Things to know

  • The license is Fair Code, not a standard OSI-approved open-source license, so check the LICENSE.md terms before commercial use.
  • The community edition lacks PRO features such as parallelization, limit orders, leverage, and portfolio optimization.

In collections

Topics

FAQ

What is vectorbt?
Python toolkit for trading research that backtests thousands of strategy ideas across assets and timeframes using vectorized NumPy and pandas operations. VectorBT is a Python library for trading research. It covers the full path from exploring market data and building indicators and signals to simulating portfolios and reviewing trades, fees, drawdowns and performance statistics. Computation runs on NumPy arrays with Numba acceleration, and an optional Rust engine provides precompiled kernels for supported operations, so large parameter sweeps can be expressed in a few lines.
Is vectorbt free to use? What license does it have?
vectorbt is open source under the Other license. Check the license terms before using it in commercial products.
Is vectorbt still maintained?
Actively maintained. The last commit to vectorbt was on Nov 3, 2026.
What can I use vectorbt for?
Comparing thousands of moving-average or indicator parameter combinations on historical prices Evaluating signal quality and trade expectancy across multiple assets Running walk-forward optimization before deploying a strategy Generating labels for machine learning models built on price data
How do I install vectorbt?
Install vectorbt from PyPI: pip install -U vectorbt Optionally install all integrations (TA-Lib, Pandas TA, etc.): pip install -U "vectorbt[full]"
Where can I get vectorbt?
The source code and installation instructions are on GitHub: https://github.com/polakowo/vectorbt

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects