Rule 2: A Small Number of Rules

This book deals with deterministic trading systems using a small number of rules or variables. These trading systems are similar to systems people have developed for tasks such as controlling a chemical process. Their experience suggests that robust, reliable control systems have as few variables as possible.

Consider two well-known trend-following systems. The common dual moving-average system has just two rules. One says to buy the up­side crossover, and the other says to sell the downside crossover. Simi­larly, the popular 20-bar breakout system has at least four rules, two each for entries and exits. You can show with testing software that these sys­tems are profitable over many markets across multiyear time frames.

You can contrast this approach with an expert system-based trading system that may have hundreds of rules. For example, one commercially available system apparently has more than 400 rules. However, it turns out that only one rule is the actual trigger for the trades. The determi­nistic systems differ from neural-net-based systems that may have an unknown number of rules.

The statistical theory of design of experiments says that even com­plex processes are controllable using five to seven "main" variables. It is rare for a process to depend on more than ten main variables, and it is quite difficult to reliably control a process that depends on 20 or more variables. It is also rare to find processes that depend on the interactions of four or more variables. Thus, the effect of higher-order interactions is usually insignificant. The goal is to keep the overall number of rules and variables as small as possible.

There are many hazards in designing trading systems with a large number of rules. First, the relative importance of rules decreases as the number of rules increases. Second, the degrees of freedom decrease as the number of rules or variables increases. This means larger amounts of test data are needed to get valid results as the number of rules or vari­ables increases.

A third problem is the danger of curve-fitting the data in the test sample. For example, given a data set, a simple linear regression with just


Principles of Trading System Design

two variables may fit the data adequately. As the number of variables in the regression increases to, say, seven, the line fits the data more closely. Therefore, we can pick up nuances in the data when we curve-fit our trading system, only to pick up patterns that may never repeat in the fu­ture. The total degrees of freedom decrease by two for the simple linear regression, but will decrease by seven for the polynomial regression.

These ideas can be illustrated by using regression fits of daily clos­ing data for the December 1995 Standard and Poors 500 (S&P-500) futures contract. The data set covers 95 days from August 1, 1995, through December 13, 1995. Two regression lines are fitted to the same data: Figure 2.1 presents a simple linear regression; Figure 2.2 fits higher-order polynomial terms, going out to the fifth power. As higher-order terms are added, the regression line becomes a curve, and we pick up more nuances in the data.

For simplicity, the daily closes are numbered 1 through 95 and de­noted by D. All numbers represented by C (such as Ci) are constants. Est Close is the closing price estimated from the regression.