Automated Rule Based

System Trading

V.S.

Buy and Hold

Index Funds

Kenneth W Sweet

 

 

 The securities markets are made up of millions of investors, traders and speculators making emotional decisions to buy and sell various securities at various times for various reasons. Because over time people and their emotions are the same, our research has found that if you use sufficiently rigorous methods to avoid hindsight, you can test a system and see how it would have done in the past and get a fairly good idea of how that system will perform in the future. Therefore building objective linear models of security and market behavior gives us our edge. 

 An interesting study was reported about in the book Decision Traps. This book  is about the process of decision-making. It puts forth the notion that objective decisions (i.e., rule based strategy trading) produce far superior results than other non-objective forms of decision making.

 In this book, nine different types of decisions were tested using each of the three different decision methods. The accuracy of the decisions was then compared and analyzed for effectiveness in predicting final outcomes. The investigator looked at different types of decisions, predicting grades, predicting recovery from cancer, performance of life insurance salesmen, as well as predicting changes in stock prices. He used three different decision making processes: an Intuitive Prediction Model, a Subjective Linear Model, and an Objective Linear Model. Interestingly enough, these can be compared to the 3 major categories of traders: discretionary, technical and strategy. 

 When making decisions based on an Objective Linear Model, a researcher will develop an objective model based on historical tests and observations to predict results. This is defining and using quantifiable data, running historical tests, and then using the results of the tests to predict future outcomes.

 For instance, the researcher would look at reams of physical data from leukemia patients, and correlate the data with how long the patient lived. After running the historical tests, the researcher would then obtain the physical data from a leukemia patient, and using the historical test data, attempt to predict how long that leukemia patient will live.

  This is exactly what a strategy trader using computer models for systematic rule based trading does. He runs historical tests and then uses that data to take a position in the market. He uses objective, quantifiable data tested historically to make his trading decisions. The table below shows the results of the nine different types of decisions that were tested using each of the three different decision methods.

of

Types of Judgments Intuitive  Prediction Subjective    Linear Objective Linear
Academic Performance of Graduate Students .19 .25 .54
Life Expectancy of Cancer Patients -.01 .13 .35
Changes In Stock Prices .23 .29 .80
Mental Illness using Personality Tests .28 .31 .46
Grades and Attitudes in Psychology Course .48 .56 .62
Business Failures using Financial Ratios .50 .53 .67
Student's Rating of Teacher's Effectiveness .35 .56 .91
Performance of Life Insurance Salesmen .13 .14 .43
IQ Scores using Rorsach Tests .47 .51 .54
Mean (Across all Studies) .33 .39 .64

Judgments

Intuitive

 In every case, the Subjective Linear Model outperformed the Intuitive Prediction Model but only by a small margin. If you look at predicting the changes in stock prices, the Subjective Linear Model only slightly outperformed the Intuitive Prediction Model. This correlates very closely with real world trading. Technical traders do only slightly better than discretionary traders and neither of them make much money. While the difference in expertise and experience between a discretionary trader and a technical trader is substantial, the resulting profitability is hardly noticeable. The real insight from this study comes when we look at the results of the Objective Linear Model. In every case, the Objective Linear Model outperformed both the Intuitive Prediction Model and the Subjective Linear Model. In some cases, the improvement was minor, and in others it was substantial. It is interesting to observe that the greatest improvement came when using the Objective Linear Model in predicting the changes in stock prices. Here  is a definitive study showing the benefits of objective decision-making as opposed to other forms of decision-making.

 Successful investment is really a matter of odds, and if you can compute the odds, you can find and test methods that could beat the market. Because we know that we don’t know. No matter what information you have, no matter what you are doing, you can be wrong. Therefore a good system will incorporate the following rules. First, never bet your lifestyle, from a trading standpoint. Second, if you know what the worst possible outcome is, it gives you tremendous freedom. The truth is that, while you can’t quantify reward, you can quantify risk.

 Instead of trying to control the market, the strategy trader lets the market tell him what to do. He Lets the market and his strategy take him long rather than his personally trying to predict or decide when to go long. A trader using a systematic rule based model realizes that he can’t understand the market, and that he can’t predict when the market will move, therefore he trades using a strategy in an objective and detached state of mind where he lets the system take him where it will when it wants.

  I find that evaluating systems solely on a calendar year basis is very arbitrary. What we really want to know are the odds for profitable performance in a holding period of any length. In the information that follows I will go over the concepts and basic steps that I use to design and build systematic rule based trading systems. Next I will show a few examples of actual systems I have developed and their results over various holding periods.

 

 

 

