Skip to content

nb package

Numba-compiled functions for generic data.

Provides an arsenal of Numba-compiled functions that are used by accessors and in many other parts of a backtesting pipeline, such as technical indicators. These only accept NumPy arrays and other Numba-compatible types.

Note

vectorbt treats matrices as first-class citizens and expects input arrays to be 2-dim, unless function has suffix _1d or is meant to be input to another function. Data is processed along index (axis 0).

Rolling functions with minp=None have min_periods set to the window size.

All functions passed as argument must be Numba-compiled.

Records must retain the order they were created in.

Warning

Make sure to use parallel=True only if your columns are independent.


Sub-modules