1997issue C021-10
Evolving three-rule systems with genetic templates
A search can assemble a complete end-of-day mechanical system by decoding a number string into rule templates, filled blanks, and a holding period of one to 15 days. Fitness then scores that decoded system as one testable procedure, not as a set of isolated rules.
- A complete mechanical system can be encoded so a set of numbers maps one-to-one onto fully specified rules, using the first scaled value as a template index and the remaining values to fill that template's blanks.
- Each gene is a block of four numbers that decodes to one rule, so a chromosome of 12 numbers decodes to a three-rule system that can be tested as one procedure.
- Optimization uses recombination, mutation, and selection on numeric encodings, and fitness is the trading behavior of the decoded system rather than a match to a separately induced rule set.
- The same template-and-blank mapping can be reused to search exit and money-management rules, which were left at a minimal specification in this exercise.
A complete procedure, not isolated rules
A mechanical trading system is a fully specified procedure that maps market state and execution constraints into entry, exit, and abstention decisions over a defined holding period. The archive workflow encodes that whole procedure so a set of numbers maps one-to-one onto fully specified rules.
The first scaled value is a template index. The remaining values fill that rule template's blanks. After the decoder fills those blanks, each number string maps to exactly one executable rule.
Three rules and a holding-period limit
The design is limited to three-rule systems. The templates, data, and constraints define the searchable universe of complete procedures.
The search target is an end-of-day mechanical system. The holding period is constrained to one to 15 days rather than an intraday procedure.
How a chromosome decodes
Each gene is a block of four numbers that decodes to one rule. A chromosome of 12 numbers therefore decodes to a three-rule system that can be tested as one procedure.
Rule-based entry is a discrete condition assembled from a template plus filled-in lookbacks or thresholds. Those filled conditions must all be true before a long or short signal is issued.
Selection by trading behavior
System optimization proceeds by recombination, mutation, and selection on numeric encodings. Fitter decoded systems are retained, and less-fit encodings leave fewer successors.
Fitness is the scalar score assigned after the decoded system is run as a single procedure on historical bars. It measures desirable trading behavior of that rule-based system, not a match to a separately induced rule set.
Cotton long system net profit by half-year

Fitness used 1986 through most of 1993; late 1993 through 15 October 1996 was out of sample. The last half-year is incomplete (1 July–15 October 1996). Exits were fixed: a five-day time stop, a $7,500 stop-loss, or a target of four times the 100-bar average true range.
What this exercise leaves minimal
The same mapping that selects templates and fills parameters can be reused to search exit and money-management rules. Those rules were left at a minimal specification in this exercise.
Rule templates may later incorporate additional market theories or other model types once those ideas have been checked in a simpler form outside the joint search.
All readings on this track · 23 readings
- 1984Evaluating mechanical systems beyond net profit
- 1987Mechanical systems need more than pretty charts
- 1987Evaluating silver moving averages and RSI by scoring rule
- 1988Simple systems over optimized complexity
- 1988Cycle rule inputs until the parameter search stops
- 1990Split-sample tests for stochastic parameter grids
- 1993Four-subsystem trading system construction
- 1993Randomized price paths for stock system parameters
- 1994Mechanical timing with out-of-sample and filter checks
- 1995Evaluating asymmetric percent-reversal trading rules
- 1996Evaluating a daily volume-strength and new-high new-low timing procedure
- 1997Rule-based intraday system design with genetic search
- 1997Evolving three-rule systems with genetic templates
- 1997Audit the holdout and the exposure before the fitted entries
- 2001Inner weights are part of the candlestick signal
- 2003Mechanical short-term rules for news-sensitive rallies
- 2004Band construction as a testable trading procedure
- 2006Layered day-session automation from brackets to rules
- 2006Why mechanical rules must be retuned per security
- 2006A linear-regression next-bar forecast needs a searchable cutoff
- 2015Construct if-then rules, then backtest and optimize
- 2015Mechanical system design as a critique of discretion
- 2025Joint channel design with a trend filter and stop-loss orders