Skip to content
GetProfitable
Search
Dictionary

In-sample

The slice of history you used to build and tune a strategy; results on it are always flattering and prove nothing on their own.

In-sample data is where you look at charts, invent ideas, choose parameters, and fix bugs. By the time you finish, the strategy has seen this data many times, so its in-sample record includes every accident it learned.

The right way to read an in-sample result is as an upper bound. A strategy that cannot make money in sample is dead. A strategy that makes a lot in sample has passed only the first and easiest test.

Example: fifteen years of daily data, 2009 to 2023. You use 2009 to 2018 to develop and never open 2019 to 2023 until the rules are frozen. The first block is in-sample, the second is out-of-sample, and the value of the second depends entirely on your discipline about not peeking.

Related: out-of-sample, holdout-set, train-validation-test-split, overfitting

Educational only, not advice. Spotted an error? Post in Site Feedback.