G.P.F.

Home
NEW:
US Markets Daily 
The G.P.F., is as its name entails, a pattern finder, a pattern being a recurrent market behaviour like for instance in our case :
Despite its apparent simplicity, this is a nonlinear indicator, which works well in many trending or rangebound markets. A G.P.F. pattern is a logical condition or a set of logical conditions from which one can derive a trading signal. The signal or indicator is therefore a boolean, i.e. when the market conditions conform the pattern, the signal is on, otherwise off. Patterns are the essence of trading. All traders have heard of the "Buy on 3 consecutive up closes". It is unlikely that many traders have ever managed to consistently make money on that particular one, but the principle here developed is very similar. There are winning patterns like the one above for instance, if only one could detect them easily. The Genetic Pattern Finder has been designed for that purpose. The Genetic Pattern Finder is also very simple to use. Once data is loaded, a pattern detection process using the default settings should already give near optimal results. Result analysis will provide you with a visualization of the signal statistical distribution, as well as fully described trading signals written in an EasyLanguagelike format (TradeStation™). While you may be using another charting or trading program, the syntax used is very easy to understand so that it can adapt to any similar software. Please note however that the pattern description may be more complex if you use additional G.P.F. filters and the above pattern description may not suffice. Interfaces for TradeStation and NeuroShell Trader are available. For simplicity, results are all recorded in the same Microsoft Excel file. By essence, the signals generated by G.P.F. are shortterm entry or exit signals. While "Buy' signals are usually used to enter into a Long position, a "Sell" signal can also be construed as a "ExitLong" exit signal, or a short entry position. Signals should however not be construed as an actual trading system. It is still up to the user to build his or her own trading system according to his or her own return expectations and risk profile. Ultimately, all traders know that success depends mainly on sound money management. Lastly, a little note on Artificial Intelligence. All "conventional" technical analysis tools share the same drawback. They are "forward" analysis tools, calculating some kind of (often) linear indicator (cause) and then assessing the statistical stability of its results (effect). Artificial intelligence, and particularly genetic algorithms and neural networks look at profit potentials (effects) and then analyze the former situation which contributed to reaching those profits (causes). This method is inherently far more powerful, but this discussion goes far beyond the scope of this introduction. All seasoned traders know that financial markets can be choppy, trending, cyclical or simply chaotic and noisy. Most, if not all "classical" technical indicators work in one market situation only, and some market transitions can be painful if one does not adapt quickly to the new situation. In other words, linear indicators tend to work, until such time, where they simply no longer work. You may have enough capital to sustain large drawdowns, but the issue remains the same: linear indicators are selflimiting. Furthermore, the statistical tools used to validate a signal are often flawed. Finding patterns is just one way to explore the world of non linear
market dynamics. Other avenues of interest include chaotic functions (like the
wellknown logistic function), wavelets,... but let's first focus on finding patterns. The pattern finder uses shortterm profit objectives. For instance, a closetoclose momentum or closetohighest high profit target (read the Q&A page for details). This serves as a general indication for trading, and may not always be directly translatable into a tradable signal. You may indeed want to trade on stop / limit orders. Advanced traders will create one or several signals generated by the G.P.F. and will use them in a logical and/or statistical combination of their choice. The G.P.F. signals also make great additional inputs for neural nets. It must be stressed that the GPF is very much uncorrelated to most other linear or nonlinear indicators. For this reason only, many traders and fund managers find it a very valuable addition to their trading toolbox.
There is honestly no real need to delve into the
intricacies of genetic algorithms. Ample information is available on the Internet, for
instance on the comp.ai.genetic newsgroup, and from Ward Systems. To keep it short and simple, genetic
algorithms use a competitive technique to resolve a problem (trading profits) using a
population of potential solutions (here patterns). This technique is ideal when it is not easy,
not to say impossible to model a function in mathematical terms. Now begins the tricky part. One needs to translate the "causes", i.e. the patterns that could lead to such results, into a mathematical form. Fortunately Ward Systems GeneHunter™ makes this task fairly easy. One only has to describe all potential patterns by way of genetic traits or chromosomes. For instance, as the pattern will include occurrences of quotations, a chromosome will carry the characteristic "quote", with the possible values: Open, High, Low, Close. Another chromosome will carry the information "bars back" (or days back), depending on how far back you want the G.P.F. to search for optimal patterns. The total search space is here designed. Once one has created a whole potential pattern that way, one has one potential solution for the fitness function, i.e. a pattern, and how profitable that using that pattern can be. That solution, or pattern may be far from ideally suited to solve our optimization problem. GeneHunter allows us now to create potentially suitable solutions, called "individuals" into a population. The optimization process called "Evolution" now consists in testing whether these individuals can contribute in solving the problem. The general principle used now is the "survival of the fittest". Generations of individuals are created, then mate, mutate, evolve until such time where one individual becomes the obvious optimal answer to the problem. It will have survived all genetic alterations to become the "fittest" individual. The fittest individual is then converted back into an understandable form, i.e. a pattern. All this may sound pretty complicated, but rest assured: Using the G.P.F. hides all of that complexity. Genetic algorithms are certainly not the only optimization technique available to give good results. However, exhaustive search and/or linear programming would either take much much longer to process, and could also return non optimal results as the optimization process may easily get trapped in a local optimum solution. Latest GPF NewsThe G.P.F. is stable and will not be maintained further. Interested in G.A.s ?There is a good F.A.Q. on this site on Genetic Algorithms originally extracted from the comp.ai.genetic newsgroup. Click here to reach it. Keen G.P.F. Users may want to explore Genetic Algorithms further with GeneHunter from Ward Systems. For nonprogrammers, the GeneHunter can be used directly from Excel. Programmers have more flexibility in solving broader ranges of problems using the provided GeneHunter DLL. Being a GeneHunter registered user also gives right to access finer genetic tunings. C++ developers can also use the GALIB C++ free library from the M.I.T. Limited distributions rights do apply. There are more and more G.A. samples available on the Internet like for instance the famous Traveling Salesman exercise which source code can be found on the CodeProject.com web site 
Page last modified:
May 08, 2008 