The genetic programming engine inside the Genetic System Search for Technical Analysis program uses several operations to arrive at a set of technical analysis trading rules.
Crossover
In one area of the program it selects two population members with good fitness and therefore, the potential to be even better. As an example, the following two signals might be selected to participate in a crossover:
The MACD is greater than 0 AND the 120-period Simple Moving Average of the low is greater than the low
The 9-period Relative Strength Index is greater than 10 AND the 9-period ADXR is greater than 25
In a crossover operation one term in the first rule is exchanged for a term in the second rule. The resulting pair might then be:
The MACD is greater than 0 AND the 9-period ADXR is greater than 25
The 9-period Relative Strength Index is greater than 10 AND the 120-period Simple Moving Average of the low is greater than the low
Mutation
The genetic mutation operator modifies just one rule at a time. The program selects a rule and randomly makes a change to one of its elements. Let's use the first unmodified rule above as an example: The MACD is greater than 0 AND the 120-period Simple Moving Average of the low is greater than the low
After a mutation that rule might be changed to: The MACD is greater than 0 AND the 120-period Simple Moving Average of the low is greater than the close.
The change of the comparison term from the low to the closing price is subtle but may be enough to push the rule set to a higher fitness number.
Numerical Modification
A variation of mutation is the adjustment of numerical constants. Use the revised rule from the mutation operation as an example: The MACD is greater than 0 AND the 120-period Simple Moving Average of the low is greater than the close
The program may change it to: The MACD is greater than 0 AND the 130-period Simple Moving Average of the low is greater than the close
Cascading Changes
There is no limit to the number of revisions each rule may undergo. During its life a rule appearing in a trading system may be transformed once, many times or never.
Reevaluation
Changing any of the individual rules in a trading system affects the performance of the system. After each genetic operation, the set of rules for the population members involved are reevaluated and a new fitness number is assigned. The population is sorted according to the fitness number.
Low fitness elements eventually die off while members with a high fitness score continue to live and undergo additional genetic operations. The changes don't always result in improved rules and lower-ranked components are culled from the population. The individual changes to trading rules at each generation may not be drastic but the program performs hundreds, even thousands of these operations in a typical genetic search. Eventually a population member that scores well in the fitness calculation will appear.