quantlab.model.view#
Predictor views: predictors that answer through the predictor they wrap.
A predictor view wraps another predictor (a model, an ensemble or
another view) and is a predictor itself: it drops into
BacktestConfig.model in place of the predictor it wraps and changes only
what it says it changes about the predictions, such as which cells it masks
(MembershipMaskedPredictor), where they come from (RecordedPredictor)
or how they are smoothed in time (SmoothedPredictor). PredictorView
forwards every member of the backtester’s Predictor protocol
(quantlab.backtest.base) to the wrapped predictor once, so views of
views compose.
The protocol lives in the backtest layer, which the model layer does not
import (ADR 0022): the view forwards it structurally, and
tests/test_predictor_view.py checks it forwards every protocol member.
Classes
Root class of the views of |