quantlab.backtest.config#
The configs of the backtest layer.
A backtester is constructed from a BacktestConfig subclass and exposes it as
self.config. Unlike the dataset, factor and model configs these are not frozen;
ApproximateBacktestConfig, which configures no backtester run, is.
The price dataset, the model, the portfolio construction rule, the benchmark and
the tracker are declared with component(), so to_dict() writes each as its
own config and the backtester can be rebuilt from the run’s config.json (see
quantlab.core.component). The execution settings (sizing basis, fees, slippage)
are those of quantlab.execution.rules.
Fields are documented with #: comments so the meaning of each one sits beside
its definition.
Classes
Config of an approximate backtest: every rebalance decided at once, the window simulated as arrays. |
|
Fields every backtester shares. |
|
Config of a cross-sectional backtest: a predictor's scores turned into weights. |
|
Config of a backtest of given target weights, market conventions included. |