You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optional Rust engine with auto-dispatch: Add a complete Rust backend (vectorbt-rust) as an optional high-performance alternative to Numba. When installed, functions automatically dispatch to the Rust engine based on a global engine setting ("auto", "numba", or "rust"), with per-call override via the engine parameter. Install with pip install vectorbt[rust]
Rust kernels across all modules: High-performance Rust implementations for generic (rolling, expanding, EWM, groupby, drawdowns, ranges, apply), indicators (MA, RSI, Bollinger, ATR, MACD, Stochastic, OBV), labels, signals (random, stop, OHLC stop generation), portfolio (order-based and signal-based simulation, reservoir sampling, stop-loss/take-profit), records, and returns
Engine dispatch layer: New dispatch.py modules in every subpackage handle engine resolution, dtype compatibility checks, soft casting, and transparent fallback to Numba when Rust doesn't support a given call
Instance-level engine preference: Accessors accept an engine parameter at construction, inherited by all subsequent method calls with per-call override support
FlexArray for zero-copy broadcast: Rust kernels accept flexible array inputs (scalar, 1D, or 2D) directly, eliminating Python-side broadcast overhead for signals, labels, and portfolio simulation
Static signal-based portfolio simulation: Add simulate_from_signals_nb, a no-callback Numba function for signal-based portfolio simulation that enables both Numba and Rust fast paths
Enhancements
Single-column and row-major fast paths: Specialized Rust kernels for single-column inputs and C-contiguous arrays, avoiding unnecessary iteration overhead
Rewrite true_range_nb as single-pass: Replace multi-array temporary allocation with an in-place loop, eliminating the fshift_nb call
Replace O(n²) between_two_ranges_nb with O(n) two-pointer scan: Avoid repeated flatnonzero filtering per signal pair
Soft dtype casting in dispatch: Engine dispatch automatically handles dtype mismatches (e.g., int → float) with user-configurable warnings instead of hard failures
Build/CI
Rust engine CI matrix: New rust-engine CI job testing Rust builds across Ubuntu, macOS, Windows × Python 3.10–3.13
New optional dependency groups: [rust], [test], [test-rust], and [all]; [full] now composes from [full-no-talib]
Docker and PyPI workflows: Updated to support Rust engine builds alongside pure-Python distribution
Documentation
Benchmark suite: Comprehensive benchmark harness comparing Numba vs Rust engine performance across all modules with published results