# Migrating from vectorbt (/getting-started/vectorbt-pro-vs-vectorbt)

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 \[#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 \[#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? \[#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 \[#what-pro-adds]

| Area                                 | VectorBT PRO adds                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Data                                 | More [data sources](/features/data/market-data-sources/), [databases and file formats](/features/data/data-storage-and-databases/), and [safe alignment across timeframes](/features/data/multi-timeframe-analysis/)                                                                                                                                                                                                                   |
| Indicators and signals               | [Indicator expressions and more indicator libraries](/features/indicators/technical-indicators/), and [streaming indicators](/features/indicators/streaming-indicators/) that update one bar at a time                                                                                                                                                                                                                                 |
| Backtesting                          | [Limit and stop-entry orders](/features/backtesting/orders-and-execution/), [stop ladders and time stops](/features/backtesting/stop-loss-and-take-profit/), [leverage and contract multipliers](/features/backtesting/fees-slippage-and-leverage/), [cash deposits, withdrawals, and dividends](/features/backtesting/portfolio-accounting/), and [continuing a portfolio as new bars arrive](/features/backtesting/live-simulation/) |
| Analysis                             | [Pattern search and event studies](/features/analytics/patterns-and-event-studies/), [MAE and MFE for every trade](/features/analytics/trade-analytics/), and [slicing and stacking](/features/tooling/multidimensional-research/) or [resampling](/features/data/multi-timeframe-analysis/) whole portfolios                                                                                                                          |
| Strategy optimization and validation | [Parameter sweeps over any function](/features/optimization/strategy-optimization/), [walk-forward and purged cross-validation](/features/optimization/time-series-cross-validation/), and [robustness tests](/features/optimization/robustness-and-overfitting/)                                                                                                                                                                      |
| Portfolio optimization               | [Scheduled rebalancing and allocation functions](/features/optimization/portfolio-optimization/), with external optimizers such as PyPortfolioOpt and Riskfolio-Lib                                                                                                                                                                                                                                                                    |
| Performance                          | [Chunking across threads, processes, and Ray, with resumable runs](/features/performance/parallel-execution-and-caching/), and the [`vectorbtpro-rust` crate](/features/performance/native-rust/) for strategies written and run in Rust, without Python                                                                                                                                                                               |
| Tooling and AI                       | [Configuration files](/features/tooling/configuration-and-persistence/), a [command-line interface](/features/tooling/workflow-automation/), [documentation search](/features/ai/knowledge-search/), an [AI research assistant](/features/ai/ai-research-assistant/), and an [MCP server](/features/ai/mcp-server/) for coding assistants                                                                                              |

### Cross-validation beyond basic splits \[#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](/features/optimization/time-series-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](/features/) covers
these additions with examples.

## Performance \[#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](/features/performance/benchmarks/) page shows measured results with their hardware and
library versions.

## Migrating code \[#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:

```python title="Before: vectorbt"
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:

```python title="After: VectorBT PRO, direct port"
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")  # (1)
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,  # (2)
    fees=0.001,
    freq="1D",
)
print(round(pf.total_return, 4), round(pf.sharpe_ratio, 4), pf.trades.count())  # (3)
```

1.  The moving average type is a parameter, `wtype`, instead of the `ewm` flag.
2.  A trailing stop has its own argument, `tsl_stop`, instead of `sl_stop` with `sl_trail=True`.
3.  `total_return` and `sharpe_ratio` are properties, so they take no parentheses.
    `pf.get_total_return()` accepts arguments.

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:

```python title="After: VectorBT PRO, with a data object"
import vectorbtpro as vbt

data = vbt.CSVData.pull("btc.csv")  # (1)
fast = data.run(vbt.MA, 10, wtype="exp")  # (2)
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)  # (3)
print(round(pf.total_return, 4), round(pf.sharpe_ratio, 4), pf.trades.count())
```

1.  Each column becomes a feature of one data object, and the frequency is inferred from the index.
2.  `data.run` passes the close to the indicator because it matches the indicator's `close` input.
3.  The portfolio takes open, high, low, close, and frequency from the data object.

```text title="Output of all three"
3.6274 1.3232 20
```

All 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 `vectorbtpro` instead of `vectorbt`. Both use the `vbt` alias, so install PRO in its own
    environment.
*   Data classes load with `pull`, as in `vbt.YFData.pull("BTC-USD")`. `download` still works as an
    alias.
*   When a call fails, `vbt.phelp` prints 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](/features/tooling/developer-tools/) page shows how to inspect signatures,
source, and prepared inputs when adapting a more involved strategy.

## Access \[#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](/become-a-member/) and the [FAQ](/faq/) for details.

## Related pages \[#related-pages]

*   [Getting started](/getting-started/): Learn what VectorBT PRO is and how to get access
*   [Features](/features/): Explore backtesting, indicators, optimization, and analysis across instruments, parameters, and time
*   [Benchmarks](/features/performance/benchmarks/): Compare simulators on the same orders and measure each backend on your own machine
*   [Frequently asked questions](/faq/#oss-migration): Get straight answers about VectorBT PRO, membership, access, setup, and usage
