Of course, as with all networks, the key to success is choosing the correct predictive variables. Current prices, moving averages, lagged prices, price changes, and related indicators are good basic variables from which the network can start, but try to find indicators that precede a price change. Picking which variables to include in your neural network is crucial to making your neural network work properly. These will be the network’s inputs.
Note: You must choose data that is available at the time the prediction is made. This excludes indicators that incorporate future data (i.e., use of the lead indicator) because this is providing future data that is not know at the time of prediction, and the prediction will not extend into the future due the need for future data as an input.
Neuron Strength
A neural network expects each input to be a continuous variable that represents the strength of the input neuron. Therefore, a numeric input is really the strength of the input neuron. For example, suppose the input is annual rainfall ranging from 0 to 25 inches. You can see that the input is the “strength” of the rainfall.
But suppose you try to define an input that is a US state code from 1 to 50, where 1 is Alabama, 2, is Alaska, and so on to 50 for Wyoming. Because the neural network thinks the input is strength, it will assume that Alaska is very much like Alabama, and a lot different from Wyoming, which probably doesn’t make any sense.
Suppose you are attempting to predict the yields of municipal bonds, a useful input might be in which state the municipal bond resides. There are several ways you could handle the input:
-
Order the states by some meaningful ranking criteria, like average income of the inhabitants, gross tax income per person, etc. Then you can use a code from 1 to 50 where 1 is the highest income, 50 is the lowest income, or 1 is the least taxed, 50 is the most taxed, etc.
-
Make 50 inputs, one for each state. One State variable will be on (coded as 1) and the others will be off (coded as 0). This is a valid method of representing up to about 10 categories, however for the States example this method would produce too many variables for the net to learn.
-
Make 50 predictive nets, one for each state.
Market Variables
Users doing financial applications or other time series problems may use fundamental indicators in addition to raw price data, such as interest rates, price of gold, etc. They may also find it helpful to create additional input variables derived from the raw input data they already have, such as lagged versions or averages of the raw data.
When deciding on variables, it’s usually better to include more variables than not enough variables (up to a point). Include all of the inputs that seem reasonable because neural networks can find subtle differences in data patterns that even our brains can’t discern. Too many inputs will cause the net to over-train, meaning the net will learn the training data very well, but do poorly on out of sample examples (your evaluation set). A good number of inputs to use is between 6 and 30 for financial problems. You should also use at least 10 times as many training patterns as inputs. However, even if you have thousands of training samples (data in the training set), you should try to limit your number of inputs to fewer than 30.
Indicators
Users doing financial applications or other time series problems may find it helpful to create additional input variables derived from the raw input data they already have. Some examples of these additional inputs are:
-
Lagged versions of the raw data. For example, if your raw data is today’s price and you are trying to predict tomorrow’s price, then it may be helpful to include yesterday’s price, and the price the day before as well.
-
Averages of previous raw data (i.e., rolling averages)
-
Changes (deltas) in the raw data. For example, you might want the difference in today’s price and yesterday’s price. You can also lag or average changes in the raw data.
These are just a few examples and certainly are not the best indicators that can be used. For more information on Indicators see What are Indicators?
Using Predictions as inputs to Predictions
Some users have found that it is useful to use the results of one prediction as an input to another prediction. This may be considered by some as one expert using another expert’s analysis to make their own analysis. If you decide that you want to use this method be sure to review Using Predictions.
Topic of Interest:
What are Neural Networks?