Predict Stock Prices Using RNN: Part 1
Lilian Weng 9 years ago
A tutorial demonstrates how to build a recurrent neural network with LSTM cells using TensorFlow to predict S&P 500 stock prices, using historical daily close prices from January 1950 to June 2017. The model uses sliding windows of fixed size with num_steps set to 30 LSTM cells per layer, trained over a maximum of 50 epochs with an initial learning rate of 0.001. The approach normalizes price data to predict relative changes rather than absolute values, and splits data into 90% training and 10% test sets to evaluate future price predictions.