I have Norgate data and Amibroker but I am not getting the same backtest results that you show on your courses?
Thanks for this question. This is a common issue so I will respond with some of the main reasons why your backtest results may be different to mine.
#1. It’s unlikely that your results will be identical
The first thing to say is that even if you have the same database and backtesting program it’s highly unlikely that you will achieve identical results to what is shown on the course.
This is because the data has probably changed since the backtest was run. Norgate periodically updates the data to clean it and fix small errors. This is primarily not an issue but it does mean you are likely to see small variances in system results. You should only worry if the results are significantly different.
#2. Wrong data source
This is the most common reason I get why the results are different. If you are using a different data source then you are unlikely to get the same results.
Please note that Norgate Premium and Norgate Data (the subscription) are not the same product. I use Norgate Data because it contains watchlists of historical constituents (delisted and merged stocks) so if you are not enrolled in this subscription your results will often be different. Also make sure the database is installed correctly and has been updated recently.
#3. Adjustments and dividends
Another reason why your results might differ is if you have different database settings for price adjustments and dividends. This can drastically affect the price and subsequent trade results. Mine are set up as below:
These can be changed in Amibroker/File/Database Settings/Configure
#4. Wrong timeframe or watchlist
Often, the reason the results are different is because you did not select the right watchlist or timeframe. Most of our strategies are daily but some are weekly or monthly. Make sure to select the right timeframe and watchlist when you run the system.
#5. Wrong date range
Another simple reason might be that you set the wrong date range for the backtest. Note that the date range in Amibroker is set as MM/DD/YYYY format.
#6. Wrong backtester settings
The Amibroker backtester settings are shown by clicking the spanner icon in Amibroker and these settings contain lots of options and tick boxes that can affect a backtest run.
My settings are usually set up as follows:
If you get different simulation results try going through to see which ones make a difference.
A common issue is found in the portfolio tab.
If you do not tick the box that says ‘disable trade size limit when volume is zero’ then you will not get any trade results when backtesting securities with no volume. For example many forex markets and mutual funds.
You must also set a trade size in relation to the bar volume since. it is unrealistic to backtest a system where your trade size is a significant % of the volume because you would affect the price. I will set this to no larger than 10.
#7. Ticker symbol missing
Sometimes I will use alternative data sources and tickers in the code, for example using a foreign symbol as a market timing filter.
In order to get the same results you will need to import this data first so that it is part of your database then the provided code works correctly.
#8. Formatting issues
Sometimes there is an issue caused by downloading AFL files or by using copy/paste. Pay particular attention to speech marks which seem to take on a different format sometimes when they are pasted from online.
Go through the code to make sure it looks the same as it is shown in the course.
#9. Unofficial Amibroker version
Sometimes I have experienced different backtest results when running new beta versions of Amibroker. I recommend using only the latest official Amibroker release to run the systems and not beta versions.
#10. Miscellaneous issues and indicator problems
Sometimes you may get some strange results and indicator problems for no apparent reason. Often a simple restart of Amibroker or Norgate plugin or your computer does the job to get things fixed.
Other times you may have to do some digging to find out if the indicator is working correctly. Using the debugger and the exploration feature are extremely useful to find out if the system is working as it should.