1. Business Cycle

 In order to understand macro stock movements, the reader must first be aware of business cycles. There are generally four stages to a business cycle: expansion, prosperity, contraction, and recession. The stage in which an economy is operating will have a significant impact on a company’s profitability.

 Beginning with a low point (recession), business activity increases until a period of prosperity is reached. Eventually the economy becomes over heated (inflation) and business activity begins to decline until a low point is reached again.

 The stock market acts as a leading indicator as smart money prepares for the next stage of the business cycle. Therefore, the stock market also goes through cycles, these cycles tend to lead the economic cycle.

 Just as the tide coming in will lift all the boats on the water, a rising market will tend to push the prices of all stocks higher. Company stocks can and do act independently of what the overall market is doing, however a great deal of stock performance is a direct reflection of the condition of the over all market.

 

3. Time Frame

 

The time frame in which you view your investments will also have an impact on your overall profitability, comfort level and expectations.

Below are two charts, both of the same security in different time frames.

As you can see, the shorter the time frame, the more the noise in the security movement and the harder it is to determine the true direction of price movement.

 

 

 

4. Building a Stable

 The first step I use in implementing an automated system trading campaign, is to identify the traits of a model security I wish to trade, using the selected system. Once I have defined the ideal candidate, I then use it as a template, eliminating all securities that do not fit the template.

 This creates a stable of securities that the system will trade. Be careful not to over optimize the selection criteria so there is a large enough population to choose from. The larger the stable, the more robust the system results will be.

 

 

 

 

 

5. Positive Expectancy and Risk Control

 Key ingredients of a successful trading system include the following:

1.     Entry signal or “ When do I buy?” (The smallest factor in a successful system.)

2.     Exit signal or “ When do I sell?” (Accounts for approximately 30% of overall profit.)

3.     Risk or position sizing, capital preservation, and capital at risk (The largest factor in a successful system.)  

4.     The profit expectancy of the system (If we know over a sample of 30 trades, the system will make an average profit of 7% per trade, then we can determine there is positive expectancy of $7 for every $100 in our portfolio.) 

 Using the above information, Next design a system with a positive expectancy and the  risk parameters are comfortable with.

Only trade systems with positive expectancies.

 

 

 

6. Scoring and Ranking potential buy candidates

Now we have a group of stocks to choose from. We have developed a system that has a positive expectancy with good risk management.

The next question, as is often the case, “What do we do if the overall market is going up and we find ourselves with several times more buy signals than our system will allow us to trade?”

 This is where we use a benchmark and security scoring.

A benchmark (can be an index or security etc.), that all of the securities in the stable are measured against can be useful in this case. Do this in real time, scoring and ranking them on a continual basis.

When the position sizing equation tells us to buy  five new securities and we have buy signals for 30 securities, buy the five securities with the highest score. This ensures always buying the best possible candidates at any given time.

 

 

7. Putting it all Together

 Apply the trading rules as follows:

1.     Screen stocks and build a stable.

2.     Apply system  “Buy,” signals.

3.     Apply system “Sell,” signals for profit control.

4.     Apply system “Sell,” signals for risk control.

5.     Apply “Position Sizing Rules,” for risk control.

6.     Apply “Sorting and Ranking Rules,” for a substantial increase in overall profits.

 

8. Comparison: Two Automated Systems vs. S&P 500

 

On the following pages are the statistics from two of my systems: “A1” and ” Trident”. A comparison of each of system vs. buying an S&P 500 index Fund. Most Recent 2 years. Most Recent 9 years.

Trident
The “Trident” system is a medium term investment strategy  with  an average holding time of approximately 4 months. In the test period of 1/1/2003 - 9/23/2004 this system achieved an annual return of 89.28% and a total return of 197.15%. The average profit was 45.38%, with 58.97% of trades profitable. There were 46 winning trades and 32 losers. The maxim system drawdown was –25.24%. The chart below shows an example of a buy (Green Arrow) on TZOO and then a profit exit (Red Arrow).

 

Trident System

 

The chart bellow shows the equity growth of the Trident system in light blue. The dark blue line going through the middle of the chart represents the growth of the same funds placed an SP500 fund. The red area shows equity drawdown from most recent peak.

 

 

 

S&P 500 VS Trident System 1/1/2003-9/23/2004

Statistics

 

 

All trades

Initial capital

345,000.00

Ending capital

1,025,175.30

Net Profit

680175.30

Net Profit %

197.15 %

Exposure %

99.95 %

Net Risk Adjusted Return %

197.24 %

Annual Return %

89.28 %

Risk Adjusted Return %

89.32 %

 

All trades

78

 Avg. Profit/Loss

8720.13

 Avg. Profit/Loss %

