Abstract
Stock price prediction targets to predict the future development direction of the stock market and the degree of rise and fall of the stock price according to stock market quotations. However, since the stock price has high nonlinear, high noisy, and dynamic characteristics, it is challenging to predict stock prices. This paper predicts stock price prediction with a long-short term memory (LSTM) model according to the above data characteristics. First, because the stock price is distributed in different price ranges, we pre-process the data by normalizing all the data to the range of 0 to 1. Then, we improve the model performance by adjusting the three main parameters, hidden layers, learning rate, and time window. LSTM adds a control part into LSTM to further catch these data to make the best of historical data. We compare the proposed method with Recurrent Neural Network (RNN) on a related dataset with relative root mean square error (RRMSE), mean absolute error (MAE) and mean absolute error percentage (MAPE). The lower the score on all three indicators, the more accurate the prediction. The experimental results show that the scores of LSTM are lower than RNN in three indicators, so its prediction is more accurate than RNN with appropriate parameters. Our analyses illustrate that LSTM can better predict the dynamic non-linear data like a stock price by considering the historical data.