Skip to main content
Track System optimization
13 / 23
Library

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.
Entries in this reading3 entries

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

Half-year net profit for the genetically assembled three-rule cotton long system, taken from the article’s Figure 2 performance table. A trader should see that losing halves are few and small next to the winning ones, including the late-1993 through mid-1996 window that was held out of the fitness score.
Half-year net profit for the genetically assembled three-rule cotton long system, taken from the article’s Figure 2 performance table. A trader should see that losing halves are few and small next to the winning ones, including the late-1993 through mid-1996 window that was held out of the fitness score.Cotton (CT) · Half-year · 1986-01-01T00:00:00.000Z to 1996-10-31T00:00:00.000Z

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.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
13 of 23 in the System optimization track
19971-3 pp.Next on System optimizationAudit the holdout and the exposure before the fitted entriesEntries that look unusually well placed on the same history used to tune the rules do not show how those entries would behave on unused data.
All readings on this track · 23 readings
  1. 1984Evaluating mechanical systems beyond net profit
  2. 1987Mechanical systems need more than pretty charts
  3. 1987Evaluating silver moving averages and RSI by scoring rule
  4. 1988Simple systems over optimized complexity
  5. 1988Cycle rule inputs until the parameter search stops
  6. 1990Split-sample tests for stochastic parameter grids
  7. 1993Four-subsystem trading system construction
  8. 1993Randomized price paths for stock system parameters
  9. 1994Mechanical timing with out-of-sample and filter checks
  10. 1995Evaluating asymmetric percent-reversal trading rules
  11. 1996Evaluating a daily volume-strength and new-high new-low timing procedure
  12. 1997Rule-based intraday system design with genetic search
  13. 1997Evolving three-rule systems with genetic templates
  14. 1997Audit the holdout and the exposure before the fitted entries
  15. 2001Inner weights are part of the candlestick signal
  16. 2003Mechanical short-term rules for news-sensitive rallies
  17. 2004Band construction as a testable trading procedure
  18. 2006Layered day-session automation from brackets to rules
  19. 2006Why mechanical rules must be retuned per security
  20. 2006A linear-regression next-bar forecast needs a searchable cutoff
  21. 2015Construct if-then rules, then backtest and optimize
  22. 2015Mechanical system design as a critique of discretion
  23. 2025Joint channel design with a trend filter and stop-loss orders
All 131 readings tagged System optimization
Also on System optimization5 readings