← ClaudeAtlas

lib-vectorbtlisted

Vectorized Numba/Rust backtester built for parameter sweeps, whose from_signals fills at the signal's own bar close by default. TRIGGER - import vectorbt as vbt, pip install vectorbt, vbt.Portfolio.from_signals, from_orders, from_holding, ma_crossed_above, vbt.MA.run, vbt.IndicatorFactory, .vbt.signals.fshift, price=np.inf, reject_prob, allow_partial, stop_conflict_mode, cash_sharing, FlexArray, vectorbt[rust], VectorBT PRO, "this PRO example does not work"; a 10,000-combination grid, "my backtest looks too good", an equity curve that dies live. Memory is stale here: v1.0 (2026-04-22) was a breaking rewrite with an optional Rust engine, 1.1.0 shipped 2026-07-05, and the licence is Apache-2.0 plus Commons Clause - not OSI open source. SKIP for choosing among engines (backtesting-engines) and for judging a finished result (backtest-validation). SKIP when the question is WHICH library to choose, or names no library at all - both belong to the domain skill.
howard-lynn-ye/fin-skills · ★ 1 · AI & Automation · score 77
Install: claude install-skill howard-lynn-ye/fin-skills
# vectorbt The fastest thing in its category for parameter sweeps — and the owner of the single most important footgun in the domain, which is a **default, not a bug**. | | | |---|---| | pip / import | `pip install vectorbt` · `import vectorbt as vbt` | | Version | **1.1.0 (2026-07-05)**; **1.0.0 landed 2026-04-22**. `requires_python >=3.11,<3.15` | | Licence | 🚨 **Apache-2.0 + Commons Clause** (read `LICENSE.md`) — **not OSI open source** | | Status | ✅ Revived, not frozen. 8,978★ `polakowo/vectorbt`, pushed 2026-08-02 | ## The trap that costs you money 🚨 **`from_signals` fills at the signal's own bar close.** `Order.price` defaults to `np.inf`, and vectorbt's own docstring in `vectorbt/portfolio/enums.py` says: > *"If `-np.inf`, replaced by the current open (if available) or the previous close (≈ the current > open in crypto). If `np.inf`, replaced by the current close."* `from_orders`/`from_signals` resolve `if price is None: price = np.inf`. So `vbt.Portfolio.from_signals(close, entries, exits)` fills at `close[t]` — the signal's own bar. Combined with the equally default idiom `fast_ma.ma_crossed_above(slow_ma)` — also computed on `close[t]` — **this is textbook same-bar execution.** The close is not knowable until the bar is over. Free money in the backtest, nothing in live. **Every vectorbt tutorial showing a beautiful equity curve without shifting is showing a biased result.** The library will never warn you. Fixes, in order of preference: ```python # 1. Fil