Concept
Label Definition & Prediction Horizon
Label Definition & Prediction Horizon is a Machine Learning concept. The Library holds 1 implementations, each one a working definition you can pull into Quant.
Top Label Definition & Prediction Horizon indicators
1 total
What are Label Definition & Prediction Horizon?
In supervised machine learning for trading, the label is the target the model learns to predict, and the prediction horizon is how far into the future that target looks. Label definition converts raw future price action into a training signal: the sign of the forward return over the next N bars, whether price reaches a volatility-scaled target before a stop, or a three-way up/flat/down class beyond some threshold. Every scheme encodes an opinion about what counts as success, so two models trained on identical feature sets can behave completely differently purely because their labels differ.
The horizon ties the label to a trading style. A 5-bar horizon trains a scalping-tempo model, a 100-bar horizon trains a swing model, and mismatching horizon and intended holding period produces signals that fire on the wrong timescale. Very short horizons yield labels dominated by noise; very long horizons blur cause and effect and shrink the number of independent examples. And because labels are computed from data that had not printed yet, they exist only in hindsight: fine for training, but any live display of label-like values needs repaint-safe engineering to avoid showing information no trader could have had.
How traders use it
- Defining the target for a classifier: for example, label a bar +1 when the forward return over the horizon exceeds a volatility-scaled threshold, -1 below the negative threshold, and 0 otherwise, then train the model to predict that class from current features.
- Aligning model and strategy: the horizon is chosen to match the intended holding period and the threshold to clear realistic costs, so a bullish prediction corresponds to a tradeable move rather than a sub-spread wiggle.
- Auditing a learned signal: asking what was labeled, over what horizon, and how accuracy was measured on an out-of-sample split reveals what the model was actually optimized to do, which is often narrower than the description around it suggests.
Related concepts · Features & pipeline
Concept family
Machine Learning
32 concepts mapped · 21 in the Library
Label Definition & Prediction Horizon FAQ
What is triple-barrier labeling?
A labeling scheme popularized by Marcos López de Prado. Each training example gets an upper barrier (profit level), a lower barrier (loss level), and a vertical time barrier at the horizon, and the label records which barrier price touched first. Because it tracks the path rather than only the endpoint, it labels a trade that would have been stopped out as a loss even if price later recovered.
Why does label choice matter more than the algorithm?
Because the label defines the question the model answers. If the label is next-bar direction, the model is optimized against near-random noise and no algorithm rescues it; if the label is a volatility-scaled move over a sensible horizon, even simple models have something learnable to find. Practitioners treat labeling as the highest-leverage design step, though a well-posed label still guarantees nothing.
Build Label Definition & Prediction Horizon your way.
Quant writes, tests, and refines it with you — then it runs on LuxAlgo charting or ports to TradingView.
