December 2018
Beginner to intermediate
684 pages
21h 9m
English
We will generate sequences of 63 trading days, approximately three months, and use a single LSTM layer with 20 hidden units to predict the index value one time step ahead.
The input to every LSTM layer must have three dimensions:
Our S&P 500 sample has 2,264 observations or time steps. We will create overlapping sequences using a window of 63 observations each.
For a simpler window of size T = 5, we obtain input-output pairs as shown in the following code snippet:
We can use the create_univariate_rnn_data() ...