What is a Backtest?

A backtest uses historical data to simulate how a trading strategy would have performed if it had been run in the past.

To do this, the InvestorsEdge platform uses a huge database covering all known daily prices, dividends, splits, fundamentals and analyst estimates since 1990 on every company that is or has been listed on a stock exchange.

Key to the efficacy of the results produced by the backtester is that our data is stored in point In time form, which means the backtester will only use data that was in the public domain at the time it runs its simulation, and that it tracks and includes in any simulation companies that failed during the backtest - this eliminates problems with survivorship bias that can distort your results.

Where do I start?

We'll start by clicking on the Growth at a Reasonable Price strategy on your home page. You can see in the image below that this backtest shows the performance of our strategy from 2000-17.

One way of running a backtest is to click on the green Run Backtest button in the top right corner of the screen:

Select Choose Dates to select a custom date range and then click the Backtest button to backtest the strategy from 2010 until yesterday. You will see the backtester progress bar turns green when the system has finished simulating your strategy, after which you can click on the link to see the results.

Once the green popup box tells you the backtest is complete just click on the link to view the results of our simulation.

You can see that the strategy would have returned 24% over the 8 years of the test - not quite as good as the 2000-17 results but still not bad!

Sample Datasets

Very few (i.e. none) of our strategies perform brilliantly the first time we run a backtest, and it is not out of the ordinary to create hundreds of versions of a strategy as you develop it into a robust trading model. One problem that we frequently encounter is with data mining. If you generate and test enough strategies you will eventually find one that works well in a simulation. How do you know that you have a strategy that will continue working or if you have found a pattern that won't repeat itself in the future?

One method to combat data mining is to use an In-Sample data set with which to develop your strategy, and then test it using Out-of-Sample data. You can define these data sets within the Strategy Designer to allow you to easily run backtests using the desired data.

The example below has an In Sample date range of 1st Jan 2014 to 3rd July 2018 and an Out of Sample range of 1st Jan 2010 to 31st Dec 2013:

Once you have defined your sample date ranges within the Properties page you can backtest against them either by selecting the desired data set either in the backtesting dialog box or by clicking on the relevant tab:

Now you've mastered backtesting your strategies, let's move onto the Strategy Designer ( click here for the tutorial).