Developing a Trading System

By: Murray A. Ruggiero

The following is an excerpt from Cybernetic Trading Strategies

Developing a trading system can be a very difficult process if you do not understand the steps involved in building a reliable and profitable system.  If you understand the steps and have trading methods that are sound, it is less difficult to build successful trading systems.

STEPS FOR DEVELOPING A TRADING SYSTEM

To give you an overview of how to build a trading system, the necessary steps are listed in the following table.

Let's now discuss each of these steps in more detail.

SELECTING A MARKET FOR TRADING

You should select a market that offers you access to domain expertise.  When developing a trading system for a given market, you need to understand what factors affect price movements in that market.  If you want to develop a system that works on multiple markets, it is important to understand the potential markets well enough to find common technical characteristics that can be used in developing a multimarket trading system.

STEPS IN DEVELOPING A SYSTEM.

  1. Decide what market and time frame you want to trade.
  2. Develop a premise that you will use to design your trading system.
  3. Collect and organize the historical market data needed to develop your model into development, testing, and out-of-sample sets.
  4. Based on the market you want to trade, and your premise, select trading methods that are predictive of that market and meet your own risk-reward criteria.
  5. Design your entries and test them using simple exits.
  6. Develop filters that improve your entry rules.
  7. After you have developed your entries, design more advanced exit methods that will improve your system's performance.
  8. When selecting the parameters that will be used in your trading system, base your selections not only on system performance but also on robustness.
  9. After you have developed your rules and selected your parameters, test the system on your testing set to see how the system works on new data.  If the system works well, continue to do more detailed testing. 
  10. Repeat Steps 3 through 9 until you have a system that you want to test further.

After you have selected your market(s), it is very important to decide what time frame you want to trade on and to have an idea of how long you would like your average trade to last.

Selecting a time frame means deciding whether to use intraday, daily, or weekly data.  Your decision on a time frame should be based on both how often you want to trade and how long each trade should last.  When you use a shorter time frame, trading frequency increases and length of trade decreases.

Another little discussed issue is that each time frame and each market has its own traits.  For example, on the intraday S&P 500, the high and/or low of the day is most likely to occur in the first or last 90 minutes of the day.

When using daily data, you can have wide variation in trade length – from a few days to a year, depending on what types of methods are used to generate your signals.  For example, many of the intermarket-based methods for trading T-Bonds, have an average trade length of 10 days, whereas a simple channel breakout system has an average trade length of 50 to 80 days.

Other issues also have an effect on your choice – how much money you have to trade, and your own risk-reward criteria.  For example, if you only have $10,000.00, you would not develop an S&P 500 system that holds an overnight position.  A good choice would be T-Bonds.

DEVELOPING A PREMISE

The second and most important step in developing a trading system is to develop a premise or theory about the market you have selected.  There are many rich sources for theories that are useful in developing systems for various markets.  Some of these sources are listed in the table below.

DEVELOPING DATA SETS

After you select the market and time frame you want to trade, you need to collect and organize your historical data into three sets: (1) the development set, which is used to develop your trading rules;  (2) a test set, where your data are used to test these rules; and (3) a blind or out-of-sample set, which is used only after you have selected the final rules and parameters for your system.  In developing many systems over the years, I have found that one of the important issues involved in collecting these data is whether we should use individual contracts or continuous contracts for the futures data we need to use.

PREMISES FOR TRADING SYSTEMS

  1. Intermarket analysis.
  2. Sentiment indicators.
  3. Market internals – for example, for the S&P 500, we would use data such as breadth, arm index, the premium between the cash and futures, and so on.
  4. Mechanical models of subjective methods.
  5. Trend-based models.
  6. Seasonality, day of week, month of year, and so on.
  7. Models that analyze technical indicators or price-based patterns.

It is much easier to use continuous contracts, at least for the development set, and the continuous contracts should be back adjusted.  Depending on your premise, you might need to develop data sets not only for the market you are trading but also for related markets; that is if we were developing a T-Bond system using intermarket analysis, we would want to also have a continuous contract for the CRB futures.

The next important issue is how much data you need.  To develop reliable systems, you should have at least one bull and one bear market in your data set.  Ideally, you should have examples of bull and bear markets in both your development set and your test set.  I have found that having at least 10 years' daily data is a good rule of thumb.

Next week we will continue this discussion with: Selecting Methods For Developing A Trading System.