Define what a forecast predicts by when, distinguish horizon from sampling and holding, and audit overlapping labels and outcome availability.
Prediction horizon
A prediction horizon is the distance from a forecast's origin to the future time or interval its target describes. In quantitative finance, changing that distance can change the sign of the return being predicted—and therefore the economic question the model answers. “The price will rise” is incomplete without saying from which reference, by when and under which return convention.
The horizon may be expressed in trading sessions, calendar time, bars or events. Five trading sessions need not mean five calendar days. With event-based bars, a fixed number of bars need not span a fixed elapsed time. State the clock, endpoints and market-calendar rule before constructing the target variable.
One price reference, two different answers
Consider synthetic observations of one share, in USD per share: 100 at the forecast origin, 103 one trading session later and 98 five sessions later. Assume no distributions, corporate actions, financing or transaction costs. These are reference-price returns; no executable trade at the origin price is implied.
For a fixed-horizon simple price-return target,
yt(h)=PtPt+h−1,
where h counts trading sessions and Pt>0. The realised targets are
yt(1)=100103−1=+3%,yt(5)=10098−1=−2%.
A model correctly predicting the positive one-session outcome has not correctly predicted the five-session direction. These are different targets. The five-session return is cumulative over its stated interval; it is neither an average daily return nor an annualised return.
Synthetic reference observations are USD 100 at session 0, USD 103 at session 1 and USD 98 at session 5, producing one-session return +3% and five-session return −2%. Two five-session labels beginning at sessions 0 and 1 share four of their five return increments.
Original synthetic reference prices, USD per share, and simple returns before distributions or costs. Points are discrete observations; no intervening price path or executable fills are specified. The lower panel counts shared session-to-session return increments.
A tradable label needs an entry reference consistent with the decision and execution process. If the forecast is computed only after the origin's final close, that price does not automatically become an attainable entry. The Labels and Overlapping Outcomes lesson develops feasible entry/exit references and the difference between fixed-horizon and first-barrier labels (public preview; full lesson requires membership).
Exit after two sessions under a separate risk rule
That design has a five-session target even though rows arrive daily and positions may exit earlier. Whether it is a useful design depends on how the forecast is translated into positions. A terminal return forecast does not itself describe stop losses, path-dependent exits or turnover. Conversely, a first-barrier target can have a maximum horizon while its realised endpoint varies across observations.
A historical row can have an unfinished future
A longer horizon pushes target completion further beyond its origin. At each historical model-fit time, the training set may contain only targets whose required outcomes have become usable. Sorting rows by their starting dates cannot enforce that condition.
For example, take a five-session label starting at session 0 and ending at session 5. Suppose its endpoint record becomes usable only at session 6 because of a declared processing delay. A fit at session 5 cannot use that target; a fit after the session-6 processing event can. The feature row's old date does not make its outcome available early. Ignoring this distinction creates look-ahead bias.
Daily origins also create overlapping outcomes. A label from session 0 to 5 uses increments ending at sessions 1, 2, 3, 4 and 5. The next label, from 1 to 6, uses increments ending at 2, 3, 4, 5 and 6. Four increments are shared. Two rows therefore do not provide two independent repetitions of the market experiment. Non-overlap alone would still not establish independence: common factors and serial dependence can remain.
For validation, record each label's outcome interval and availability time. Purge training labels that share outcome information with the held-out block, using an explicit endpoint convention. A row-count gap needs to be derived from the label construction and timing contract; a generic chronological splitter cannot infer those semantics. The owned Purging and Embargoes lesson shows interval containment, shared endpoints and the distinct role of post-test exclusions (public preview; full lesson requires membership).
Choose and evaluate the question together
Choose candidate horizons from the mechanism and decision being studied: when information could affect prices, how long the opportunity might persist and when the forecast will be acted upon. Then evaluate forecast errors at those horizons on eligible future outcomes. Hyndman and Athanasopoulos describe rolling-origin evaluation with multi-step errors; accuracy at one step does not substitute for accuracy at the intended horizon.
Trying many horizons and retaining the winner is model selection. Keep that search inside development, account for the trials and protect the final evaluation from repeated selection; otherwise horizon choice itself can contribute to overfitting. Finally, assess the actual position policy after its execution and costs. A well-predicted target and a profitable implementable strategy require different evidence.
Sources
Marcos López de Prado, Advances in Financial Machine Learning (Wiley, 2018), §3.2, “The Fixed-Time Horizon Method,” and §4.2, “Overlapping Outcomes.” Checked local text for endpoint targets, bar horizons and shared return information; the numerical construction above is original.
scikit-learn: TimeSeriesSplit, checked 27 October 2026. Time-ordered splits and a gap measured in samples; label-specific availability and overlap rules still need to be supplied by the researcher.