Moving averages and other prices are bad neural net inputs

Many people love moving averages, especially adaptive moving averages. However, they are really bad inputs to neural nets in their raw form. So are open, high, low, close, and any other indicators that look like price. That includes things like Bollinger bands, or any sort of similar price levels. The reason is that most stocks or other issues have, over time, visited many price levels. Price patterns learned by a neural net when the price was $20 are completely irrelevant to the neural net when the price reaches $40.

Suppose your stock has only traded in a narrow range over the time period that you are training the net – are patterns that look like price good then? The answer is probably so as long as the price continues in that narrow range. But if the stock starts rising or falling, the net isn’t going to know what to do in the future. Also, if you decide to train a net over all chart pages (which creates a training set out of all the stocks or issues in the chart) then you have the same problem unless ALL issues in the chart have prices in exactly the same narrow range, which is not likely.

So what should you do? Use change or better yet percent change in prices. You can still use moving averages if you use the spread between two of them or better yet the percent spread. If you want to use bands, use percent spread between them, or between them and the price. Ratios are good substitutes for spreads and percent spreads.

Another thing you can do is put a straight line through the price or moving average or band and then feed the slope of that line into the neural net. The indicator which does that for you is in the Regression category and is called “Linear Time Regression: Coefficient of Regression (Slope)”

Was this article helpful?

Related Articles