VectorBT PRO keeps parameter testing, validation, portfolio rules, and analysis in one workflow, so a focused study can grow without changing its basic research structure. Backtesting.py offers a smaller API for a readable OHLC strategy on one instrument, with common order rules, statistics, optimization, and an interactive chart.
Backtesting.py's narrow design is useful when you want to test one sequential strategy and one cash account. VBT PRO becomes more useful as you add assets, parameters, or validation periods and want portfolio state, saved progress, and analysis to remain connected.
This page reflects VBT PRO 2026.9.5 and Backtesting.py 0.6.6, reviewed on September 19, 2026. VBT PRO is proprietary and distributed under individual or organization terms. Backtesting.py is open source under AGPL-3.0.
VectorBT PRO vs Backtesting.py at a glance
| Criterion | VectorBT PRO | Backtesting.py | Decision impact |
|---|---|---|---|
| Primary abstraction | Labeled arrays, parameters, records, and stateful portfolio simulators | One Strategy class, one OHLC table, and one sequential broker simulation |
Backtesting.py minimizes concepts. VBT PRO keeps multidimensional research structure explicit |
| Strategy interfaces | Signals, explicit orders, Numba callbacks, flexible order callbacks, allocation methods, and native Rust strategy traits | Vectorized indicators in init() and bar-by-bar decisions in next(), plus signal helpers |
VBT PRO offers more levels of control. Backtesting.py offers one compact mental model |
| Assets and capital | Many assets, groups, shared or separate cash, allocation, rebalancing, and cross-column controls | One instrument and cash account per Backtest. MultiBacktest runs independent datasets |
Independent symbol runs cannot answer shared-capital or cross-asset allocation questions |
| Parameter research | Labeled broadcasting, conditional parameters, random subsets, parameterized functions, chunking, and execution engines | Exhaustive or randomized grid search and SAMBO model-based optimization | Both can optimize. VBT PRO is designed to preserve and analyze much larger parameter surfaces |
| Validation | Rolling, expanding, anchored, grouped, purged, embargoed, combinatorial, and pipeline-level split application | No comparable split or cross-validation framework built into the engine | Backtesting.py can use external split code. VBT PRO keeps split labels and outputs in its object model |
| Simulation detail | Limits, stops, stop ladders, time stops, time in force, leverage, cash flows, contract multipliers, callbacks, and custom state | Market, limit, stop, stop-loss, take-profit, hedging, margin ratio, spread, and commission on bars | Neither recreates missing intrabar order or market impact. VBT PRO exposes a much larger simulation surface |
| Incremental computation | Batch and streaming indicators, portfolio continuation, native steppers, and disk-backed intermediate results | Historical batch run over a supplied table | VBT PRO can carry indicator and portfolio state forward without rerunning the full history |
| Compute paths | NumPy, Numba, optional Rust extension, native Rust crate, serial, threaded, process, and distributed engines | Python, pandas, and NumPy with multiprocessing for some optimization and multi-dataset work | Benchmark the exact workload. Architecture creates options, not an automatic speed ratio |
| Analysis | Labeled orders, trades, positions, drawdowns, MAE/MFE, projections, expanding metrics, dashboards, and a large plotting surface | A focused statistics Series, trades, equity, heatmaps, and interactive Bokeh report | Backtesting.py covers the common inspection loop. VBT PRO supports deeper cross-sectional and path analysis |
| Data and integrations | More than 20 data adapters plus files, SQL, Arrow, Parquet, DuckDB, caching, transforms, and resampling | User-supplied OHLC or OHLCV DataFrame | VBT PRO includes a data layer. Neither data access nor engine choice guarantees point-in-time correctness |
| Documentation | SearchVBT, ChatVBT, QuickSearch, direct documentation tools, and versioned Python and Rust references | Conventional documentation, examples, notebooks, and community support | VBT PRO provides more ways to search its much larger API |
| License and access | Proprietary membership with separate individual and organization terms | AGPL-3.0 | Compare source, redistribution, network-use, team-access, update, and support terms, not only purchase price |
| Live scope | Streaming research and continuation, but not a bundled broker execution service | No bundled live broker service | Both need a separate order-routing, reconciliation, monitoring, and recovery layer |
Two different ways to express a strategy
Backtesting.py deliberately centers one pattern. Strategy.init() precomputes indicators from the full input, and Strategy.next() receives progressively revealed bars for decisions. Orders normally fill at the following bar's open, or at the current close with trade_on_close=True. The strategy can inspect account equity, orders, trades, and position state. This is concise, readable, and easy to debug with ordinary Python.
VBT PRO begins at a higher-dimensional level. Arrays can represent time, assets, parameter combinations, scenarios, and groups. PF.from_signals() maps entries, exits, directions, limits, and stops into portfolio records. PF.from_orders() accepts explicit order arrays. Order-function and flexible-order-function simulators call compiled code against evolving cash, positions, valuations, records, and user state. Allocation interfaces cover target weights and rebalancing. Native Rust simulators expose typed strategy traits and steppers.
The important distinction is not vectorized versus event-driven. VBT PRO uses array broadcasting for structure and compiled sequential loops when path dependence requires them. Backtesting.py precomputes indicators vectorially and executes strategy decisions sequentially. Both are hybrids, but VBT PRO lets the same labeled parameter space flow through static arrays, stateful callbacks, and portfolio analysis.
For one strategy with several conditions, Backtesting.py's class can be the clearer representation. For hundreds of assets, thousands of variants, or custom portfolio-wide state, the class-per-run model becomes orchestration that VBT PRO already represents natively.
VBT PRO keeps parameter searches labeled
Backtesting.py has useful optimization. Backtest.optimize() can exhaust or sample a constrained Cartesian grid, or use SAMBO model-based optimization. It can return the tried combinations as a MultiIndex Series for heatmaps instead of exposing only the selected run. MultiBacktest repeats the strategy independently across datasets.
VBT PRO generalizes the parameter concept beyond an optimizer method. vbt.Param, combine_params, parameterized decorators, broadcasting rules, conditional spaces, random subsets, and labeled indexes can attach parameter coordinates to indicators, signals, portfolios, split results, metrics, and plots. A parameter is not merely an argument passed to repeated black-box runs. It becomes an inspectable dimension of the result.
This matters for parameter robustness. The useful output is rarely the single maximum. It is the surface around it, its behavior across assets and time splits, the fraction of configurations that survive costs, and the sensitivity to small changes. VBT PRO can slice, group, reduce, and visualize those dimensions using the same indexing conventions used to create them.
Scale still has limits. Broadcasting can allocate large intermediate arrays, and a shared-cash portfolio can prevent naive column chunking because columns interact. VBT PRO provides chunk registries, dependency-aware merge functions, automatic chunk sizing, lazy or sampled grids, and several execution engines, but the researcher must understand which dimensions are independent. Backtesting.py's repeated-run model can use more time but has simpler memory behavior for small jobs.
Multi-asset portfolios and shared state
A Backtesting.py Backtest models one tradeable instrument and one account. MultiBacktest runs the same strategy across several datasets and returns per-instrument statistics or heatmaps. That is useful for checking whether a rule travels across markets. It is not a portfolio in which orders compete for the same cash, margin, leverage, or exposure budget.
VBT PRO columns can represent assets, strategies, parameters, or any combination. Grouping controls whether columns share cash. Call sequence, valuation, sizing, and callbacks can respond to group state. The portfolio layer supports target amounts, values, percentages, leverage modes, contract multipliers, cash deposits and earnings, long and short positions, and allocation workflows.
This difference matters for rotation, portfolio optimization, pair or basket logic, cross-sectional ranking, and shared risk limits. Running each asset independently and adding curves later cannot reproduce rejected orders, cash competition, or a portfolio-level drawdown stop.
More portfolio controls also mean more ways to make a wrong model. Declare call order, rebalancing time, valuation price, cash-sharing groups, leverage, fees, and missing-data policy. Inspect the order records, not only the final return.
Detailed simulations across large searches
VBT PRO allows broad parameter exploration and path-dependent simulation in the same run. A Numba callback can read portfolio state, update user memory, decide an order, and inspect the execution result inside a parameterized run. Post-order callbacks can react only after a fill actually changes a position. Flexible order functions can emit several orders per element.
The native Rust side follows the same idea with typed strategy traits. A Rust strategy owns its state and receives structured contexts during the simulation. This supports rules that cannot be prepared as full arrays, such as a cooldown that begins only after a stop fill, portfolio-level trading halts, or adaptive sizing based on earlier executions.
Backtesting.py's next() is naturally stateful and often simpler for one instrument. Python objects can hold custom state without a compilation boundary. The limitation is scale and scope rather than expressiveness for a single bar strategy. Many independent Python callbacks and backtest objects add overhead when multiplied across large grids and universes.
Testing strategies across time
Backtesting.py does not include a cross-validation system comparable with VBT PRO's. Users can slice DataFrames, run rolling loops, or combine the engine with external splitters. That can be perfectly valid, but split labels, purge logic, preprocessing, model fitting, and result aggregation become application code.
VBT PRO's Splitter and cross-validation factories support rolling, expanding, anchored, grouped, range-based, purged, embargoed, and combinatorial schemes. Split-aware application can send arrays, data objects, indicators, and complete parameterized pipelines through a declared set of ranges and merge outputs with split labels intact. Overlap analysis helps reveal whether supposedly distinct test ranges reuse observations.
These tools express the validation designs directly, but they do not decide which design is correct. A purge must reflect the label horizon, preprocessing must fit inside training data, overlapping tests are dependent, and a test set stops being untouched once its result drives a redesign. VBT PRO's ability to run a much larger search makes complete experiment accounting and multiple-testing controls more important, not less.
For one small rule chosen in advance, manually splitting time around Backtesting.py may be enough. For repeated walk-forward fitting, purged labels, several test paths, or parameter checks across splits, VBT PRO provides the tools directly.
Orders, stops, and execution assumptions
Backtesting.py supports market, limit, stop, stop-loss, and take-profit orders, partial position closing, hedging, exclusive-order mode, a single margin ratio, constant spread, and fixed, relative, or callable commission. Decisions occur at complete bars. It does not expose a general immediate-or-cancel, fill-or-kill, day-expiry, queue, latency, or market-impact model.
VBT PRO supports more order and stop rules: market and limit logic, price deltas, time in force, expiry, rejection probabilities and rules, leverage, size constraints, stop ladders, trailing stops, time stops, signal conflict policies, contract multipliers, cash flows, and callbacks before and after execution. Explicit orders and external fill reconstruction allow analysis of records generated elsewhere.
Neither engine can recover information absent from the data. An OHLC bar does not reveal whether its high occurred before its low. A limit price touched inside the candle does not prove queue priority or a live fill. Percentage slippage does not model endogenous market impact. VBT PRO can express more assumptions, but a more detailed configuration is only more credible when it is calibrated and supported by adequate data.
Use a deterministic fixture with conflicting intrabar levels, gaps, insufficient cash, partial sizing, final open positions, and costs. Reconcile every order and cash movement before trusting a large sweep.
Analysis, visualization, and result inspection
Backtesting.py returns a focused pandas Series with return, drawdown, trade, exposure, and risk statistics. Trade and equity tables are attached to the result. Backtest.plot() creates an interactive Bokeh report with price, indicators, trades, equity, profit and loss, and optional drawdown. Optimization can return and plot parameter heatmaps. The compact loop from code to chart is useful for focused tests.
VBT PRO keeps labels attached to orders, logs, trades, positions, drawdowns, returns, ranges, and mapped arrays, which can be regrouped after simulation. Analysis includes MAE and MFE, edge ratio, projections, expanding and rolling metrics, benchmark comparisons, allocations, risk and performance measures, and Plotly charts. External fill-like records can enter the same analysis process.
The difference matters when asking questions across dimensions: Which assets create the drawdown? Which parameter region survives each split? Did stop exits improve edge ratio? How does a metric evolve rather than only end? Backtesting.py answers a focused per-run inspection question. VBT PRO is designed to compare and decompose entire research populations.
Data, indicators, and portfolio construction
Backtesting.py intentionally starts from a pandas DataFrame. Any technical-analysis library can prepare arrays, custom columns can carry features, and pandas can resample multiple time frames. This keeps the package small and lets users choose the accompanying tools.
VBT PRO includes a broader data layer with exchange and market-data adapters, local files, SQL, Arrow, Parquet, DuckDB, caching, updating, merging, resampling, and transformations. IndicatorFactory turns array functions into objects that understand parameters, broadcasting, caching, selection, statistics, and plots. The catalog combines built-in, TA-Lib, pandas-ta, technical, and custom indicators.
Portfolio construction is also integrated. Allocation, range, and optimizer factories work with Riskfolio-Lib, PyPortfolioOpt, Universal Portfolios, and custom numerical methods. This connects signal research, target weights, rebalancing, simulation, and analysis within one index-aware workflow.
Integration does not absolve data governance. Both libraries need point-in-time inputs, stable identifiers, corporate-action policy, realistic calendars, and licensed data. VBT PRO reduces glue code, while Backtesting.py makes the boundary explicit by accepting a prepared table.
Streaming and portfolio continuation
Backtesting.py runs over a historical table. Repeating the run with appended rows starts another historical simulation unless the user builds a separate stateful service.
VBT PRO 2026.9.5 can preserve computational and portfolio state. Streaming accumulators update indicators one value at a time. Portfolio.update() continues major portfolio simulations across new chunks while preserving global row coordinates, cumulative record identifiers, cash, positions, pending stops, and other continuation state. Native Rust steppers retain their own indicator and simulation state.
This is more than appending equity curves. A trailing stop established in one chunk can fire in a later chunk, and the continued result can be checked against a one-shot simulation. The continuation example on the VBT PRO page demonstrates exactly that behavior.
Continuation is not a broker runtime. It does not submit orders, receive exchange acknowledgements, reconcile external positions, store credentials, supervise risk, or recover network sessions. It supports incremental research and can be one component of live trading, but it is not the complete application.
The native Rust crate can work without Python
VBT PRO is not limited to calling a few unrelated Rust functions from Python. Its vectorbtpro-rust crate mirrors the supported Numba compute surface across base operations, data generation, generic reductions, indicators, labels, OHLCV operations, portfolio simulation, records, returns, signals, and utilities. Public builders follow the Numba argument order, defaults, validation, enums, and record contracts, with parity tests across the supported surface.
There are three useful modes:
- Python can use normal VBT objects and dispatch compatible work to the optional Rust extension.
- Lower-level Python code can call Rust-backed kernels through PyO3.
- A native Rust program can depend on the crate directly and run without Python, NumPy, pandas, the GIL, or a Python interpreter.
The third mode is unusually valuable. A strategy can begin as concise high-level Python, move dynamic rules into Numba callbacks, be ported to typed Rust traits, and be compared order for order. Native steppers can then process new rows and restore state after a restart. The public From Python to Rust tutorial documents this full path.
For Rust users, this avoids maintaining separate research and live engines with unrelated behavior. Typed builders, enums, traits, compiler errors, parity tests, and version-matched Rust references also make a port easier to inspect than loosely connected Python code. It still needs tests and review, but the crate makes Python optional.
Backtesting.py has no corresponding native crate or Python-free execution path. That is not a problem for a research notebook whose deployment will be rewritten independently. It is a major difference when research-to-native continuity is a requirement.
Speed, memory, and large jobs
VBT PRO combines broadcasting, Numba kernels, Rust kernels, chunking, and serial, threaded, process, or distributed execution engines. Independent calls can spill intermediate results to disk and resume. This flexibility supports parameter spaces far beyond a typical single Backtesting.py run.
Backtesting.py is fast enough for many single-instrument jobs and can parallelize optimization or MultiBacktest work. SAMBO can reduce the number of expensive evaluations compared with a full grid. Its smaller result surface and one-run model can be easier to profile.
No universal speed ratio is defensible. Results depend on data shape, parameter count, compilation state, callback design, record retention, cash sharing, chunk size, process startup, hardware, and whether data loading is included. VBT PRO's advantage is architectural headroom and control over execution, not a promise that every tiny run completes sooner.
Benchmark the end-to-end research question. Include data preparation, first-call compilation, warm runs, peak memory, simulation, metric extraction, serialization, and plotting. Compare equal outputs and equal assumptions.
Documentation and code assistance
VBT PRO's documentation tools are useful because the library is large. SearchVBT, ChatVBT, QuickSearch, direct query tools, CLI commands, and versioned Python and Rust references help developers find the right name, inspect arguments, and retrieve examples.
These tools do not make research code valid. Code can still introduce look-ahead bias, misuse a broadcast axis, optimize on test data, or configure optimistic fills. Version-specific documentation, typed Rust contracts, labeled outputs, and executable parity tests make those mistakes easier to find.
Backtesting.py's small API has a different advantage. There is less to search, and the init() plus next() structure is easy to read. For a narrow strategy, simplicity may matter more than richer documentation tools.
License, access, and total cost
VBT PRO is proprietary. Access, source use, updates, team rights, and redistribution follow the applicable individual or organization agreement. It includes the private repositories, documentation, tutorials, community, and support path. Verify current terms directly before using it inside a company or distributed product.
Backtesting.py has no purchase price and uses AGPL-3.0. AGPL is not equivalent to a permissive license. Modified covered software offered to users over a network can trigger corresponding-source obligations under section 13. Review the actual architecture and distribution model with appropriate counsel.
Total cost includes more than the license. Count learning, data work, separate testing tools, hosting, development time, and features you must maintain yourself. Backtesting.py can be cheaper for a small study. VBT PRO can be cheaper when it replaces custom tools for parameters, portfolios, validation, data, analysis, live updates, Rust, and documentation search.
Which should you choose?
With VectorBT PRO, you can:
- compare many assets, parameters, validation folds, and strategy variants together,
- let several assets share cash and portfolio-wide rules,
- combine broad parameter sweeps with stateful, compiled callbacks,
- use walk-forward, purged, embargoed, or combinatorial validation,
- split long runs into chunks, run them in parallel, save progress to disk, resume after an interruption, and inspect the full result,
- update indicators and portfolio simulations as new data arrives,
- run supported calculations and simulations in Rust without Python, and
- search documentation that matches the installed Python and Rust versions.
Choose Backtesting.py when most of these are true:
- one instrument and one account describe the research problem,
- OHLC or OHLCV bars are an adequate resolution,
- a compact
init()andnext()strategy is easier to review, - common market, limit, stop, spread, commission, and margin assumptions are enough,
- grid or SAMBO optimization plus a heatmap meets the search need,
- an interactive chart and focused metric report are the main analysis tools, and
- AGPL-3.0 fits the intended use.
Using both can be reasonable, but not because every idea must graduate from one to the other. Backtesting.py can remain the final research engine for a narrow bar strategy. VBT PRO can be the first tool when the hypothesis is inherently multi-asset or multidimensional. If results move between them, reconcile signal timing, sizing, order rules, costs, and final-position treatment before interpreting differences.
A small test before you choose
Test one representative strategy under identical evidence standards:
- Freeze the same OHLCV data, timestamp convention, starting cash, fees, spread or slippage, size, and signal-to-fill delay.
- Reconcile one market entry, limit, stop, gap, reversal, insufficient-cash case, and final open position order by order.
- Run the same constrained parameter grid and retain the complete surface, not only the maximum.
- Apply a chronological train and test design outside Backtesting.py and with VBT PRO's splitter, then verify identical ranges and preprocessing.
- Add a second asset and decide whether independent runs or a shared-cash portfolio is the actual requirement.
- Measure cold and warm runtime, peak memory, code size, inspectability, and failure recovery on the intended hardware.
- Prototype one path-dependent rule and, if native deployment matters, port the VBT PRO version through Numba and Rust and compare its records.
- Review both licenses and total operating cost for the intended personal, team, hosted, or distributed use.
The expected result is not that one library wins every row. It is a clear boundary between the compact single-instrument workflow Backtesting.py executes well and the much larger research system VBT PRO provides.