Comparative Analysis of LSTM and Grid Search Optimized LSTM for Stock Prediction: Case Study of Africa Energy Corp. (AFE.V)

(1) * Boho Mokona Mail (University of Pretoria, South Africa)
(2) Ngezana Shipo Mail (University of Pretoria, South Africa)
*corresponding author

Abstract


This research examines the effectiveness of Long Short-Term Memory (LSTM) neural networks for predicting Africa Energy Corp. (AFE.V) stock prices, comparing a standard LSTM implementation with a Grid Search optimized LSTM model. The research shows that hyperparameter optimization through Grid Search significantly improves prediction accuracy. The optimized LSTM model achieved superior performance across all evaluation metrics, with a test RMSE of 0.01, MAE of 0.01, MAPE of 3.41%, and R² of 0.9518, showing substantial improvement over the model without optimization. These findings emphasize the importance of hyperparameter tuning in deep learning models for financial time series forecasting and provide empirical evidence supporting the application of optimized LSTM networks for stock price prediction.

   

DOI

https://doi.org/10.33292/ijarlit.v2i1.30
      

Article metrics

10.33292/ijarlit.v2i1.30 Abstract views : 131 | PDF views : 40

   

Cite

   

Full Text

Download

References


S. Bekiros, R. Gupta, and C. Kyei, "A Non-Linear Approach for Predicting Stock Returns and Volatility With the Use of Investor Sentiment Indices," Appl. Opt. Econ., vol. 48, no. 31, pp. 2895-2898, 2016, doi: 10.1080/00036846.2015.1130793.

R. Rahgozar, "The Relationship Between Dividend- And Non-Dividend-Paying Stock Prices When Considering Financial Distress," Am. J Financ. Account., vol. 4, no. 1, p. 19, 2015, doi: 10.1504/ajfa.2015.067795.

K. Suphawan, R. Kardkasem, and K. Chaisee, "A Gaussian Process Regression Model for Forecasting Stock Exchange of Thailand," Trends Sci., vol. 19, no. 6, p. 3045, 2022, doi: 10.48048/tis.2022.3045.

S. Hochreiter and J. Schmidhuber, "Long short-term memory," Neural Comput., vol. 9, no. 8, pp. 1735-1780, 1997.

K. Greff, R. K. Srivastava, J. Koutník, B. R. Steunebrink, and J. Schmidhuber, "LSTM: A search space odyssey," IEEE Trans. neural networks Learn. Syst., vol. 28, no. 10, pp. 2222-2232, 2016.

N. Reimers and I. Gurevych, "Optimal hyperparameters for deep lstm-networks for sequence labeling tasks," arXiv Prepr. arXiv1707.06799, 2017.

J. Wong, T. Manderson, M. Abrahamowicz, D. L. Buckeridge, and R. Tamblyn, "Can Hyperparameter Tuning Improve the Performance of a Super Learner?" Epidemiology, vol. 30, no. 4, pp. 521-531, 2019, doi: 10.1097/ede.0000000000001027.

X. Wang et al., "Using Machine Learning to Improve the Accuracy of Genomic Prediction of Reproduction Traits in Pigs," J. Anim. Sci. Biotechnol., vol. 13, no. 1, 2022, doi: 10.1186/s40104-022-00708-0.

J. Bergstra and Y. Bengio, "Random search for hyper-parameter optimization," J. Mach. Learn. Res., vol. 13, no. 1, pp. 281-305, 2012.

P. R. Jolhe et al., "Stock Price Prediction Using Arima Forecasting and LSTM Based Forecasting, Competitive Analysis," Int. J. Res. Appl. Sci. Eng. Technol., vol. 10, no. 11, pp. 117-121, 2022, doi: 10.22214/ijraset.2022.47246.

Y.-L. Lin, C.-J. Lai, and P. Pai, "Using Deep Learning Techniques in Forecasting Stock Markets by Hybrid Data with Multilingual Sentiment Analysis," Electronics, vol. 11, no. 21, p. 3513, 2022, doi: 10.3390/electronics11213513.

A. Lawi, H. Mesra, and S. B. H. Amir, "Implementation of Long Short-Term Memory and Gated Recurrent Units on grouped time-series data to predict stock prices accurately," J. Big Data, vol. 9, no. 1, 2022, doi: 10.1186/s40537-022-00597-0.

M. Li, Y. Zhu, Y. Shen, and M. Angelova, "Clustering-Enhanced Stock Price Prediction Using Deep Learning," World Wide Web, vol. 26, no. 1, pp. 207-232, 2022, doi: 10.1007/s11280-021-01003-0.

Y. Zhao and Z. Chen, "Forecasting Stock Price Movement: New Evidence From a Novel Hybrid Deep Learning Model," J. Asian Bus. Econ. Stud., vol. 29, no. 2, pp. 91-104, 2021, doi: 10.1108/jabes-05-2021-0061.

W. Lu, J. Li, Y. Li, S. Aijun, and J. Wang, "A CNN-LSTM-Based Model to Forecast Stock Prices," Complexity, vol. 2020, pp. 1-10, 2020, doi: 10.1155/2020/6622927.

R. A. Mendoza-Urdiales, J. A. N. Mora, R. J. Santillán-Salgado, and H. V. Herrera, "Twitter Sentiment Analysis and Influence on Stock Performance Using Transfer Entropy and EGARCH Methods," Entropy, vol. 24, no. 7, p. 874, 2022, doi: 10.3390/e24070874.

S. Gite, H. Khatavkar, K. Kotecha, S. Srivastava, P. Maheshwari, and N. Pandey, "Explainable Stock Prices Prediction From Financial News Articles Using Sentiment Analysis," Peerj Comput. Sci., vol. 7, p. e340, 2021, doi: 10.7717/peerj-cs.340.

T. Zhu, Y. Liao, and T. Zheng, "Predicting Google's Stock Price With LSTM Model," Proc. Bus. Econ. Stud., vol. 5, no. 5, pp. 82-87, 2022, doi: 10.26689/pbes.v5i5.4361.

J. Sola and J. Sevilla, "Importance of input data normalization for the application of neural networks to complex industrial problems," IEEE Trans. Nucl. Sci., vol. 44, no. 3, pp. 1464-1468, 1997.

K. J. Murphy, "Executive compensation," Handb. labor Econ., vol. 3, pp. 2485-2563, 1999.

O. B. Sezer, M. U. Gudelek, and A. M. Ozbayoglu, "Financial time series forecasting with deep learning: A systematic literature review: 2005-2019," Appl. Soft Comput., vol. 90, p. 106181, 2020.

B. K. Iwana and S. Uchida, "An empirical survey of data augmentation for time series classification with neural networks," PLoS One, vol. 16, no. 7, p. e0254841, 2021.

D. P. Kingma and J. Ba, "Adam: A method for stochastic optimization," arXiv Prepr. arXiv1412.6980, 2014.


Refbacks

  • There are currently no refbacks.


View My Stats IJARLIT