Genetic Algorithms (GAs) in Trading Online

What are Genetic Algorithms

Genetic Algorithms (GAs)¬†are adaptive heuristic search algorithm inspired by Darwin’s theory about evolution. The basic techniques of the GAs are designed to simulate processes in natural systems necessary for evolution, specially those follow the principles of “survival of the fittest.

Algorithm is started with a set of solutions (represented by chromosomes) called population. The algorithm repeatedly modifies that population and at each step try to evolve the population and improve its individuals. The GA randomly selects individuals from the current population and uses them as parents to produce the children for the next generation.

Genetic Algorithms

 

 

 

 

 

 

 

 

 

Over successive generations, the population “evolves” toward an optimal solution.

Genetic Algorithms (GAs) - Solution research

 

 

 

 

 

 

 

 

The GAs can be used for solving both constrained and unconstrained optimization problems. They can be used successfully to identify, within historical series, particular conditions on sequences of candles (patterns) that can be used as condition for buy or sell a position.

Genetic algorithms and charts analysis

Analysis of Japanese candles principally consists of two groups of patterns:

  1. Continuation Pattern
  2. Reversal Pattern

As is easily understood, if the Continuation Pattern try to predict whether the trend in progress is able to continue, the Reversal Pattern try to predict the contrary. Reversal Pattern analyze any interruption of the trend and search condition for enter in the opposite direction.

Find a valid pattern is a problem of finding an optimal solution that can be successfully addressed through genetic algorithms. Who designs the genetic algorithm will identify the salient features to be examined. He create an algorithm that will try to find a combination of those features that, in the past, has proved successful.

It should be known that, for the operation right of AGs, it is not said that there will always the optimal solution and the same solution when repeat the search.

Obviously the solution found is a solution that has been profitable in the past, so nothing is guaranteed for the future (as with any conclusion based on statistical analysis). To test the quality of the solution we can divide the series into two subsets and use only one of them for research. The solution founded can be tested on the other subset (new and not analyzed by the algorithm genetic) and see if the pattern found continues to be profitable. In this case we have a few more elements to hope that the pattern continues to be a good input for the future.

Posted in Tutorial and tagged , .