Features
Strategies
Worked strategies that combine data, signals, simulation, and validation end to end
Build pairs trades, rank a universe, or combine several strategies into one portfolio. These worked examples bring VBT's data, indicators, signals, and analytics together on real market data, with code and plots you can adapt to your own ideas.
Choose a strategy workflow
| What do you want to research? | Where to start |
|---|---|
| Trade the spread between two related assets | Pairs trading covers pair selection, rolling hedge ratios, spread signals, and two-leg backtests. |
| Rank a universe and rotate into selected assets | Cross-sectional strategies covers momentum, custom factor scores, quintile portfolios, and changing eligibility. |
| Allocate between several trading strategies | Multi-strategy portfolios compares static weights, scheduled rebalancing, and shared trading cash. |
| Compare regular contributions with investing at once | Recurring investing backtests monthly deposits against a lump sum. |
features/strategies pages
Pairs trading
Screen cointegrated pairs, trade spread z-scores with shared cash, and validate them
Cross-sectional strategies
Rank a universe each period, rotate into the leaders, and test factors by quintile
Multi-strategy portfolios
Stack strategies as one portfolio, weight them, and compare recurring investing plans
Build on the examples
The examples use Python functions, pandas tables, and VBT portfolios, so you can replace their symbols, scores, signals, and allocation rules with your own. Use signal backtesting when you have entry and exit arrays, or event-driven backtesting when a decision depends on the positions and cash already in the portfolio.
The same research tools work across these strategy families. Compare lookbacks, thresholds, and position sizes with parameter optimization, then check the selected settings on later data with walk-forward testing. Inspect trades and drawdowns to understand what drives the result.
Compare each idea with a baseline, inspect its trades, and see the effect of costs and allocation rules. The examples give you a complete starting point for the next experiment.
Start here
Follow the Pairs trading tutorial to build a pairs strategy from screening to a custom simulator. For a first signals-based example, the Basic RSI tutorial goes from indicator values to a backtest. The Portfolio optimization tutorial develops allocation functions and connects them to portfolio simulation.
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.