Standard vs Genetic

Previous Topic  Next Topic 

FxBTStation offers the standard method of optimization, as well as a proprietary method via a genetic algorithm. What's the difference? Let's first discuss optimization basics by defining a few terms.



Standard and Genetic Optimization


To further explain the difference between standard and genetic optimization let's discuss a few of the important results obtained from backtesting studies. In particular, we will consider the following:



On first impression it would appear that Net P/L is the most important feature of any trading strategy. If you had a strategy that produced profits of 300% in one year wouldn't you be happy? After all, most of us are trading for profit, the higher the better. However, as we will soon see, other statistics are also important. For example, assume our study results in the following:



Although the Net P/L shows a 300% return, take a look at the risk in which we put our account. This particular strategy run lost as many as 12 trades in a row, and more importantly had a max account drawdown of 90%. This means that we lost as much as 90% of our account balance at one point in the strategy run. This is very risky. In a situation such as this, having a positive Net P/L was probably pure luck. It should now be apparent that the standard method of optimization has its limitations, in that it sacrifices everything for the goal of a positive P/L. Now let's take a look at the genetic approach.


Genetic Optimization


Most of you are probably familiar with the basics behind genetics and the phrase - survival of the fittest. In particular, stronger genes prevail, while the weak ones do not. The end result being; a stronger organism, plant, animal, human, or in this case - forex robot. The exact premise exists with genetic optimization. As witnessed in the previous example there is more to optimization than just a high Net P/L. We have to look at what it took to obtain that P/L, namely, what risks were involved and is it realistic that the account would survive under such harsh risk conditions.


How does genetic optimization work?


Just as in nature, genetic optimization favors stronger genes. These genes are passed from one generation to the next resulting in a new, profitable species of robots. For this to occur we only need to define a hierarchy or genetic algorithm for our genes. In the case of forex autotrading we must consider both profit potential and risk characteristics. In particular, the following behavioral genes are available:



By assigning a weight of importance from 1 to 10 for each behavioral gene we will, in essence, have the ability to discover optimum parameters for any given strategy. For example, let's assign the weights as follows:


Note - a weight of 10 is the highest - most important. While a weight of 1 is the lowest - least important.



In the example above we have placed importance on risk factors such as; Average Loss and Consecutive Losses, while the Net P/L has a modest weight of 5. By doing this we are instructing our genetic algorithm to carry on robot species that display characteristics of low risk, but also with a reasonable profit return. Running an optimization session with the above produces results similar to:



Compare this to our first example. Notice the drastic decrease in risk factors such as Consecutive Losses and Max Account Drawdown? Even though our Net P/L is lower in this example, it is more likely that this strategy would prevail in the future. Why? Because we have included risk factors, rather than just sacrificing everything, even our hard earned equity for the chance of receiving a high Net P/L.

To find out how to apply various optimization methods read the next section.