How to backtest strategies
It's finally here - a highly requested and extremely useful feature for every stock trader - strategy backtesting. EZstockscreener has one of the most advanced and powerful screening capabilities compared to most other online stock screeners. Combining this with the backtest feature is going to give you all the info you need to find your next best strategy! Our data goes back ~10 years from the current date, so it is very easy to backtest long-term strategies also! Let's dive in and see how we can use this tool with an example.
On your screener page (home), you will now see a new toggle named "Backtest mode". Turn it on and you will notice that the "Base screener" now changes to "Exit strategy screener". To run a backtest, you need 2 things: an entry strategy to generate entry signals and an exit strategy to generate exit signals. The entry strategy is the one you enter in the conditions text area and the exit strategy is one you select in the exit strategy screener - so, do note that you will need to save a screener in order for it to be used as an exit strategy screener.
Once you enter both, simply click on "Scan" and you will see a table with various % changes and also the date on which the exit was triggered along with a summary of stats at the bottom of the table.
For this example, we are using a simple 100-25 MA crossover strategy for both entry and exit - however, you can create backtests for much more complex strategies. Here are some limitations/important notes about the backtest system:
- All positions are assumed to be long only
- The symbols which satisfy the entry conditions on the scan date are the only symbols that are considered as "entered"
- It is possible that some symbols might not have a exit date because a exit signal was not generated for it
- By default, the backtest runs from the date of scan till the current date - you can change this by toggling "use last date to compare"
Here are some examples of entries and exits of some stocks found using the strategy used in the example above:
If you choose a scan date and last date different from the default settings, you might see an entry and exit like this:
That's it for the strategy backtester tutorial! If you have any questions, need any help with strategy construction or have any feedback, please do let us know by emailing us at [email protected].