G.P.F.

Back Home Up Next

 

Home
Software
Prices
Download
Yahoo Charts


NEW:
ADVANCED
TRADESTATION TECHNIQUE

US Markets Daily
snapshots

Technical
Description


Forthcoming Releases:

Fuzzy Logic:
sFLC3
DLL & API


Neural Net:
Release of NXL3
DLL & API


 

The Genetic Pattern Finder

A simple yet great tool for advanced traders !


shareware version 1.991 (SOURCE CODE AVAILABLE)

NOW FREE !!!
GRATIS, FREI,GRATUIT
NADA, NIENTE

(no registration required)

But feedback still very much appreciated

  1. Introduction

  2. Why a Pattern Finder?

  3. What is "Genetic" about this Pattern Finder?

  4. Release Notes

  5. System requirements

  6. Download the G.P.F.

  7. Getting Started (installing step by step)

  8. The G.P.F. in three easy steps (getting your first patterns)

  9. Q&A (important reading)

  10. Hints&Tips (important reading)

  11. A Few Sample Patterns (not updated, for tutorial purposes only)

  12. G.P.F. Pro Specifics

  13. GPF News Updates (bug reports, beta testing, latest release information)

  14. Links (References, books, and hyperlinks)

  15. A Tutorial on Evolutionary Computation (newer version maybe available)

This page contains important information about the G.P.F: users are advised to print or save this page.


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 :

IF Open of yesterday > High of 2 days ago
AND Close of 4 days ago > High of 3 days ago
THEN Buy on next bar's open

Despite its apparent simplicity, this is a non-linear indicator, which works well in many trending or range-bound 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 EasyLanguage-like 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 short-term 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.

[Back to Top]

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 draw-downs, but the issue remains the same: linear indicators are self-limiting.  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 well-known logistic function), wavelets,... but let's first focus on finding patterns.
This Genetic Pattern Finder may not give you the ideal signal, which would make you successful on all markets, simply because such signal may not exist at all. However the interest of such technique is to always find optimal signals, regardless of how profitable they actually are (this is already a valuable information). Additionally, the signal can be improved with sound trading position management, e.g. using trailing stops, pyramiding, and in conjunction with other indicators.

The pattern finder uses short-term profit objectives. For instance, a close-to-close momentum or close-to-highest 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 non-linear indicators. For this reason only, many traders and fund managers find it a very valuable addition to their trading toolbox.

[Back to Top]


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. 
One first needs an optimization target or a benchmark, which is translated into a mathematical function, that will be usually called the "Fitness" function.  The best individuals in that population adapt well to or "fit" the environment i.e. the fitness function.  Optimizing that function is in most cases identical to maximizing that target, for instance trade profits. The "effect" side of the equation is now set.

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.

[Back to Top]


Latest GPF News

The G.P.F. is stable and will not be maintained further.

[Back to Top]


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 non-programmers, 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

[Back to Top]

Home Up G.P.F. News GPF: Day 1 1,2,3,... Hints & Tips Q & A Best viewed with MS Internet Explorer 5 and above

Page last modified: May 08, 2008
Copyright ForeTrade Technologies 21st century and thereafter