In this article you will find comprehensive information about the proprietary Tradeworks backtesting engine including details about what it is, how it works and how you can use it to help you improve your trading results.
You may also want to read our blog post: "A short guide to Backtesting forex trading strategies" to learn how to best implement backtesting in your regular trading routine.
If at any point you wish to contribute to our future development tasks and vote for your preferred improvements to the backtester, please visit our feedback area cast your vote or just create your own request.
What is backtesting?
The activity of backtesting is basically the application of historical data to a given set of rules (a trading strategy) and thereby reconstructing the trades that would have resulted from the given strategy. Based on an analysis of the results, the likely historical profitability and overall performance of the strategy can be estimated for a certain time period. Under the assumption that certain market trends a times have a tendency to repeat themselves, traders can use this data to tweak and optimize their strategies in order to become sufficiently confident that the startegy stands a good chance of delivering good returns when activated in a live environment.
Many forex brokers and banks offer some sort of backtesting feature and the level of quality is fairly random hence it is always a good idea to do a little bit of research before you choose which backtester you wish to use.
Good news! Given that you are reading this article you are already on your way to reach a better understanding about what backtesting is all about.
Three topics to be aware of
We believe that the three most important things to look at when evaluating a backtester are:
- Data set and quality of data
- Trade execution
In OTC markets, not all data is created equal. Online forex brokers and banks will often have slightly different prices hovering around an almost identical midpoint. As the brokers internal systems and client-base are not identical this is to be expected. Tradeworks procures data for our backtester from reputable third-party sources. However, even though the data set is of high quality, it may vary slightly from the prices your broker would have provided during the period you are testing.
A backtest is NEVER a perfect representation of the real world. In backtests you don't suffer from slippage, latency, rejections and re-quotes. But there is more than this. If you do not have access to backtest on tick data, the design of the trade logic in the backtester becomes extremely important. For example, if you are backtesting on bar-data (meaning for each time interval in your test you have 4 price points) at which price can you expect to reach your stop limit order?
Finally, as a general comment, we believe a backtester should be 100% deterministic. This simply means that if you run the same strategy throught the backtest several times, on the same time series, you should expect identical results. Backtests are not guessing or estimates. Backtesting is running a series of numbers through a given set of logic, where you have time to "do the math" properly!
Bar data vs. tick data
Tradeworks allows you to select the data (timeframe) you want to run your backtest on.
So, let's compare testing on M1 data and M30 data, what does this mean? As an example if your strategy is trading on 30 minute time frame, a normal backtest on M30 bars would mean you had 4 price points covering those 30 minutes (open, high, low, close). With M1 data you test on 4 price points per minute equal to 120 price points during the 30 minutes. Your test data is therefore a lot more granular, and may potentially provide a much more realistic test than a normal bar test. In exchange it is also slower to process.
On the other hand, using tick data (which is not supported in Tradeworks), which allows for a perfect historic simulation of your strategy, will be significantly slower. Just imagine the number of ticks during 30 minutes over non-farm-payroll. You can easily see between 3-5 ticks per second over 30 minutes equal to 7-8,000 ticks, which would severely prolong the backtest.
When comparing the speed of the backtest with the precision, we believe this is a good setup.
NOTICE: With Tradeworks, Stop Loss and Take Profit levels are always executed at the exact value irrespectively of the time frame you test your strategy on.
We currently support all standard technical indicators found in MT4. If you would like us to support a specific custom indicator please contact firstname.lastname@example.org.
Current feature limitations
At this stage we support backtesting on 17 of the most traded currencies, metals and Indexes: EURUSD, EURJPY, USDJPY, EURGBP, GBPUSD, AUSUSD, USDCHF, USDCAD, EURCHF, GBPCHF, GBPJPY, NZDUSD,XAUUSD, XAGUSD, HK33HKD, SP500USD and DAX30EUR.
In the future we are considering adding the ability to calculate commissions outside the spread.
Margin/leverage is hard coded at 2% or 50:1. This really only has an impact if your strategy uses the maximum exposure money management rule.
Variable trade size rule is NOT supported at this time, and "Stop outs" (where the required margin is higher than your simulated equity and the broker forces a close of all positions) are also not included.
Finally, at this stage all backtests are performed on simulated accounts with the base currency of the symbol as account currency. As brokers usually charge a fee to convert your profit and loss to your account currency this means your backtest will be slightly overstated if your account currency is different from the tested base currency.