Can training outcomes overlap a perpetual test window?

Chronological start times do not guarantee a clean crypto perpetual train-test split. A training observation may use a future outcome that extends into the test period. Define the complete information interval of each label, then remove training observations whose label information crosses the declared evaluation boundary. A gap chosen without inspecting those intervals may leave leakage intact.

What is an information interval?

For this lesson, a label interval begins when an observation is formed and ends when the outcome used for training becomes known. A three-bar future return needs later prices. A trade-outcome label may remain unresolved until an exit many bars later. Sorting rows by entry time does not move those later prices into the past.

Feature transformations also have information intervals. Fit normalization and feature selection on training data only. A long lookback may use older public observations causally, but fitting its parameters using future test observations is a different and unacceptable operation.

What does a boundary audit look like?

Illustration only; event labels and times are synthetic.

Use half-open information intervals [start, end), with a test boundary at minute 10. Training label A spans [6, 9); B spans [8, 11); C spans [9, 12). A is resolved before the boundary. B and C use outcome information after minute 10 and are removed from the training set under this declared boundary rule.

Of the three candidate labels, one remains and two are removed. Do not call the original count three independent observations. If an outcome needs a price observation exactly at its stated end, its information interval must include that observation; do not hide it behind half-open notation. Coarse timestamps or endpoint uncertainty need a conservative boundary rule.

When is an additional gap useful?

A predeclared time gap may address known delays or residual overlap in the experiment, but no universal number of bars makes all datasets independent. Event horizons can vary. In designs that allow later observations into training, audit both sides of every test interval and document any additional exclusion period.

Keep the candidate count, exclusion reason and retained count for every split. This audit complements walk-forward design; it does not authorize training on future data or fix a strategy chosen after inspecting the final test.

What are the short answers?

Is sorting by entry timestamp enough to prevent leakage?

No. An outcome attached to an early entry can use prices from inside a later test period.

What does purging mean in this lesson?

It means removing training observations whose outcome-information intervals cross the declared evaluation boundary.

Does a fixed gap guarantee independence?

No. The gap must be justified by the information intervals and design, and independence remains a separate assumption.

Past performance does not guarantee future results. Leveraged futures carry a high risk of loss.

Last reviewed by Ric Mescallado