Releases: polakowo/vectorbt
Releases · polakowo/vectorbt
v1.0.0
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 globalenginesetting ("auto","numba", or"rust"), with per-call override via theengineparameter. Install withpip 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.pymodules 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
engineparameter 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_nbas single-pass: Replace multi-array temporary allocation with an in-place loop, eliminating thefshift_nbcall - Replace O(n²)
between_two_ranges_nbwith O(n) two-pointer scan: Avoid repeatedflatnonzerofiltering 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-engineCI 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
What's Changed
- Fix Styler.render() AttributeError with pandas 2.x by @wavebyrd in #832
- Add plotting regression tests by @ChadThackray in #835
- fix: gross_exposure() uses abs(asset_value) for grouped portfolios by @coryvirok in #837
New Contributors
- @wavebyrd made their first contribution in #832
- @coryvirok made their first contribution in #837
Full Changelog: v0.28.4...v0.28.5
v0.28.4
What's Changed
- Develop by @polakowo in #297
- Adds AlpacaData Custom Data Source by @haxdds in #310
- utils 'datetime_.py' 'to_timezone' function change by @forLinDre in #417
- Add extra packages used in example notebooks to separate requirements file by @izikeros in #500
- fix: size_granularity is not work in from_signals by @manhinhang in #533
- Update _settings.py for Seaborn by @Kalindro in #552
- Fix a tiny typo in custom.py by @FrankTianTT in #701
- chore: fix some typos in comments by @hidewrong in #702
- Update LICENSE.md, fix copyright license year by @JasonnnW3000 in #762
- Create scorecard.yml by @polakowo in #794
- fix: datetime_to_ms test failure by @ChadThackray in #818
- fix: value_counts(sort_uniques=False) tests removed by @ChadThackray in #819
- fix: add anywidgets to base dependencies by @ChadThackray in #820
- Migrate to pyproject.toml, pandas 2.0 and new python version compatibility by @ChadThackray in #824
New Contributors
- @haxdds made their first contribution in #310
- @forLinDre made their first contribution in #417
- @izikeros made their first contribution in #500
- @manhinhang made their first contribution in #533
- @Kalindro made their first contribution in #552
- @FrankTianTT made their first contribution in #701
- @hidewrong made their first contribution in #702
- @JasonnnW3000 made their first contribution in #762
- @ChadThackray made their first contribution in #818
Full Changelog: v0.21.0...v0.28.4