quantlab.backtest.predefined.weights#
A vectorbt backtester of given target weights, its market conventions in its config.
WeightsVectorBt is the backtester quantlab.api.backtest runs: a caller’s frame
names its own price columns and its own market, so the MarketSpec comes from the
WeightsBacktestConfig rather than from a class constant. It has no signal rule of its
own and takes no model; its only entry point is run_weights(). A run given an
output_dir writes the usual run directory (quantlab.runs.backtest_run), whose
recipe names this class with the market fields in its config and whose copy of a price
or benchmark FrameDataset is named relative to the run directory. The directory is
therefore self-contained: BacktestRun.open(run_dir).rebuild_backtester() rebuilds
the backtester, and run_weights given the run’s weights() replays the run.
Classes
Backtest given target weights with vectorbt, on the market its config describes. |