quantlab.backtest.engine_vectorbt#

vectorbt simulation engine for the backtest layer.

VectorBtBacktester implements the engine hooks of BaseBacktester on top of vectorbt.Portfolio.from_orders: target-percent weights, a one-bar delay between signal and fill, rejected orders, delisting settlements, and the whole-window portfolio statistics a run directory records. It is the only module in the package that imports vectorbt; concrete backtesters such as quantlab.backtest.predefined.us_equity subclass it and supply the market conventions and the signal rule. The module is named engine_vectorbt rather than vectorbt so it cannot shadow the library it imports.

A panel is an xarray.Dataset indexed by timestamp and symbol. A target-percent weight is the fraction of portfolio value a symbol should hold after the order fills; a negative weight is a short position.

Classes

VectorBtBacktester

Abstract backtester that simulates target weights with vectorbt.