Skip to main content

In-Out Sample

In Sample Out Sample​

Have you ever considered the idea of testing your strategy across two different sets of time periods to understand its versatility in various market conditions? It's actually a pretty important factor to consider. You might have developed a strategy that works amazingly well during specific favourable conditions, but falls short when the market turns against you.

It's crucial to verify whether your strategy is tailored to a specific time frame or if it can adapt to different market scenarios. With AlgoTest, you get access to the fantastic "In Sample Out Sample" feature.

info

This feature allows you to split your backtest results into two distinct periods, providing you with separate statistics for each period.

Let's say we tested a strategy from 01/01/2020 to 01/01/2022, and we want to compare its performance from 01/01/2022 to 01/01/2021 and 01/02/2021 to 01/01/2022. With this awesome feature, we can easily carry out such comparisons.

It's an incredibly powerful tool for fine-tuning and optimising your trading strategies.

How to Use In Sample Out Sample Feature​

To utilise this feature, please follow the simple steps outlined below.

  • To use this feature, begin by creating and backtesting your strategy. Click the "Start Backtest" button to initiate the process. Let's assume we backtested this strategy from 01/01/2017 to 06/13/2024.

  • Afterward, the backtest result for the complete period you backtested the strategy will be displayed in the image below.

  • Enable the "In/Out Sample" button and then select the date at which you want to split results. Click on "Recalculate."

  • This action will split our backtesting stats between in-sample (01/01/2017 to 11/01/2021) and out-sample (12/01/2021 to 06/13/2024), as shown in the image below.