In and out of sample testing, what is it and why do it?

In and out of sample testing, what is it and why do it?

What is in and out of sample testing?

In-sample testing and out-of-sample testing are two methods used to evaluate the performance of a trading strategy.

In-sample testing

In-sample testing involves testing a strategy on a set of data that was used to develop and optimise the strategy.

In-sample testing is used to evaluate the performance of a strategy on a set of historical data that was used to develop and optimise the strategy. It helps to identify any flaws or weaknesses in the strategy and can be used to optimise the strategy's entry and exit parameters.

For instance, if the data set you are testing on covers 40 years, you would complete your optimisation on the first 30 years. The last 10 years would be used for out-of-sample testing.

When running an optimisation on in-sample data, the results can be overly optimistic, as the strategy has been optimised to perform well on the specific data that was used for the testing.

Out-of-sample testing

Out-of-sample testing is used to evaluate the performance of a strategy on a separate set of data that was not used during the development and optimisation process. This helps to determine whether the strategy would be able to perform well on new, unseen data (the 10 years of historical data mentioned above).

The results of out-of-sample testing are typically considered to be more realistic, as the strategy has not been optimised to perform well on this specific data set.

In theory, it is essentially operating the strategy on a set of data that it has never seen before.

No alt text provided for this image
Source: buildalpha.com

Why do you use in and out of sample testing?

Ultimately, we utilise in and out of sample testing to generate a more robust trading strategy. By using in-sample testing, you can optimise the strategy and identify any flaws or weaknesses. By using out-of-sample testing, you can evaluate the performance of the strategy on new, unseen data and determine whether the strategy is likely to perform well in the future.

By combining the results of both in-sample and out-of-sample testing, you can develop a trading strategy that is robust and has a high likelihood of performing well in the future.

When moving from in-sample testing to out-of-sample testing, we want to see that the performance statistics generated across both remain relatively stable.

Summary

In summary, in-sample and out-of-sample testing are two methods used to evaluate the performance robustness of a trading strategy.

In-sample testing is used to evaluate the performance of a strategy on a set of historical data that was used to develop and optimise the strategy. Out-of-sample testing is used to evaluate the performance of a strategy on a separate set of data that was not used during the development and optimisation process.

If the performance statistics and characteristics of the strategy remain consistent throughout this process, you may be on to a winning strategy.

Brett Boynton, CFA

Founder and Startup Investor | Technology Commercialisation | Capital Markets | Corporate Development | Climate Capital and ESG Investing

2 年

Great series Hue - we need more people understanding what quant is and what it can do for asset owners

要查看或添加评论,请登录

Hue Frame的更多文章

  • What is randomised signal length?

    What is randomised signal length?

    Randomised signal length is a technique used as part of the robustness testing of a trading strategy. The goal of…

  • What is forward testing?

    What is forward testing?

    Forward testing is a method of evaluating the performance of a trading strategy by applying it to real-time market data…

  • What are noise and stress testing, and how do we run these tests?

    What are noise and stress testing, and how do we run these tests?

    Noise and stress testing are important techniques for making a trading strategy more robust. Noise testing simulates…

  • Transaction Cost and Slippage Analysis

    Transaction Cost and Slippage Analysis

    Transaction cost and slippage analysis are important aspects of evaluating the performance of a trading strategy…

  • What is Monte Carlo Simulation, and how do you use it to improve a strategy?

    What is Monte Carlo Simulation, and how do you use it to improve a strategy?

    Monte Carlo simulation is a statistical technique that uses random sampling to model possible outcomes of a complex…

  • What is Overfitting?

    What is Overfitting?

    An overfitted trading strategy is a model that has been trained on a specific dataset and has learned the noise in that…

  • What is Optimisation?

    What is Optimisation?

    Optimisation of a trading strategy is the process of adjusting the parameters of a strategy to achieve the best…

  • Quant investing, what is it, and what are some quant strategies?

    Quant investing, what is it, and what are some quant strategies?

    What is Quantitative investing? Quantitative investing, or "quant" investing as it is often referred to, is a…

    1 条评论
  • The Delta Variant - is it that much different?

    The Delta Variant - is it that much different?

    Over the last few months, we have seen the focus of the world’s media shift from the original COVID-19 strain to its…

  • Where next for Electric Vehicles?

    Where next for Electric Vehicles?

    One of the themes we have been covering extensively for the last 18 months is electric vehicle/renewable energy mass…

社区洞察

其他会员也浏览了