Getting started
Migrating from vectorbt
See what PRO adds to open-source vectorbt, what changes, and how to migrate your code
If you know the open-source vectorbt, what does VectorBT PRO add, what changes, and how do you move your code? This page compares vectorbt vs VectorBT PRO and shows a migration that reproduces the same backtest in both.
Short answer
VectorBT PRO takes the array-based research approach of vectorbt further: automate out-of-sample validation, simulate more detailed orders, scale searches across cores and machines, optimize portfolios, and work with AI coding assistants. It is the successor developed by the same author, with a redesigned API and a much broader set of research tools. The migration example below shows how to bring an existing strategy into PRO.
What stays familiar
Both editions represent each strategy configuration as a column of an array and run many of them at once. Both build on pandas accessors, broadcast inputs across assets and parameters, use an indicator factory with TA-Lib and other integrations, simulate portfolios from signals or orders with optional Numba callbacks, and analyze trades, drawdowns, and returns with Plotly charts. Your experience with vectorbt carries over, so you can build on familiar research patterns while adopting PRO's tools.
Why upgrade to VectorBT PRO?
PRO gives you more control over the backtest and more ways to develop, validate, and scale your research. Build on your existing indicator sweeps and signal strategies with:
- Repeated research: run your own function over parameter combinations, divide the work into chunks, and resume completed tasks instead of starting a long search again.
- More detailed simulation: add limit orders, scale out through stop ladders, or continue the same portfolio as new bars arrive.
- Out-of-sample evaluation: select settings on training periods, test them on later periods, and compare results across splits and randomized baselines.
- Help developing the code: use current examples, member support, and tools that let your coding assistant inspect the installed API and run a backtest.
You can bring your own data, indicators, and trading rules. Python remains the main high-level interface, and using PRO does not require learning Rust. The linked feature pages below show what each addition looks like in code.
What PRO adds
Cross-validation beyond basic splits
The community edition's rolling and expanding splitters divide arrays into windows. PRO adds a full cross-validation workflow: define rolling, expanding, calendar-based, purged, or custom splits, run your research function on them, select parameters on each training set, and evaluate the selected parameters on its test set. You can inspect the splits, apply purging and embargoing, and compare the resulting out-of-sample performance.
This turns a repeated process of splitting data, running searches, selecting settings, and collecting test results into a reusable workflow. See Walk-forward and cross-validation for worked examples.
PRO also includes the full source code, private documentation, tutorials, and cookbook recipes, and a Discord community for support and feature requests. The features overview covers these additions with examples.
Performance
PRO gives you several ways to scale a research workload: parallel kernels in Numba and Rust, chunked execution across threads, processes, and Ray, and backend selection from measured timings. Both editions support Numba and Rust kernels from Python. PRO builds on compiled calculations with tools for distributing work, controlling memory use, and reusing completed results. Beyond a Rust backend, PRO ships an entire native Rust crate, with simulators, steppers, and strategy callbacks that run in Rust programs without Python. How much faster a workload runs depends on its size and shape. The Benchmarks page shows measured results with their hardware and library versions.
Migrating code
The same strategy, a crossover of two exponential moving averages with a 10% trailing stop, in both editions on the same daily Bitcoin OHLC bars, saved to a CSV file. Passing open, high, and low lets the stop trigger inside a bar instead of only at the close:
import pandas as pd
import vectorbt as vbt
ohlc = pd.read_csv("btc.csv", index_col=0, parse_dates=True)
fast = vbt.MA.run(ohlc["Close"], 10, ewm=True)
slow = vbt.MA.run(ohlc["Close"], 50, ewm=True)
entries = fast.ma_crossed_above(slow)
exits = fast.ma_crossed_below(slow)
pf = vbt.Portfolio.from_signals(
ohlc["Close"],
entries,
exits,
open=ohlc["Open"],
high=ohlc["High"],
low=ohlc["Low"],
sl_stop=0.1,
sl_trail=True,
fees=0.001,
freq="1D",
)
print(round(pf.total_return(), 4), round(pf.sharpe_ratio(), 4), pf.trades.count())The direct port changes only what PRO renamed:
import pandas as pd
import vectorbtpro as vbt
ohlc = pd.read_csv("btc.csv", index_col=0, parse_dates=True)
fast = vbt.MA.run(ohlc["Close"], 10, wtype="exp")
slow = vbt.MA.run(ohlc["Close"], 50, wtype="exp")
entries = fast.ma_crossed_above(slow)
exits = fast.ma_crossed_below(slow)
pf = vbt.PF.from_signals(
ohlc["Close"],
entries,
exits,
open=ohlc["Open"],
high=ohlc["High"],
low=ohlc["Low"],
tsl_stop=0.1,
fees=0.001,
freq="1D",
)
print(round(pf.total_return, 4), round(pf.sharpe_ratio, 4), pf.trades.count()) The upgrade path loads the file into a data object, which keeps the columns together and hands them to indicators and the portfolio by name:
import vectorbtpro as vbt
data = vbt.CSVData.pull("btc.csv")
fast = data.run(vbt.MA, 10, wtype="exp")
slow = data.run(vbt.MA, 50, wtype="exp")
entries = fast.ma_crossed_above(slow)
exits = fast.ma_crossed_below(slow)
pf = vbt.PF.from_signals(data, entries, exits, tsl_stop=0.1, fees=0.001)
print(round(pf.total_return, 4), round(pf.sharpe_ratio, 4), pf.trades.count())3.6274 1.3232 20All three versions returned 362.74% with a Sharpe ratio of 1.32 over 20 trades on daily Bitcoin bars from 2020 to 2024. Other common changes:
- Import
vectorbtproinstead ofvectorbt. Both use thevbtalias, so install PRO in its own environment. - Data classes load with
pull, as invbt.YFData.pull("BTC-USD").downloadstill works as an alias. - When a call fails,
vbt.phelpprints the current signature and documentation of any function.
Start by porting one small backtest on the same saved data, as above. Compare its signals, orders, and results before adding PRO features, since defaults and behavior can differ between the editions. The Developer tools page shows how to inspect signatures, source, and prepared inputs when adapting a more involved strategy.
Access
VectorBT PRO is distributed through a private GitHub repository to members, who also get the private documentation, tutorials, and Discord community. Monthly, 12-month, and lifetime plans are available with the same product and member benefits while active. A version you installed keeps working after your access ends. Access to the private repository, website, Discord, updates, and support ends with the paid term. The open-source vectorbt serves as the free trial. See Pricing and membership and the FAQ for details.
Related pages
- Getting startedLearn what VectorBT PRO is and how to get access
- FeaturesExplore backtesting, indicators, optimization, and analysis across instruments, parameters, and time
- Performance › BenchmarksCompare simulators on the same orders and measure each backend on your own machine
- Frequently asked questionsGet straight answers about VectorBT PRO, membership, access, setup, and usage
Copyright © 2021–2026 Oleg Polakow. All rights reserved.
Site content and documentation are provided for using and evaluating VectorBT PRO and for educational purposes. Any other use, including building or supporting competing products or services, requires prior written consent.