45.38 %

 Avg. weeks Held

15.74

 

Winners

46 (58.97 %)

 Total Profit

1007885.96

 Avg. Profit

21910.56

 Avg. Profit %

87.27 %

 Avg. Weeks Held

18.65

 Max. Consecutive

9

 Largest win

109513.99

 # Weeks in largest win

41

 

Losers

32 (41.03 %)

 Total Loss

-327715.95

 Avg. Loss

-10241.12

 Avg. Loss %

-14.85 %

 Avg. Weeks Held

11.56

 Max. Consecutive

4

 Largest loss

-38044.67

 # Weeks in largest loss

7

 

Max. trade drawdown

-69832.01

Max. trade % drawdown

-42.64 %

Max. system drawdown

-266804.27

Max. system % drawdown

-25.24 %

Recovery Factor

2.55

CAR/Max DD

3.54

RAR/Max DD

3.54

Profit Factor

3.08

Payoff Ratio

2.14

 

 

Risk-Reward Ratio

5.02

Ulcer Index

7.46

 

 

 

 

 

Profit distribution

Max. Adverse Excursion distribution

Max. Favorable Excursion distribution

 

 

 

A1

This next system is one of my favorite systems. It is a longer term investment strategy  with  an average holding time of approximately 6 months. In the test period of 1/1/2003 - 9/23/2004 this system achieved an annual return of 85.99% and a total return of 188.38%. The average profit was 41.15% ,with 59.18% of trades profitable. There were 29 winning trades and 20 losers. The maxim system drawdown was –21.73%. The chart below shows an example of a buy (Green Arrow) on GRA and then a profit exit (Red Arrow). Over the same time period as the Trident system the A1 system does 1/3 less trades and the average holding period is 50% longer.

A1 System

The chart bellow shows the equity growth of the A1 system in light blue. The dark blue line going through the middle of the chart represents the growth of the same funds placed in an SP500 fund. The red area shows equity drawdown from most recent peak.

 

S&P 500 VS  A1 System 2003-9/23/2004

Statistics

 

 

All trades

Initial capital

345000.00

Ending capital

994903.21

Net Profit

649903.21

Net Profit %

188.38 %

Exposure %

99.95 %

Net Risk Adjusted Return %

188.47 %

Annual Return %

85.99 %

Risk Adjusted Return %

86.03 %

 

All trades

49

 Avg. Profit/Loss

13263.23

 Avg. Profit/Loss %

41.15 %

 Avg. Weeks Held

24.08

 

Winners

29 (59.18 %)

 Total Profit

762438.34

 Avg. Profit

26290.98

 Avg. Profit %

80.35 %

 Avg. Weeks Held

35.24

 Max. Consecutive

12

 Largest win

315000.00

 # Weeks in largest win

77

 

Losers

20 (40.82 %)

 Total Loss

-112539.98

 Avg. Loss

-5627.00

 Avg. Loss %

-15.70 %

 Avg. Bars Held

7.90

 Max. Consecutive

11

 Largest loss

-50773.33

 # Weeks in largest loss

5

 

Max. trade drawdown

-108479.97

Max. trade % drawdown

-53.58 %

Max. system drawdown

-241360.99

Max. system % drawdown

-21.73 %

Recovery Factor

2.69

CAR/MaxDD

3.96

RAR/MaxDD

3.96

Profit Factor

6.77

Payoff Ratio

4.67

 

 

Risk-Reward Ratio

6.45

Ulcer Index

8.27

 

Profit distribution

 

 

Max. Adverse Excursion distribution

Max. Favorable Excursion distribution

 

 

 

As I stated  in the beginning of this article we want to know the odds for profitable performance in time periods of differing lengths. The charts and statistics bellow show the performance of the A1 system over approximately a  nine year period from 1/1/1195 to 9/23/2004. It has an  average holding time of approximately 6 months. In the test period of 1/1/1995-9/23/2004 this system achieved an annual return of 64.82% and a total return of 12,660.96%. The average profit was 50.59% ,with 47.63% of trades profitable. There were 171 winning trades and 188 losers. The maxim system drawdown was –46.25%. This compares favorable when you consider the bubble of 2000 and the fact that the NASDQ had a draw down of almost 2 times the A1 during the same time frame.

A1 System   Results for  1/1/1995 – 9/23/2004

 

Statistics

 

 

All trades

Initial capital

345,000.00

Ending capital

44,025,322.99

Net Profit

43680322.99

Net Profit %

12660.96 %

Exposure %

97.49 %

Net Risk Adjusted Return %

12987.25 %

Annual Return %

64.82 %

