Improving Stock Prediction Accuracy Using CNN and LSTM
MetadataShow full item record
Stock price modeling and prediction is a challenging task due to its non-stationary and dynamic nature of data. Developing an accurate stock prediction method can help investors in making profitable decisions by reducing the investment risks. This paper proposes a deep learning-based method for significantly improving the stock prediction accuracy using deep learning-based methods. Two well-known methods were investigated, namely one dimensional Convolutional Neural Network (1D-CNN) and the Long Short-Term Memory (LSTM). In addition, we also investigated the effect of dimensionality reduction using principal component analysis (PCA) on the prediction accuracy of both 1D-CNN and LSTM. Two separate experiments were performed for each method, one with PCA and one without PCA. The experimental results indicated that LSTM with PCA produced the best results with mean absolute error (MAE) of 0.032, 0.084, and 0.044 while a root mean square error (RMSE) of 0.0643, 0.172, 0.079 on Apple Inc., Amerisource Bergen Corporation, and Cardinal Health datasets. The LSTM network with PCA took an average of 421.8s for training. Contrarily, 1D-CNN model with PCA performed better in terms of computational time as it took only 37s for training and attained MAE of 0.039 and RMSE of 0.0706 on Apple Inc. dataset. Similarly, 1D-CNN took 36.5s for training while achieving 0.099 MAR and 0.2021 RMSE on Amerisource Bergen Corporation dataset, while 37.5s for training that secured 0.067 MAE and 0.1037 RMSE on Cardinal Health dataset. © 2020 IEEE.