Can a Computer Design a Trading System ? Part Five : Walking Carefully, The Five Main Problems of Genetic Programming

Recently within my “Can a Computer Design a Trading System ?” series of posts I have shared with you some of my achievements and developments within a Metatrader 4 based genetic programming framework. Through these series we have talked about the concept of genetic programming, genetic optimizations, the development of systems for Asian crosses, minors, etc. However today I want to focus on a different aspect of genetic programming which needs to be carefully examined in order to make sure that the results obtained hold validity. Within the following paragraphs I will be talking about the five main disadvantages of genetic programming and what needs to be done in order to prevent fatal errors which can cause us to choose and trade programs that simply will fail in the future.

When you use genetic programming in trading you give your program a given set of choices for exits and entries and the program then uses a random sample from these series in order to create different “systems” with the repetition of this process on the most successful “offspring” yielding more and more profitable systems until “breeding” does not improve system characteristics. However the above process is dangerous since it involves a wide variety of tests and a wide amount of freedom available to systems. From what I have experienced, these are the five major possible problems within genetic programming and some of what can be done to prevent them :

1. Untradable Inefficiencies : If you give your program enough freedom, the genetic framework will walk beyond what is reliable within the tester and it will start to exploit non-tradable market inefficiencies which are simply not exploitable in real life. When building a genetic framework you must be very careful so that the program cannot move beyond what can be obtained in reliable testing. For example allowing a program to test systems with TP values below 10 times the spread or extremely bad risk to reward ratios is a sure recipe to arrive at such very unsound solutions based on untradable inefficiencies.

2. Weird Occurrence Effect : Another problem is that your system may come up with a single, very specific solution to the testing problem from which small variations lead to much lower profits or even losses. When you see a system which has very high sensibility regarding its trading parameters, you have arrived at a curve-fitted solution which is just a “weird occurrence” within the overall system set. In order to prevent this you should evaluate systems not only through their own results but through the results of its immediate “system population space”. That is, systems around it should be similarly profitable in order to imply that the system is more robust. Avoiding “fine-grain” optimizations of less than 1% of each criteria is also VITAL to avoid this problem.

3. Asymmetric criteria : Another great problem is the finding of very profitable asymmetric criteria which exploit a given underlying aspect of a currency pair independent of the actual entry/exit logic. For example if you had only sold the USD/JPY randomly during the past 10 years, changes are you would have got some profit. This same effect is dangerously present in genetic frameworks when symmetry is not enforced. It therefore becomes absolutely VITAL to enforce symmetry and to restrict system solutions to those which have long and short symmetric entry and exit criteria.

4. The Dumb Programmer : When you make a genetic framework free enough to search for a conjunction of entry and exit criteria you finally arrive at a very complex system which you might not clearly understand. The dumb programmer effect is seen when the algorithm developed is not transparent enough to the programmer him or herself. You have indeed managed to create a black box whose soundness you totally ignore. You might think that this poses “no problem” as long as the strategy is profitable but it can in fact become very problematic as it will mine confidence in the system and another -yet more important effect – is the fact that you may develop an entirely similar system in the future which attempts to exploit the same thing (only you ignore it since the criteria is not very transparent to you). Being able to understand what a program does and being able to see why the inefficiency works is VITAL for success in trading, including the use of genetic programming frameworks.

5. Spreads and Entries : An important problem in genetic programming – which is only present when the framework is allowed to get picky over entry times – happens when the framework finds out that it can very efficiently exploit a market inefficiency around times when the spread is obviously higher. For example when you device a system that ends up trading at X time and – without realizing it – most of its profits come actually from entering right before NFP releases, the system has reached some result without realizing that in such hour spreads are usually much higher. For this reason it becomes important – if timing restrictions are given – to ensure that entries do not fall under hours in which important news for that pair or basket are usually released and -if so – ensure that profits do not come from the exploitation of these news releases with the assumption of unrealistic costs.

So as you see there are many ways in which you can use genetic frameworks the wrong way and come up with “holy grails” that will effectively give you meaningless results which will certainly not work under future market conditions. Developing symmetric systems with an overall surrounding population analysis taking into account the transparency of the system and the soundness of all of its entry and exit logic criteria is therefore critical for success. As always it comes down to the same thing : you need to understand what you are doing and do it correctly. Although genetic programming frameworks allow us to discover inefficiencies with a much smaller effort they are no replacement for our brain. Remember that computers do not solve problems, they execute solutions.

If you would like to learn more about my work in automated trading and how you too can design your own automated trading systems with sound risk and profit targets please consider joining, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach to automated trading in general . I hope you enjoyed this article ! :o)

Print Friendly, PDF & Email
You can leave a response, or trackback from your own site.

Leave a Reply

Subscribe to RSS Feed Follow me on Twitter!
Show Buttons
Hide Buttons