Risk Adjusted Return %

66.49 %

 

All trades

359

 Avg. Profit/Loss

121427.25

 Avg. Profit/Loss %

50.59 %

 Avg. Weeks Held

24.74

 

Winners

171 (47.63 %)

 Total Profit

53079716.94

 Avg. Profit

310407.70

 Avg. Profit %

127.12 %

 Avg. Weeks Held

38.64

 Max. Consecutive

8

 Largest win

23583391.27

 # Weeks in largest win

144

 

Losers

188 (52.37 %)

 Total Loss

-9487334.74

 Avg. Loss

-50464.55

 Avg. Loss %

-19.02 %

 Avg. Weeks Held

12.10

 Max. Consecutive

8

 Largest loss

-1327197.38

 # Weeks in largest loss

20

 

Max. trade drawdown

-12915391.89

Max. trade % drawdown

-85.60 %

Max. system drawdown

-12636065.43

Max. system % drawdown

-46.25 %

Recovery Factor

3.46

CAR/MaxDD

1.40

RAR/MaxDD

1.44

Profit Factor

5.59

Payoff Ratio

6.15

 

 

Risk-Reward Ratio

0.54

Ulcer Index

14.02

Ulcer Performance Index

4.24

Profit distribution

 

 

Max. Adverse Excursion distribution

Max. Favorable Excursion distribution

 

 

 

 

The chart bellow shows the relative performance of  the A1 system equity versus the performance of the DJ-30, COMPQX, and the SP-500. The investment start date is in 1/1/2000,  3 month before the bear market started. Notice the A1 was very profitable while the 3 indexes lost substantial money over the period measured.

 

A1 System vs. Buy and Hold DJ-30, COMPQX, SP-500. 1/1/2000 –10/4/2004

 

 

 

9. System Scalability

Money managers realize that the effectiveness of their trading systems drop off rapidly after a certain level of assets is reached. Therefore, to demonstrate the scalability of the systems, I tested the A1 system as above applied to a $1 billion dollar portfolio (1/1/2003 –10/4/2004.)

Limiting “Buys,” to 5% of traded volume per week and priced at an average price for “Buys,” and “Sells.”

 

Relative Performance%  A1 System Equity, DJ-30, COMPQX, SP-500.

 

 

A1 System vs. Buy and Hold S&P 500. $1,000,000,000.00 Investment.

 

Statistics

 

 

All trades

Initial capital

1,000,000,000.00

Ending capital

1,700,119,830.01

Net Profit

700,119,830.01

Net Profit %

70.01 %

Exposure %

87.51 %

Net Risk Adjusted Return %

80.00 %

Annual Return %

35.35 %

Risk Adjusted Return %

40.39 %

 

All trades

891

 Avg. Profit/Loss

783,314.01

 Avg. Profit/Loss %

22.65 %

 Avg. Weeks Held

23.95

 

Winners

550 (61.73 %)

 Total Profit

830613633.18

 Avg. Profit

1510206.61

 Avg. Profit %

44.76 %

 Avg. Weeks Held

31.97

 Max. Consecutive

60

 Largest win

190225591.70

 # Weeks in largest win

82

 

Losers

341 (38.27 %)

 Total Loss

-132680852.34

 Avg. Loss

-389093.41

 Avg. Loss %

-13.01 %

 Avg. Weeks Held

11.01

 Max. Consecutive

16

 Largest loss

-8,200,290.10

 # Weeks in largest loss

14

 

Max. trade drawdown

-73441173.96

Max. trade % drawdown

-56.68 %

Max. system drawdown

-240907527.02

Max. system % drawdown

-13.71 %

Recovery Factor

2.91

CAR/MaxDD

2.58

RAR/MaxDD

2.95

Profit Factor

6.26

Payoff Ratio

3.88

Standard Error

62010750.13

Risk-Reward Ratio

7.42

Ulcer Index

3.77

Ulcer Performance Index

7.94

Profit distribution

 

 

Max. Adverse Excursion distribution

Max. Favorable Excursion distribution

 

 

Sweet Exhaustion System

I wrote a book about the system bellow (Light Gains… Greater Profits) The system applies a very short term trading strategy with an average holding time of approximately 5.6 days. In the test period of 1/1/2004-9/23/2004 this system achieved an annual return of 30.47% and a total return of 21.13%. The average profit was 0.59%, with 47.55% of trades profitable. There were 68 winning trades and 75 losers. The maxim system drawdown was –10.34%. The chart below shows an example of a buy (Green Arrow) on ESPD and then a profit exit (Red Arrow).

Sweet Exhaustion system 1/1/2004 – 9/23/2004.

graph