Quant research and backtesting
Label
Also called target, response variable
The outcome a model is trained to predict for each row, such as the sign or size of a future return over a set horizon.
How it works
In trading research the label is defined over a future window, for example the return from the next open to the close five days later, so its start must come after the decision time. Overlapping label windows make rows dependent and are the reason ordinary cross-validation leaks in finance; purging handles this. The choice of label shapes the strategy: a fixed-horizon return label ignores what happened along the path, such as hitting a stop-loss.
Worked example
Label for stock i on day t: 1 if the return from the open of day t+1 to the close of day t+5 is positive, else 0. Using the close of day t as the start instead would let the model trade at a price it used to build its features.
Related terms
Put it to work in a timed game.
Practise with Find the BugSources
- scikit-learn.org/stable/glossary.html
- skfolio.org/generated/skfolio.model_selection.CombinatorialPurgedCV.html
Last checked November 2026.