Contents:
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. 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 "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. 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 backtesting would be TradingView:. Launched in , 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. Source: TradingView.
The data set that has been reserved is known as out-of-sample data. Comments Thanks for this back testing methodology. Using Other Tools to Backtest The method I have just outlined to backtest is super easy and does not need any other addons. A trader's next step is to apply the system to historical data that has not been used in the initial backtesting phase. For example, you can set the trading robot parameters so as to achieve maximum profit, to minimize risk and so on. This shows how small changes can quickly turn a winning strategy into a losing one.
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:. 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 the 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 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. 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. 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! 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. 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. 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.
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. Source: Forex Tester.
Among the best Forex trading software that are designed to achieve consistent profits, MT4 also allows you to backtest Forex strategies easily. 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. This Forex trading software is used to identify the profit and loss attributes of any system, to develop an effective trading strategy. Users are simply required to enter inputs such as:. The system then provides detailed results about the gross and net profit ratios.
Some of Profit Finder's key features include:. Aside from retail backtesting platforms like TradingView or MT4, there are also some institutional online Forex backtesting softwares to consider too:. 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 can simulate live trading environments with higher accuracy. Here are some examples:. 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:. It is also possible for users to evaluate, adjust, or increase the efficiency of the chosen parameters in a particular strategy. Useful statistics allow users to compare strategy results.
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. The best way to do this, is with a method called backtesting — where a strategy is assessed by simulating how it would have performed had you used it in the past. Now, there are already quite a few backtesting frameworks out there, but most of them require advanced knowledge of coding.
To fill this gap, I decided to create fastquant , with the goal of bringing backtesting to the mainstream by making it as simple as possible. With fastquant , we can backtest trading strategies with as few as 3 lines of code!
For the rest of this article, I will walk you through how to backtest a simple moving average crossover SMAC strategy through the historical data of Jollibee Food Corp. JFC from January 1, to January 1, Notice that we have columns corresponding to the date dt , and closing price close. JFC using the backtest function of fastquant.
For more information on how this works, please check out the explanation in one of my previous articles. You should see the final portfolio value below at the bottom of the logs. This value can be interpreted as how much money your portfolio would have been worth at the end of the backtesting period in this case January 1, The code below shows how we can perform all the steps above in just 3 lines of python:.
This shows how small changes can quickly turn a winning strategy into a losing one. In this case, the performance of our strategy actually improved! Our final portfolio value went up from PHP , to PHP , PHP 1, increase , after decreasing the slow period to 35, and keeping the fast period the same at The table below compares the performance of our 3 SMAC strategies:. Maybe not just yet. This means that the expected profitability of your strategy will not translate to actual profitability in the future when you decide to use it. The idea is that you hold out some data, that you only use once later when you want to assess the profitability of your trading strategy.
Look ahead bias. This is the bias that results from utilizing information during your backtest that would not have been available during the time period being tested. For example, you could be testing the effectiveness of a strategy on JFC that assumes that you would have known about its financial performance e. This would give you unreliable confidence in your strategy that could lose you a lot of money later. It pays to rigorously assess your strategy, and the information that has to be available for the strategy to be properly executed.
These are only 2 of the many limitations that come with backtesting. I do plan to write an article that discusses these in more detail in the future so stay tuned! But, if you want to have more pricing data points e. Note: This format feature should be stable for international stocks listed on Yahoo financ e.