The Best Forex Backtesting Software
Reading time: 21 minutes
Forex backtesting software is a type of program that allows traders to test potential trading strategies using historical data. The software recreates the behaviour of trades and their reaction to a Forex trading strategy, and the resulting data can then be used to measure and optimise the effectiveness of a given strategy before applying it to real market conditions. Backtesting strategies work on the assumption that trades that have performed successfully in the past will perform well in the future.
In 1980, backtesting of a Forex system was a pretty straightforward concept. Traders would make their conscientious trades on charts, making the position either to 'buy' or 'sell'. Then, they would manually write exhaustive notes of their trade results in a log. Most of the trade ideas came from a profound understanding of fundamental analysis, or the awareness of market patterns. In the 1990s, a person was considered an 'investing innovator' if they were able to display data on a computer monitor.
The electronic process that allows us to check results online and gain confidence in our strategy today used to take months, even years, in the past. However, technological advancements have simplified the entire process for us. Since then, the process has continued to advance, but not always for the better. Those who apply diligence and common sense to backtesting trading strategies in Forex are usually in a better position to be rewarded with tremendous gains.
On the other hand, traders who only apply computing power and leave human logic out of the picture are likely to suffer huge losses. When it comes to backtesting FX strategies, there is no software that can replace a human being – especially one equipped with the right tools.
What is Backtesting?
Forex backtesting is a trading strategy that is based on historical data, where traders use past data to see how a strategy would have performed. The definition of a backtesting application is a set of technical rules applied to a set of historical price data, and the subsequent analysis of the returns that a Forex strategy would have generated over a specific period of time.
Why Should FX Traders Try Backtesting?
Back testing has a range of benefits for Forex traders, including:
- Strategic insight: The main benefit of Forex backtesting is that traders can determine whether their chosen strategies will deliver their expected returns.
- Practice: Backtesting can help traders spot trading opportunities by looking at past price movements and recurring patterns. In other words, it helps traders develop their technical analysis skills.
- Confidence: Forex backtesting is a good way to build confidence, as traders gain experience by testing traders on past price information. This helps build their confidence for when they start trading 'for real'.
Ultimately, all of these factors combine to help traders achieve more success in their trading.
So, how can you backtest? This is where Forex backtesting software comes into play.
What is a Backtest? And How Does a Backtester Work?
Forex trading strategies are applied to a set of price data, and trades are reconstructed using that data. This data can be used by traders to ascertain any unforeseen flaws in their current strategies. Alternatively, new strategies can also be tested before using them in the live markets.
Depending on the type of back testing software used in Forex trading, traders can get a wide range of indicators, such as:
- Total Return on Equity (ROE): Returns, expressed in terms of percentage of the total equity invested.
- Total Profit and Loss (P/L): Total profits and losses generated by a strategy, expressed as a percentage of the invested equity.
- Total Gain/Loss Ratio: The ratio of how many trades resulted in gains, and how many in losses.
- Annualised ROE: The total return likely to be generated by a Forex strategy over the entire calendar year.
- Volatility: What kind of market conditions were your strategies working in, uptrends, and downtrends.
- Risk-Adjusted Returns: Calculating your returns in relation to the risks involved within a strategy.
All these metrics provide you with insights about how your Forex trading strategies are performing.
Factors That Influence the Outcome of Backtesting Strategies
The best back-testing software in Forex depends on certain variables that can affect the outcome of the entire process. You should be aware of the following three factors that can alter the results of trading strategies:
- Data Quality and Source: The accuracy and reliability of price data is important in backtesting. It also has to be relative to your strategy. Remember that not all data is created equal in the OTC (over-the-counter) markets. Online Forex brokers and banks have different price data at the same point of time.
- Determinism: How will the results vary when the same strategy is applied on a data set several times? Backtesting strategies should be 100% deterministic. You should get similar results every time you backtest a Forex strategy for a defined data set. While this might be the ideal scenario, it doesn't always occur.
- Logic of Trade Execution: How logical and realistic is the trade logic that is embedded in the backtester? Backtests are never the perfect representation of the real markets. You will be missing important factors like slippage, latency, rejections or even re-quotes. It is also important to consider whether you are using bar data or tick data. Tick data can allow near perfect historic simulation of your data. This process is slower when including bar data. With bar data, for each time interval you receive 4 price points. The longer the time-frame, the more accurate the results will be.
Please note that even the best backtesting software cannot guarantee future profits. Infrequent liquidity is a frequent issue in the Forex markets. It is governed by various external factors and is very difficult to simulate.
How to Backtest a Trading Strategy
There is a range of backtesting software available in the market today. Each software type has its own way of evaluating Forex trading strategies. Forex backtesting can be broadly divided into two categories – manual and automated.
Trading with a Demo Account
Trader's also have the ability to trade risk-free with a demo trading account. This means that traders can avoid putting their capital at risk, and they can choose when they wish to move to the live markets. For instance, Admiral Markets' demo trading account enables traders to gain access to the latest real-time market data, the ability to trade with virtual currency, and access to the latest trading insights from expert traders.
To open your FREE demo trading account, click the banner below!
Manual Backtesting Strategies
This involves a fair amount of work, but it is possible. In manual Forex backtesting, you just take the historical data and step through it. A charting tool will help you to go bar by bar, so that you can observe the price action and subsequent performance metrics along the way. The advantages of manual backtesting include:
- The fact that it can be performed by anyone.
- That as you execute every trade, you will develop an understanding of how your Forex trading software works. You will know what can be improved and you can even develop an automated strategy later on.
- Manual back-testing simulates live trading mechanisms, such as entering or exiting a trade, risk management, etc.
Manual backtesting methods can be a good way to start before you proceed to use automated software. Using an excel spreadsheet for backtesting Forex strategies is a common method in this type of backtesting.
How to Backtest a Trading Strategy Using Excel
Many traders believe that one shouldn't have to be a programmer or an engineer to backtest a strategy. This method takes us back to the very basics, which anyone can use. Spreadsheet programmes such as Excel are among the best ways to backtest Forex trading strategies for free. You need a publicly available source of data, such as 'date/time', 'open', 'high', 'low', 'close' or 'prices'. The time component is essential if you are testing intraday Forex strategies. To get the data, you can simply go to Yahoo Finance or Google Finance.
In the field "Enter Symbol/Company Name," fill in the symbol for the currency you want to see the data for. In the "Quotes" field, you will find the option to get historical prices for the symbol. Enter the date range here. Scroll down to the end of the page and click "Download to Spreadsheet". Use the "Sort" option in Excel's data menu to prepare the data. Here's a look at one way to find the day of the week that provided the best returns. Suppose, our strategy is "buy the open" and "sell the close."
- Column A - Date Column
- Column B - Open Price
- Column C - Close Price
Now comes the tricky aspect of using the formula that will provide the best results:
- In Column D, we use this formula: = IF(WEEKDAY($A2,2)=D$1,$C2-$B2,""). This formula has to be copied across all columns from D to H.
- ($C2-$B2) – Close Price minus Open price; the true part of the statement that gives us the profit/loss.
- (") – The False part of the statement, in the form of double quotes, which doesn't give any result if the day of the week is unmatched.
What the formula means is that if the day of the week (converted to a number between 1 to 5, which matches Monday to Friday) is the same as the days of the week in the first row of this column (D$1) then you will see the result accordingly. You can also choose to include average and sum functions at the bottom of the "Weekday" column to find the most profitable day to implement this strategy over the long term.
This is a strategy for backtesting using the manual option. You can use many expressions and conditional formulae like this for testing Forex strategies. However, this method is tedious and time-consuming. One software that would be ideal for manual back testing would be TradingView:
Backtesting on TradingView
Launched in 2011, the TradingView platform is a good option for free Forex backtesting software. This Forex trader software is best known for its advanced charting tools. Real-time data and browser-based charts make research from anywhere possible, since there is nothing to install, and no complex setups to be taken care of. It is a social platform, where you can even share, watch or collaborate with other traders and publish your strategies on social media profiles like Twitter or blogs. One of the most useful tools for backtesting on this platform is the Bar Replay Feature.
To use it, follow these steps:
- Turn on Bar Replay: Use the icon on the toolbar at the top of the screen.
- Adjust Settings: A new toolbar will appear on your active chart, and a vertical red line will appear where the cursor is. This red line marks the area where the replay begins. Scroll back to the point from where you want it to start.
- Click the Play Button: Click on the chart once to get into replay mode; then click on the play button so that the replay can start.
Source: TradingView - Bar Replay Feature
The playback feature is a great tool to understand what the charts looked like on a certain day, before you applied a certain strategy. However, the currency pairs that you test need to have enough historical data available for them. There are certain limitations of TradingView that you should also be aware of, such as:
- The fact that there is no option to use Japanese Candlestick Charts
- The fact that the 'Continuous Futures' chart doesn't work with 'Bar Replay'
- There is limited historical data on some chart options
- Demo orders cannot be created in this mode
Automated Backtesting Strategies
Automated backtesting involves the creation of programmes that can automatically enter and exit trades on your behalf. These programmes can be obtained free of cost online, although premium versions are available for purchase as well. One of the primary advantages of these tools is that they remove emotions from your trading activities. Many traders often use these tools on copy trading strategies to enhance chances of success.
However, keep note that your programme has to match up to your personality and risk profile. Also, not all trading methods can be used with automated strategies.
Both MetaTrader 4 (MT4) and MetaTrader 5 (MT5) offer automated backtesting tools. Both MT4 and MT5 are proven and secure electronic trading platforms; popular choices for trading the financial markets. The indicator-rich MetaTrader 4 Supreme Edition plugin is the preferred option, owing to the additional features included that enhance the trader's experience. MetaTrader 4 is popular for FX backtesting because of its in-built 'Strategy Tester' feature.
Backtesting on MetaTrader
The MT4 platform contains a 'Forex Simulator' that allows traders to rewind the time on their charts and replay the markets on any particular day. Orders can be placed, modified, and closed just like one would do under live trading conditions. Compared to Demo trading and other forms of Forex paper trading, trading on historical data can save a lot of time. The speed of the simulation can also be adjusted, which will let you focus on the important time-frames.
In addition, you can boost the trading capabilities of your MetaTrader platform by downloading the MetaTrader Supreme Edition plugin for FREE! This excellent plugin enhances your trading experience by providing access to technical analysis from Trading Central, real-time trading news, global opinion widgets, trading insights from experts, advanced charting capabilities, and so much more! Click the banner below to download it for FREE!
How to Backtest on MT4
Features of Free FX Simulator/ Strategy Tester on MT4
After you download MT4, you need to open the main menu and go to the "View" section where you will find the "Strategy Tester" option. Alternatively, you can press CTRL+R on the keyboard, and press the 'tester' button.
Source: MetaTrader 4 Supreme Edition (MT4SE) - Live Symbol Information Indicator
Some of the key features of the Strategy Tester are:
- It is one of most popular trading simulators, combining the charting tools of MT4, quality tick-by-tick data, and an economic calendar. This can be ideally used for backtesting trading strategies on the platform.
- Offline charts can be used along with indicators, templates, and drawing tools.
- You can download high-quality tick data from external sources. You can access almost 10 years of real tick data with variable spreads.
- This strategy tester can be downloaded from MT4, to be used as a free Forex trading simulator app for Forex trading practice on Mac devices too.
- Multiple chart frames can be opened in one place.
- Important news releases can be tracked during simulation, through the economic calendar.
- This trading simulator allows access to all in-built and custom indicators on MT4.
- Simulation can be saved to a file to be accessed later on. Every chart is equipped with a button that allows you to move back bar by bar. Everything including trades, pending orders, stop losses, take profits, trailing stops, and account statistics can be restored. You can also save your trading history in excel sheets for in-depth analysis.
- You can continue simulation on oil stocks and major stock indices too, away from all major Forex pairs.
Source: MetaTrader 4 - Examples of Charts
This Forex simulation software is one of the best ways to backtest Forex trading strategies, both offline and online. By default, it is locked in demo mode. Reports on EA ( Expert Advisor) testing results have been significantly upgraded on MT4 recently.
Traders can now analyse ratios such as the Sharpe ratio, the recovery factor, position holding times, and many other characteristics, over 40 different characteristics can be analysed in the 'Strategy Tester' report. There are also balance and equity graphs that can ascertain the time distribution of profit/loss and positions taken over the course of weeks, months, and even years.
Forex Tester on Metatrader 4
Another popular forex strategy backtesting option on MT4 is 'Forex Tester'. Unlike Strategy Tester, Forex Tester is not free, and can be used both for manual and automated trading activities. This automated backtesting software provides traders with pre-formed strategies. It has 10 manual programs and 5 expert advisors, along with 16 years of historical price data, and a risk calculation and money management table.
Features of Forex Tester
- Five price-action based EAs, along with detailed instructions.
- 10 simple manual trading strategies to gain backtesting experience.
- Forex money management table that can be downloaded on Excel.
- Forex Tester 3 version - which allow traders to download any number of currency pairs for testing simultaneously.
- Both Forex Tester 2 and 3 software have pre-set hotkeys for every function that speeds up the Forex training time.
- Graphic tools such as Lines, waves, Fibonacci, and shapes for analysis and chart markup.
- Forex 3 simulator software can be used on multiple monitors at simultaneously. It also allows instantaneous correction of mistakes.
Source: Forex Tester
Among the best Forex trading software that are designed to achieve consistent profits, MT4 is also allows you to backtest Forex strategies in an easy manner. After importing the historical data, you can simply click on "Start Test" to commence backtesting strategies. The "Start Test" button will change into "Stop Test" automatically.
You will immediately see the moving bars on the chart. Test your strategies by placing orders, and see how they perform in the market. You can change the speed or even draw new bars to control the time-frame. In case you want to pause and analyse, press the "Pause" button. Forex Tester allows programming of new back-testing strategies in languages like 'C++' and 'Delphi'.
Profit Finder – NinjaTrader Backtesting Software
This Forex trading software is used to identify the profit and loss attributes of any system, in order to develop an effective trading strategy. Users are simply required to enter inputs like account size, ideal entries and exits, trailing stops, take-profit levels, back-testing hours, profit targets, slippage, and more, while the system provides detailed results about the gross and net profit ratios. Some of Profit Finder's key features include:
- It works on any instrument, strategy, and technical indicator
- It reads the entries and exits of a trade automatically
- It performs a wide range of complex calculations within a matter of seconds
- It provides useful and reliable details about the effectiveness of trading strategies, indicators used and data quality
- It calculates the profit and loss levels of every position
Aside from retail backtesting platforms like TradingView or MT4, there are also some institutional online Forex backtesting softwares to consider too:
Institutional Grade Backtesting Software
Proprietary trading houses, hedge funds and family businesses often use institutional backtesting software. Such software is available for use only after the license to do so has been purchased by the user.
Although considered expensive, they do offer a complete solution package for data collection, historical backtesting, Forex strategy testing and live execution of high-frequency level strategies across various instruments. Since such systems are event-driven, the backtesting environment they provide is able to simulate live trading environments with higher accuracy. Here are some examples:
QuantOffice by Deltix is used for visual development, back-testing and debugging of integrated EMS strategies, using Dot Net and C#. Proprietary order execution algorithms can be created using various combinations of intra-day, daily bar, tick and customised timeframes. Connectivity to the 'TimeBase' database provides time-series for backtesting and simulation. Some of its standout features are:
- Complex Event Processing (CEP) - which is enabled through its connection to the TimeBase database. 'OnBarClose', 'OnBarOpen' and 'OnTick' events can be sourced to create complex events for testing purposes
- Rapid Visual Analysis - can be performed at all instrument and portfolio levels. Extraordinary charting capabilities, rapid display of trading outputs like indicators, trading signals, orders, executions, and P&L can lead to faster evaluation and re-running of strategies. Years of tick-data can be backtested within mere seconds for a wide range of instruments.
- Operation run-times of models in backtesting are incredibly fast. The system can pre-load events from TimeBase into its memory cache, which speeds up the overall process.
- More complex techniques can be used in the creation of customised time-based bars. These bars are stored in real-time on TimeBase, to be accessed in real-time.
- It supports optimisation of parametres using genetic, dynamic, and brute-force mechanisms.
- Strategies can be further categorised into sub-strategies of meta-strategies. Dynamic optimisation can further control if sub-strategies should be triggered or not.
- Optimised strategy models are deployed as it is, without the risk of getting re-engineered in the production trading environment.
- The QuantOffice Forex trade simulator allows precise control of trade assumptions. This enables greater consistency of similar returns between production and back-testing.
- Users can create their own models using C# or integrate existing ones in C++ into the QuantOffice environment.
QuantDEVELOPER by QuantHouse
Institution-grade software 'QuantDEVELOPER' allows users to create, optimise, back-test and launch quantitative strategies that can be further executed in live-trading environments. It is also possible for users to evaluate, adjust, or increase the efficiency of the chosen parametres in a particular strategy. Useful statistics allow users to compare strategy results.
Some of the key features of this software are:
- Its in-built low latency market data adapter
- Its predefined set of components for strategy designing
- It allows multiple sub-strategies to run under one meta-strategy
- No scripting is required
- It has the ability to test multi-asset classes and multiple currency accounting systems
- It possesses the capability to test more than 500,000+ ticks per seconds
- It contains event-driven backtesting
- It has an extensive technical indicator library
- There is support for multiple timeframes, auto-execution, and a one-click switch from simulation mode to live-trading mode
- System backtesting is available at all portfolio levels
Things to Keep in Mind When Using Automated Backtesting Strategies
- Learn the exact parametres of the trading system, so that you know when it would stop
- You will still need to check the system on a regular basis, even though it is automated, in case the market conditions have changed
- It is suitable for longer time period, only if it suits your risk tolerance levels
- There are no guarantees that your backtesting method will work in live trading. Like manual strategies, they too have to be forward tested
- You have to understand a fair bit about coding. One misplaced punctuation in the code and your strategy can backfire
- Automated backtesting methods do not work well for all trading plans
- Curve fitting methods often fail in live trading environments
Whichever strategy you choose, analysis of your strategies will require competent Excel skills.
How Does Online Forex Backtesting Help?
- You can practice Forex trading strategies even when the markets remain closed. Compared with live trading, this is a useful way to sharpen your skills. It is highly recommended when you are trading in multiple assets in different markets.
- You will gain confidence regarding your strategies. When you understand how your system works, how often it wins, and what its drawbacks are, you will be in an better position to trigger trades. You will know when to stop too.
It is best to open an account with a broker authorised and regulated by the Financial Conduct Authority (FCA) and covered by MiFID, so that you can have real backtested results, when you start trading on live forex accounts.
Moreover, did you know that you can also download the MetaTrader Supreme Edition plugin for MetaTrader 5? Click the banner below to receive your FREE MetaTrader 5 Supreme Edition download!
About Admiral Markets
Admiral Markets is a multi-award winning, globally regulated Forex and CFD broker, offering trading on over 8,000 financial instruments via the world's most popular trading platforms: MetaTrader 4 and MetaTrader 5. Start trading today!
This material does not contain and should not be construed as containing investment advice, investment recommendations, an offer of or solicitation for any transactions in financial instruments. Please note that such trading analysis is not a reliable indicator for any current or future performance, as circumstances may change over time. Before making any investment decisions, you should seek advice from independent financial advisors to ensure you understand the risks.