Developing a Neural Network Based on an Existing System

By: Murray Ruggiero

The following is an excerpt from Murray Ruggiero's Cybernetic Trading Strategies

One of the most powerful but easiest approaches for building a neural-network-based model begins with an existing tradable rule-based system.  In this approach, we break a rule-based model into its components, which can be used in developing a neural network.  This process allows us to develop a tradable neural network model because our goal is to improve the existing system, not to develop a new one from scratch.

Let’s investigate the process of developing a neural network based on an existing trading system.  The steps below list some of the applications of neural networks that are developed using existing trading systems.  As you can see, the range of applications is broad.

  1. Develop a good rule-based system first, using as few parameters as possible.  Ideally, use fewer than four parameters in the system.  Keep the system simple, without any fancy filters or exit rules.  It will be the neural network’s job to use the extra information you are supplying to improve your results.  The extra inputs can include any information that you would have used to filter the original system.
  2. Analyze the results of your rule-based system.  Examine where your entries and exits occur, and take into account the premise of the system.  Analyze the trade-by-trade results to try to discover how a discretionary trader might have used the system as an indicator and outperformed the system.
  3. Use your analysis to develop your target output.
  4. After selecting your output, develop your inputs based on the original indicators used in your rule-based system, plus any filter you would have used.  Add inputs based on how a human expert trader would have used this system as part of his or her discretionary trading.
  5. Develop your data sets, using the first 80 percent to train your model.  The remaining 20 percent will be used for the testing set and the out-of-sample set.  Normally, 15 percent of the data is used for the testing set and the remaining 5 percent is used for the out-of-sample set.  These numbers are not set in stone; they are only guides.
  6. Train your model then test it on the testing set.  Repeat this process three to five times, using different initial weights.  Neural networks that perform well on both the training set and the testing set, and perform similarly across multiple trainings, are more likely to continue their performance into the future.
  7. After you have developed a good neural network that performs well and is stable, analyze it to see whether it can be improved.  One method I use is to analyze the training period to see whether there are any periods in which it has performed badly for an extended time.  Next, compare these results to the original system.  If both the network and the system performed badly during the same period, add new indicators than can filter out the times when the premise system is based on performs badly.  If the network performs badly while the original system performs well, change the transforms used on the original data.
  8. When you have developed an acceptable model, start a process of eliminating inputs and retraining and testing the model to produce the best possible model with the smallest number of inputs and hidden nodes.
  9. After you have finished developing your neural network, analyze the model so that you can develop the best possible trading strategy based on this model.  Often, patterns in the output of neural networks can tell you when a given forecast may be right or wrong.  One of the simplest and most common relationships is that the accuracy of a forecast is often higher when the absolute value of the output of the neural network is above a given level.

TYPES OF NEURAL NETWORKS THAT CAN BE
DEVELOPED USING AN EXISTING TRADING SYSTEM

1. Breakout-type systems

2. Moving-average crossover systems

3. Oscillator-type countertrend systems

4. Inter-market divergence-type systems

We can use a neural network to supercharge systems based on the concepts provided here, as well as many other types of systems.