Home Beginners Forex Education Forex Basic Strategies Master the Art Of Forex Backtesting With These Key Tips

Master the Art Of Forex Backtesting With These Key Tips

80
0

Let’s talk about the results of our trading strategies. And if we talk about results we’re going to have to talk about backtesting when we trade forex. Here we go!

Backtesting is simply the bedrock of statistics or the behavior of our trading strategies in the past. It’s kind of like going back and watching what would have happened. In it we can observe the yield curve and statistics associated with our operation as can be the number of winning trades, losers, how much you win when you win, and how much you lose when you lose, in short, is a scan of our trading strategy.

What Good is Backtesting?

Backtesting is not a guarantee of anything, but it is a sign that What you’re doing is either good or no good. You avoid wasting time with strategies that are clearly losers. I’m very surprised that there are people putting their money into something that they don’t even want to know with numbers whether it works or not. That what you do makes sense doesn’t make it profitable. You can only tell if it is if you have the results to contrast it.

How Does a Backtester Work?

A backtester is nothing other than a tool to check how good or bad a strategy is. There are many platforms to backtest our trading systems, the most popular is the Metatrader (I don’t say the best, I mean the most popular).

A backtester at the end what it does is that through the historical data of the asset in question where you want to trade and the entry and exit rules of the strategy it computes the results in each operation, the time of entry and exit. It’s kind of like taking a pen and paper and doing it manually, but much more precisely.

In fact, I do not recommend you to do a backtest by hand since you can cheat yourself or just make mistakes in the computation, something that is more complex to happen with a computer program.

Why is Backtesting So Important?

One thing is clear, past results do not guarantee future results. But if on top of the past results of the trading methodology we are applying it is a disaster. or worse, we don’t know if it’s a disaster or not and we carry it out because I’ve been told it works or I explain it to a person who knows a lot, you can hit it, but fine.

Trading without looking at a backtest is like driving without knowing if the brakes and accelerator work well in the car you’re going to ride. Operate manually or automatically do at least one test of what you’re doing or you’ll be rolling the dice.

How to Perform Forex Backtesting?

Carrying out a backtest on Forex is very simple. Yes, if we have our automated strategy. Otherwise, you’ll have no choice but to by hand as I said before, roll up and learn some programming or hire someone to automate it. It is not usually very expensive, you can get worse to apply it without knowing how it goes and lose money.

If you have an already automated strategy you have almost everything done. You simply need the data of the broker where you are going to execute it and execute it. Normally, it takes minutes or even seconds to get all the results.

Winning Strategies When Backtesting

There are many criteria you can obtain to evaluate if your trading strategy is really profitable. These criteria are statistics of our system to evaluate it and to know if it is valid or not. We go with the most common statistics or ratios:

Net Balance: The net profit of a trading system is the profit less the losses. The more net profit, the better for our trading system.

Return/Drawdown: It is the result of dividing the profitability obtained by its drawdown (it is the biggest consecutive loss streak suffered by the system).

Making the quotient of both turns us into a proportion that is quite interesting because if for example, the result of the division is 3, we can interpret this for a risk level of 1 we have a return of 3 (in this case in percentage).

System quality number (SQN): The SQN measures the relationship between mathematical hope and the standard deviation of a multiple distribution of R generated by a trading system. To be able to continue talking about SQN we must therefore define that it is a multiple of R: it is the relationship between the profit obtained and the risk assumed per operation. Thus, if in a transaction we obtain a profit of 500 € and we have risked 250 € (the loss we would have obtained for example if we had skipped the stop loss), our multiple of R would be 500/250 = 2.

The idea is fine, but we need some reference to be able to assess these figures and decide if a system is good or not. For this purpose the following scale is proposed:

  • 1.6 – 1.9 Lower than normal, but can be operated
  • 2.0 – 2.4 On average
  • 2.5 – 2.9 Good
  • 3.0 – 5.0 Excellent
  • 5.1 – 6.9 Superb
  • > 7.0 Perfection

Win/Loss Ratio: It is simply based on dividing the number of winning trades among the losing trades. It doesn’t take into account how much you win when you win and how much you lose when you lose, so it leaves out a lot of important information.

Sharpe Ratio: This ratio is one of the best known in the financial world. To build it we will need the profitability obtained by the system and its risk. Being the risk with the standard deviation. Assesses the excess profit of a given investment above its risk. The higher the Sharpe ratio, the better the return on the risk taken on the investment.

Profit Factor: It’s another fairly used indicator. Their calculation is very simple: it is a matter of dividing the total earned in positive transactions by the total lost in loss transactions. If the system we are using is profitable it must obviously have a profit factor greater than 1, since the profit will be greater than the loss. The idea is to have a profit factor greater than 2, being 3 something very difficult to find. Similarly, a system with a profit factor of 1.6 can already be enough to say that we have a good strategy.

Profit: The latter criterion is based on taking into account the benefit only the gross benefit obtained by the system.

Balance Line Stability: It is a round number between 0 and 100. The higher the stability of the balance line, the better. A level equal to 100 means that the balance is a straight line (only possible if there are 0 or 1 trades) Anyway, any value above 90 is good.

R Squared: The coefficient of determination or R2 is used in the context of statistical models whose main objective is the prediction of future results based on other related information.

The R2 value is a number between 0 and 1 and describes how well a regression line fits a data set. When the value of R2 is close to 1, this indicates that the regression line fits the data very well, while a value of R2 close to 0 indicates that the regression line we see does not resemble in any way the data. The higher the value of R2, the better the capital curve of the trading system. A very high R2 value should result in a profitable trading system with little drawdown.

Stagnation: Stagnation is a long period of time with little or no growth in the capital curve of a trading system. We will try to keep the stagnation as low as possible. Basically, at a glance, you will be able to observe in the graph of results how your curve behaves.

The Best Software for Backtesting

The best software for backtesting can be Python, Tradestation, or Matlab. However, they are not usually simple if you are starting out and not part of a programming level and that is why they use platforms that are usually much simpler such as Metatrader. MetaTrader is not usually too accurate of course, but it is more than anything and it is not wrong if you take the data from your broker where you are going to apply it with real money.

Advantages of Backtesting

The advantages are obvious and we have already mentioned them throughout this article. But to sum up:

-Information about our trading strategy.

-Possibility to optimize the variables of your strategy.

-Configure broker conditions such as swaps and spreads to see how they affect.

-Avoid deploying losing systems.

-Psychological advantages of having information about the behavior of our systems such as trust and the elimination of doubts.

Disadvantages of Forex Backtesting

The main disadvantage when doing backtesting and specifically on Forex is that it is difficult to do it with a precision that comes close to reality. Having a realistic backtest is fundamental and with few tools, we can do so. Another disadvantage is that, like everything, you need the knowledge to carry it out. And so far all aspects related to backtesting of trading strategies. As you have seen, it is very worthwhile and should become a must for you from now on if it is not yet.

LEAVE A REPLY

Please enter your comment!
Please enter your name here