This is the next article on how to make our own trading system. We already know that a trading system must be like a suit: it must adapt to us; we also know that it is recommended to risk, at most, 1% -2% of all our capital per transaction. Today we are going to show how to determine if a strategy is good or not. For that, we are going to present a basic Forex backtesting guide.
Why is it so important to backtest a trading strategy?
- Because it allows the trader to have “some statistical CERTAINTY” with respect to the trading system he uses and the efficiency of it, especially with the possibility of success when opening and closing a position.
- Because it will reduce your FEARS when entering the market with the system.
- Because any trader at the moment of trading in Forex need TRUST (believe me, you need a lot of confidence), in your method, knowing that anything can happen in the market and often in the less expected moments.
- Because Forex traders are not FORTUNE TELLERS. Do not try to play the casino with your account and trade on instinct or hunch. To use a duly proven method is to be RESPONSIBLE and that is precisely that, a basic quality that a trader must have.
What is the backtesting?
The backtest consists in performing a simulation of trades using real market data in order to analyze its theoretical performance. It is a practice in which a trading strategy is tested using data from the past to see its effectiveness.
When the strategy is good, the capital that has been invested is increased. With modern backtesting programs for Forex trading systems, you can evaluate various combinations of parameters and thus select the one that shows the best performance.
Now, although the strategy has proven to be successful in backtesting, it does not imply that it will be as successful in the future. This is why Forex can be frustrating and interesting at the same time, because every day you have to relearn and reinvent yourself if the strategy applied is not causing any effect.
Forex backtesting guide – Basic process steps
Choose a trading strategy that suites your personality and goals
How do we enter the market? Do we enter when the price crosses a 20-period moving average? Or when two moving averages cross each other? Or do we open the position when the RSI is above 70 in the time frame H4 and the MACD is above the zero level in the time frame H1?
As you can see, there are thousands of ways to enter the market and other ways to get out. I have even seen trading books authors who have tried strategies with random entries and the system was a winner! As we saw in the post (Forex money management), the mathematical expectation of these systems was positive.
The first thing we should do is choose a strategy. For this we must answer these questions:
- How and when should I enter the market? Using moving average crosses, indicators, etc …
- How much am I willing to lose? Where we place the Stop Loss.
- How do I manage the position, that is,should I put a Trailing Stop, or a fixed Stop Loss?
- How do I manage the benefits, that is, should I put a Take Profit, or move the Stop Loss with the market or follow the benefits with a Trailing Stop?
- How and when should I close the position and leave the market? Should I wait for the Stop Loss to be triggered or wait for an additional indicator to tell me to close, or wait for some other signal?
Once these questions are answered, we must move on to the next phase of this Forex backtesting guide.
Execution of the backtesting
The backtesting process can be done in two different ways:
- Manual Backtesting: also known as paper trading, which consists of analyzing past price charts and simulating transactions with the data presented, so that we record pips the pips won, the pips lost, and according to our monetary management, the capital losses and earnings. In other words, it is based on the manual simulation of our strategy without using any software.
- Advantages: The manual backtest has the advantage that the trader learns to master the strategy.
- Disadvantages: it is to slow and it is very difficult to optimize afterwards.
- Automatic Backtesting: First we program our strategy on our computer through a backtesting program, and once this step is done, we backtest with past price data. In this case, the strategy tester will tell us the pips earned, the pips lost and the capital we earn on average, among other performance data. It is the most recommended option. The Metatrader 4 platform offers a well-used backtesting tool.
- Advantages: Depending on the power of the computer in which the test is performed, we can test a strategy in different time periods, different markets, in a very short time. Another advantage is that we can optimize the system very quickly. In addition, backtesting programs offer multiple system performance statistics.
- Disadvantages: Do you get along well with some programming language like MQL4 of Metatrader 4? You have to know how to program to test your strategies, or have someone do the tests for you. Another negative point of the automatic backtesting, is the possibility that the strategy ends up over optimized, that is, to make a strategy that only works very well in a determined period (the backtested period) and that is not able to obtain good results in the future.
Based on the above information, in this Forex backtesting guide we recommend the use of automated backtesting because it is faster and there are excellent software packages nowadays, including free options such as those offered by platforms like Metatrader and cTrader.
It is done through a backtesting software for Forex in which the simulated transactions are opened and closed automatically. These programs are based on technical algorithms that perform the opening and closing of the operations for you when certain established technical conditions are met, such as when there is a bullish or bearish crossing of two moving averages.
Previously, you had to buy the program or create it, which involved making an investment of money. Now, platforms like Metatrader 4 have this tool, although there are paid programs that are better. It is a tool that facilitates things, however if you want to gain true experience in trading, the ideal is to practice with your strategy using a demo account, so that you learn to detect the effectiveness of your strategies.The backtesting tests are done to see the effectiveness of the system, but in the end nothing replaces the practice, especially if the trading system has many rules.
Later on we will publish a Forex backtesting guide for Metatrader 4 and cTrader users.
- With the results of the backtest, we can determine if the mathematical expectation of our system is positive (potential winner) or negative.
- We must evaluate our strategy, as far as possible, with the same conditions with which we will trading in a real account. In this way we adapt to the platform and learn to really use the system.
- When doing a backtest, in the test a minimum of operations must be completed. Minimum 200-300 trades. Why so many? With this amount we are ensuring that the test sample is reliable and the results are not coincidences.
- In case of doing a manual backtesting, better subtract two or three pips per trade. It is better to have normal results in the test and not have false expectations. It is always better to prepare for the worst.
- On the other hand, if we are performing an automatic backtesting, if we can, we must test the strategy with a high spread.