Portfolio rebalancing
Median warm runtime for equal-weight shared-cash rebalancing across 10, 100, and 500 assets, with every result independently checked.
Tools measured in this benchmark
Open a tool page for its code examples, strengths, and limits. Exact versions are listed in the technical details.
VectorBT PRO
Uses labeled arrays for broad searches and compiled code for steps that must run in order
Explore toolQuantConnect LEAN
Processes data and orders as events with replaceable data, fill, and broker models
Explore toolLumibot
Runs one strategy interface against historical data or a broker
Explore toolpysystemtrade
Moves futures data through forecast, sizing, portfolio, and trading stages
Explore toolZipline Reloaded
Runs scheduled strategy events over local data bundles and Pipeline factors
Explore toolbt
Builds a portfolio from small selection, weighting, and rebalancing steps
Explore toolRQAlpha
Processes market events and adds data, risk, and analysis through plugins
Explore toolWarm runtime by asset count
Median wall-clock time for 13 equal-weight rebalances over 260 bars. Lower is faster. Runtime uses a logarithmic scale.
Native in-process portfolios scale most gently here
VectorBT PRO and LEAN have the lowest framework medians across all three asset counts in this in-memory workload. The fuller Python engines include more strategy, data, or calendar lifecycle and should not be compared as equivalent feature boundaries.
See exactly how the result was produced
Exact values
| Assets | bt | Lumibot | pysystemtrade | RQAlpha | VectorBT PRO | Zipline Reloaded | QuantConnect LEAN |
|---|---|---|---|---|---|---|---|
| 10 | 11.65 ms | 481.37 ms | 30.82 ms | 295.95 ms | 6.95 ms | 127.14 ms | 1.53 ms |
| 100 | 62.97 ms | 2,767.91 ms | 306.34 ms | 1,349.22 ms | 9.27 ms | 450.89 ms | 7.69 ms |
| 500 | 303.45 ms | 13,721.02 ms | 1,519.71 ms | 6,130.95 ms | 17.64 ms | 1,883.76 ms | 41.59 ms |
Environment
- Apple M3, 8 logical cores, 24 GB RAM
- macOS 26.5.2, arm64
- CPython 3.11.8 and 3.12.9, plus .NET 10
- bt 1.2.3, Lumibot 3.6.5, pysystemtrade 1.8.2
- RQAlpha 6.4.0, VectorBT PRO 2025.3.1
- Zipline Reloaded 3.1.1, QuantConnect LEAN commit 985ef30
Procedure
- 260 synthetic business-day bars
- 10, 100, and 500 assets
- Equal-weight rebalance every 20 bars
- Whole-share positions, shared cash, zero costs
- 2 warmups and 5 measured repetitions
Scope
Validation code is not part of the comparison. An independent NumPy implementation checks the expected holdings, cash, and equity. Its timing remains in the full results but is excluded from the chart and table because it is not a portfolio framework.
Peak RSS was not measured consistently. VectorBT PRO reports native cash, value, and assets. LEAN uses public in-process algorithm and portfolio components rather than the complete launcher.
Reproduce and inspect
The downloadable files preserve the measured values, available result detail, environment record, and checksums.
See the editorial process for the publication standard.
Download the data
Download the chart values, detailed results, release details, or file checksums separately.