Learn
Lesson · Backtesting and Trading Systems

In-Sample, Validation, and Out-of-Sample Data

Separate rule development, parameter selection, and final evaluation so the last dataset remains unseen until the system is fixed.

Review concepts
Core concepts

What to understand

Keep each definition operational so it can be implemented and tested.

1

In-sample

Develop rules and estimate parameters.

2

Validation

Compare alternatives and make limited design decisions.

3

Out-of-sample

Evaluate the frozen system once on data not used for selection.

Interactive lab

Data Split and Parameter Selection Lab

Optimize a parameter in training, inspect validation, then reveal the untouched out-of-sample result.

Data Split and Parameter Selection Lab

Deterministic synthetic educational data · no live market connection

BACKTEST MODEL
Process

Protect the final test

Repeatedly checking out-of-sample data turns it into training data.

1

Develop

Use in-sample data for hypotheses and parameter candidates.

2

Select

Use validation data for controlled comparison.

3

Freeze and test

Lock the system before revealing out-of-sample performance.

Knowledge check

Check your understanding

Select one answer for each question. Feedback appears immediately.

1. Which dataset should select the final parameter?

2. Checking out-of-sample performance after every change causes:

3. A large in-sample/out-of-sample gap suggests:

4. 260 bars are split 50 / 25 / 25. The in-sample, validation and out-of-sample segments hold:

Practical rules

  • Set split dates before optimization.
  • Keep the final test inaccessible during development.
  • Report every split, including weak results.

Common mistakes

  • Choosing the split that gives the best chart.
  • Retuning after each final-test failure.
  • Using random splits that break time order for time-series trading.
References

Official reading

The labs are simplified simulations. These sources cover historical performance, data, costs, or execution limitations.

FINRA · Smart Beta—What You Need to Know
Explains that historical backtesting is hypothetical and does not predict future performance.

Open official reference ↗

FINRA Rule 2210 · Communications with the Public
Includes restrictions on performance projections and misleading performance claims.

Open official reference ↗

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.