Genetics and Evolution
Previous  Top  Next

Genetic optimization algorithms are essentially smart search algorithms. Given a goal, they will try many combinations in order to reach that goal. The way they create these combinations is based on the science of genetics and evolution.

Evolution
- a process in which something passes by degrees to a different stage (especially a more advanced or mature stage); "the evolution of his ideas took many years"; "the evolution of Greek civilization"; "the slow evolution of her skill as a writer"

The evolution of species is nature's way of solving problems. Traits are passed on through generations, and with each generation, individuals change - usually a little, sometimes a lot. Depending up on the traits inherited from the parents and a certain amount of randomness inherent in the reproduction mechanism, an individual will have certain capabilities, and the complex interplay of these capabilities will determine the ability of the individual to survive, to attract a mate, and the qualities of the mate they attract. All of these determine something we call the "fitness" of the individual

Fitness
- the overall ability of an individual to survive.

Fitness is synonymous with desirability, and not only determines one's ability to survive but also one's ability to attract a mate.

Evolution occurs as organisms that survive breed and pass their combined genetic material on to their offspring and thus pass on the traits that enable survival. In a given environment, organisms that are able to make the most of the environment and are able to adapt to new, unforeseen situations are more likely to survive. In nature, survival usually depends on more than mere strength; it depends upon the interplay of the millions of parameters that make up any complex organism. In the insect, plant and animal kingdoms survival can depend on an innumerable number of qualities such as stealthiness, intelligence, color, smell, eyesight, judgement, speed, height, weight, eating speed, and so on ad infinitum. So, in effect, nature is optimizing an enormous number of analog parameters and arriving at a single characteristic we commonly call "fitness." Thus, the complex interplay of the organism's parameters determines survival.

In Optimax, we employ evolutionary algorithms to mimic the complex mechanisms used in nature to find the optimum inputs for investment strategies. These algorithms are also known as genetic algorithms, hence this product is termed a genetic optimizer, meaning that it uses algorithms which mimic the genetic processes used in evolution to optimize a set of parameters, or inputs, for a investment strategy.

Evolutionary programming is useful when it is necessary to search through a very large number of combinations to arrive at an optimal solution from a high number of possible solutions, and when the number of combinations precludes a traditional exhaustive search. This approach is widely known, well accepted and used in many fields; it has been used for optimizing circuit board layouts, jet engines, analog filters, gas pipelines, and financial applications.

Comparisons and Terms
Comparing strategies to nature, investment strategies can have a number of inputs with many possible values. Any single combination of those values of inputs we call an "individual."

Individual
- a unique combination of values for the inputs of a strategy.

Each individual input variable for a strategy is called a "gene."

Gene
- one of the input variables of a given strategy.

For example, in a moving average crossover strategy, you may have just two input variables: SlowLength and FastLength. In this case the strategy has two genes. An example of an individual would be the case where SlowLength = 50 and FastLength = 20. Another individual would be SlowLength = 55 and FastLength = 21. In fact, any combination would be considered an individual.

We combine genes to form chromosomes, as is done in nature.

Chromosome
- a set of genes, usually related in function.

Chromosomes are the basic unit of reproduction. When you set up the inputs for your strategy, you will group the inputs into chromosomes. For example, we may add stops and targets to our moving average crossover strategy. Our input variables may then be:

Chromosome
Inputs (Genes)
1
SlowLength
1
FastLength
2
ProfitTargetAmt
2
StopLossAmt
2
BreakevenFloorAmt
2
DollarTrailingAmt
2
PctTrailingFloorAmt
2
PctTrailingPct
2
ExitOnClose


Combining genes which work together onto a common chromosome improves the speed and quality of the reproduction process. Here we have defined our entry logic inputs into chromosome 1, and the exit logic inputs into chromosome 2.