PREDICTING NVIDIA STOCK PRICES USING LSTM NEURAL NETWORK







- Slides: 7
PREDICTING NVIDIA STOCK PRICES USING LSTM NEURAL NETWORK Alec Scheele CS 539
Summary • Goal: Predict the price that Nvidia (NYSE: NVDA) stock will open and close at tomorrow • Accomplished: • Collect and organize data • Code LSTM neural network in Python using Tensorflow and Keras and train on Nvida stock price data training set • Test Model on testing set • Remaining • Optimize and Improve Model • Write Report • Level of Success • Predicted prices follow approximate trend but I do not have any real daily directional accuracy
Data • Data sets downloaded from Kaggle • NVidia price data from 1/22/1999 to 11/10/2017 • NDXT index price data from 2/22/2006 to 1/19/2018 • S&P 500 index price data from 1/4/2010 to 8/7/2018 • VIX data from 1/2/2004 to 1/19/2018 • Python (Pandas package) to organize, scale and add technical analysis indicators • Technical Analysis Indicators: • Moving Average Convergence Divergence (MACD) • Average True Range (ATR) • Price Rate of Change (ROC) • 10 Day Moving Average
Program and Platform • Keras API • Tensorflow backend • Code to organize the data, set model specifics and train and test model are written from scratch, however Keras and Tensorflow do the heavy lifting • Platform: Mac. Book. Pro with Intel i 7 CPU and 16 GB Ram
Network • 5 LSTM Layers each with 100 Neurons • 1 Output Layer • Trained over 500 epochs • Mean Squared Error loss function • 1981 Training Data Points • 297 Testing Data Points
Results • • Orange = Actual Close Blue = Actual Open Green = Predicted Open Red = Predicted Close
Results Discussion and Lessons • The model can predict the approximate trend • More epochs are needed to improve accuracy • Regularization should be added to avoid over fitting training data • Experimentation with additional layers • Experimentation with additional neurons in each layer • Training is computationally intensive







