1

I am currently trying to create a Neural Network with pybrain for stock price forecasting. Up to now I have only used Networks with a binary output. For those Networks sigmoid inner layers were sufficient but I don't think this would be the right approach for Forecasting a price. The problem is, that when I create such a completely linear network I always get an error like

RuntimeWarning: overflow encountered in square while backprop training.

I already scaled down the inputs. Could it be due to the size of my training sets (50000 entries per training set)? Has anyone done something like this before?

mattbasta
  • 13,492
  • 9
  • 47
  • 68
Momo
  • 73
  • 1
  • 4
  • Also what I have read about neural networks is that if you have all linear layers then the network can only model a linear function. If you want to be able to model non-linearity than you need some non-linear activation function (such as sigmoid): ftp://ftp.sas.com/pub/neural/FAQ2.html#A_act – User Apr 13 '12 at 16:32

1 Answers1

1

Try applying log() to the price-attribute - then scale all inputs and outputs to [-1..1] - of course, when you want to get the price from the network-output you'll have to reverse log() with exp()

Fluchtpunkt
  • 447
  • 5
  • 11