RNN and stock price prediction – what and how

Feedforward networks, such as densely connected networks, have no memory and treat each input as a whole. For example, an image input represented as a vector of pixels gets processed by a feedforward network in one single step. But time series data, such as stock prices for the last 10 or 20 days, are better processed with a network with memory; assume the prices of the past 10 days are X1, X2, ..., X10, with X1 being the oldest and X10 the latest, then all 10-day prices can be treated as one sequence input, and when RNN processes such an input, the following steps occur:

  1. A specific RNN cell, connected to the first element, X1, in the sequence, processes X1 and gets its output, y1
  2. Another RNN ...

Get Intelligent Mobile Projects with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.