Comparative Analysis of Long Short-Term Memory and Random Forest Models for GULF Stock Closing Price Prediction

Authors

  • Kanin Pongtanavong Faculty of Science at Sriracha, Kasetsart University, Sriracha Campus, Thailand
  • Narongrit Kaewbanjak Faculty of Science at Sriracha, Kasetsart University, Sriracha Campus, Thailand

Keywords:

Stock Closing Price Prediction, Machine Learning, Deep Learning, Random Forest Model, Long Short-Term MemoryModel

Abstract

In this study, we conducted a comparative analysis of the performance of a Random Forest model and a Long Short-term Memory model (LSTM) in predicting the closing price of GULF stock which has the characteristics of a growth stock. The data used in this study included closing and opening prices from March 21, 2018, to December 31, 2022, along with technical indicators such as EMA, TEMA, and WMA. Three comparative studies were conducted: the first case utilized a Random Forest model with optimal parameters, the second one utilized an LSTM model with optimal parameters, and the third case was similar to the second one but with a modification in the activation function from Hyperbolic Tangent function (Tanh) to Exponential Linear Unit function (ELU). The performance of these three models was evaluated based on the error values and the predicted value graphs. Our findings indicate that the Random Forest model had the lowest performance for GULF stock closing price prediction among the three cases. Conversely, the modified LSTM model with the ELU activation function in the third case demonstrated the highest performance among the three cases.

References

Bhandari, H. N., Rimal, B., Pokhrel, N. R., Rimal, R., Dahal, K. R., & Khatri, R. K. (2022). Predicting stock market index using LSTM. Machine Learning with Applications, 9, 100320. https://doi.org/10.1016/j.mlwa.2022.100320

Boongasame, L. (2021). DEEP LEARNING.Paper Print Publishing.

Breiman, L. (2001). Random Forests. Machine Learning,45(1), 5-32. https://doi.org/10.1023/A:1010933404324

Chollet, F., & others. (2015). Keras. Retrieved from https://keras.io

Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. MIT Press. Retrieved from http://www.deeplearningbook.org

Goswami, S., & Yadav, S. (2021). Stock Market Prediction Using Deep Learning LSTM Model.2021 International Conference on Smart Generation Computing, Communication and Networking (SMART GENCON), Pune, India, 2021, pp. 1-5. https://doi.org/10.1109/SMARTGENCON51891.2021.9645837.

Hansun, S. (2013). A new approach of moving average method in time series analysis. 2013 Conference on New Media Studies (CoNMedia).

Huang, J.-Z., Huang, W., & Ni, J. (2019). Predicting bitcoin returns using high-dimensional technical indicators. The Journal of Finance and Data Science,5(3), 140-155. https://doi.org/10.1016/j.jfds.2018.10.001

Kaewmaha, W., & Punyachatporn, V. (2021). Predicting Stock Return Using Machine Learning. Journal of Innovation in Business, Management, and Social Sciences,2(3), 108-123.

M. R. Vargas, B. S. L. P. de Lima and A. G. Evsukoff. (2017). Deep learning for stock market prediction from financial news articles.In 2017 IEEE International Conference on Computational Intelligence and Virtual Environments for Measurement Systems and Applications (CIVEMSA), Annecy, France, 2017, pp. 60-65. https://doi.org/10.1109/CIVEMSA.2017.7995302.

Mulloy, P. G. (1994). Smoothing Data With Less Lag. Technical Analysis of Stocks & Commodities, 12(2), 72-80.

Pardeshi, Y., & Kale, P. (2021). Technical Analysis Indicators in Stock Market Using Machine Learning: A Comparative Analysis. In 12th International Conference on Computing Communication and Networking Technologies (ICCCNT).

Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, E. (2011). Scikit-learn: Machine learning in Python. the Journal of machine Learning research, 12, 2825-2830.

Saraubon, K. (2022). Learn AI: Deep Learning with Python. Intermedia Publishing.

Schmidhuber, J., & Hochreiter, S. (1997). Long short-term memory. Neural Comput, 9(8), 1735-1780.https://doi.org/10.1162/neco.1997.9.8.1735

Vijh, M., Chandola, D., Tikkiwal, V. A., & Kumar, A. (2020). Stock Closing Price Prediction using Machine Learning Techniques. Procedia Computer Science,167, 599-606. https://doi.org/https://doi.org/10.1016/j.procs.2020.03.326

Downloads

Published

2024-08-28