Skip to content

Releases: polakowo/vectorbt

v1.0.0

22 Apr 11:49

Choose a tag to compare

What's New in v1.0.0

Features

  • 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
  • Rust engine documentation: Dedicated README covering architecture, build instructions, and module reference

v0.28.5

26 Mar 22:17
993ceca

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.28.4...v0.28.5

v0.28.4

26 Jan 17:10
6cb7ae3

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.21.0...v0.28.4