lib-vectorbtlisted
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