Backtesting of Trading Systems


A Trading System (or trading strategy) should be used for a security when it has been proven that it has worked in the past. For this very reason Stockalyze has a feature which allows you to test Trading Systems for securities.

Testing of trading strategy is called backtesting. In Stockalyze "backtest trading strategy" is also called "backtest trading system".

Stockalyze in Lite Mode is a free backtesting software with limitation of using only few Trading Systems. In Pro Mode backtesting can be done for all Trading Systems with many stocks at the same time. You can also define your own trading system and test that to know how good your trading plan is.

Invoking Backtesting

To initiate backtesting click on Backtest Trading Systems tool button on gateway window of Stockalyze:

Backtest Trading System tool button

Backtest Trading System tool button.

After that a dialog will appear where you can set all parameters for backtesting:

Backtest Trading System Dialog

Backtest Trading System Dialog.

Trading Systems that need to be tested can be selected by clicking Select Systems.... Stockalyze comes with many built-in Trading Systems. In Stockalyze new Trading Systems can be created using graphical user interface. So, if you don't find a system of your choice you can add Trading System of your own. In this example we will test all Trading Systems with few stocks of NASDAQ for demonstration purpose. After clicking on Select Systems... select all Trading Systems and click OK.

Select all Trading Systems for backtesting

Select all Trading Systems for backtesting.

Next we will supply list of few stocks traded on US exchanges. Below is the list that we will use for this purpose.

Symbol Exchange Symbol Exchange Symbol Exchange
A NYSE ABB NYSE ABBV NYSE
ABT NYSE ACE NYSE ACN NYSE
ADBE NASDAQ ADS NYSE AEP NYSE
AET NYSE AGU NYSE AKZOY OTCMKTS
ALL NYSE AME NYSE AMOV NASDAQ
AMX NYSE ANCTF OTCMKTS APD NYSE
ARMH NASDAQ ASML NASDAQ ATVI NASDAQ
AVIFY OTCMKTS AZSEY OTCMKTS BABA NYSE
GOOG NASDAQ MMM NYSE T NYSE

For a quick demo you can add just a few stocks of your choice instead of an exhaustive list. Click on Add Symbols... and select few securities. Alternatively, you can also click on Import Symbols... to import symbols from a file containing stock list. Here is the file that contains the stocks listed above.
After above steps the Backtest Trading Systems dialog will look like:

Backtest Trading Systems dialog with all parameters supplied

Backtest Trading Systems dialog with all parameters supplied.

You can also change values of other parameters like Maximum loss (i.e. stop-loss), Maximum drawdown (i.e. maximum erosion in profit), duration of testing data, and periodicity of the data but for this example we will leave these unchanged.
Click OK to start the backtesting process. It may take some time because it may need to download fresh data from internet but this process is highly parallelized and so it will do its work very very fast. Even if it takes some time you are not blocked and can keep working with Stockalyze. Below is the backtesting result for all Trading Systems against our selected list of stocks:

Backtesting result of all Trading Systems for few stocks

Backtesting result of all Trading Systems for few stocks.

I clicked on header of last column and so the result is shown in descending order of difference in profit when compared with Buy and Hold strategy. As it can be seen that there are different Trading Systems for different stocks to beat the buy-and-hold strategy. So, it is very useful to know which Trading System is useful for a given stock before executing a trade based on buy/sell signal from Indicator or Trading System.
Please also watch a short tutorial video for more info on backtesting.


Stockalyze Help Manual Home Stockalyze Help Manual