Stock Price Prediction of Thai Oil Public Company Limited (TOP.BK) Using LSTM Model with Grid Search Hyperparameter optimization

(1) * Sutthipong Sanhatham Mail (Mahidol University, Thailand)
*corresponding author

Abstract


This study examines the effectiveness of the Long Short-Term Memory (LSTM) model in predicting stock price movements of Thai Oil Public Company Limited (TOP.BK). Using historical stock price data of the past five years, we apply the LSTM neural network architecture to model temporal patterns and predict future stock prices. The model is compared with traditional time series approaches such as ARIMA and other statistical models. Results show that the LSTM model optimized by Grid Search achieves excellent performance with Root Mean Square Error (RMSE) of 1.00 and Mean Absolute Error (MAE) of 0.75 on the test data, with prediction accuracy reaching 98.32%. The model also showed a high coefficient of determination (R²) of 0.8715 on the test data, demonstrating the model's ability to explain most of the variation in the data. This research proves that the LSTM model is highly effective for stock price prediction in the oil and gas industry, with important implications for investment strategies and risk management.

   

DOI

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

Article metrics

10.33292/ijarlit.v2i1.34 Abstract views : 95 | PDF views : 44

   

Cite

   

Full Text

Download

References


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

T. Fischer and C. Krauss, "Deep learning with long short-term memory networks for financial market predictions," Eur. J. Oper. Res., vol. 270, no. 2, pp. 654-669, 2018.

D. M. Q. Nelson, A. C. M. Pereira, and R. A. De Oliveira, "Stock market's price movement prediction with LSTM neural networks," in 2017 International joint conference on neural networks (IJCNN), 2017, pp. 1419-1426.

S. Mehtab and J. Sen, "A Robust Predictive Model for Stock Price Prediction Using Deep Learning and Natural Language Processing," SSRN Electron. J., 2019, doi: 10.2139/ssrn.3502624.

L. Tian, L. Feng, Y. Sun, and Y. Guo, "Forecast of LSTM-XGBoost in Stock Price Based on Bayesian Optimization," Intell. Autom. Soft Comput., vol. 29, no. 3, pp. 855-868, 2021, doi: 10.32604/iasc.2021.016805.

B. L. Shilpa and B. R. Shambhavi, "Combined Deep Learning Classifiers for Stock Market Prediction: Integrating Stock Price and News Sentiments," Kybernetes, vol. 52, no. 3, pp. 748-773, 2021, doi: 10.1108/k-06-2021-0457.

A. Kelotra and P. Pandey, "Stock Market Prediction Using Optimized Deep-ConvLSTM Model," Big Data, vol. 8, no. 1, pp. 5-24, 2020, doi: 10.1089/big.2018.0143.

S. Dong and A. Wang, "Systematic Optimization of Long Short-Term Memory Model for Predicting NYSE Arca Airline Index (XAL) During COVID-19," J. Student Res., vol. 10, no. 1, 2021, doi: 10.47611/jsrhs.v10i1.1297.

T. Kim and H. Y. Kim, "Forecasting Stock Prices With a Feature Fusion LSTM-CNN Model Using Different Representations of the Same Data," PLoS One, vol. 14, no. 2, p. e0212320, 2019, doi: 10.1371/journal.pone.0212320.

Y. Gao, R. Wang, and E. Zhou, "Stock Prediction Based on Optimized LSTM and GRU Models," Sci. Program., vol. 2021, pp. 1-8, 2021, doi: 10.1155/2021/4055281.

J. Cao, Z. Li, and J. Li, "Financial Time Series Forecasting Model Based on CEEMDAN and LSTM," Phys. a Stat. Mech. Its Appl., vol. 519, pp. 127-139, 2019, doi: 10.1016/j.physa.2018.11.061.

H. Fan, M. Jiang, L. Xu, H. Zhu, J. Cheng, and J. Jiang, "Comparison of Long Short Term Memory Networks and the Hydrological Model in Runoff Simulation," Water, vol. 12, no. 1, p. 175, 2020, doi: 10.3390/w12010175.

K. Niu, X. Luo, S. Zhang, Z. Teng, T. Zhang, and Y. Zhao, "iEnhancer-EBLSTM: Identifying Enhancers and Strengths by Ensembles of Bidirectional Long Short-Term Memory," Front. Genet., vol. 12, 2021, doi: 10.3389/fgene.2021.665498.

K. Sofi, A. S. Sunge, S. R. Riady, and A. Z. Kamalia, "Comparison of Linear Regression, Lstm, and Gru Algorithms in Predicting Stock Prices with Time Series Models," Seminastika, vol. 3, no. 1, pp. 39-46, 2021, doi: 10.47002/seminastika.v3i1.275.

Q. Zou, P. Xing, L. Wei, and B. Liu, "Gene2vec: Gene Subsequence Embedding for Prediction of Mammalian N6-Methyladenosine Sites From mRNA," Rna, vol. 25, no. 2, pp. 205-218, 2018, doi: 10.1261/rna.069112.118.

F. Kratzert, D. Klotz, G. Shalev, G. Klambauer, S. Hochreiter, and G. Nearing, "Towards Learning Universal, Regional, and Local Hydrological Behaviors via Machine Learning Applied to Large-Sample Datasets," Hydrol. Earth Syst. Sci., vol. 23, no. 12, pp. 5089-5110, 2019, doi: 10.5194/hess-23-5089-2019.

J. Hardin and J. Reps, "Evaluating the Impact of Covariate Lookback Times on Performance of Patient-Level Prediction Models," BMC Med. Res. Methodol., vol. 21, no. 1, 2021, doi: 10.1186/s12874-021-01370-2.

C. Xu, D. Chai, J. He, X. Zhang, and S. Duan, "InnoHAR: A Deep Neural Network for Complex Human Activity Recognition," Ieee Access, vol. 7, pp. 9893-9902, 2019, doi: 10.1109/access.2018.2890675.

E. Ahmadzadeh, H. Kim, O. Jeong, and I. Moon, "A Novel Dynamic Attack on Classical Ciphers Using an Attention-Based LSTM Encoder-Decoder Model," Ieee Access, vol. 9, pp. 60960-60970, 2021, doi: 10.1109/access.2021.3074268.

K. Zhang, D. Chen, B. Guo, J. Chen, and B. Xiao, "Density Limit Disruption Prediction Using a Long Short-Term Memory Network on EAST," Plasma Sci. Technol., vol. 22, no. 11, p. 115602, 2020, doi: 10.1088/2058-6272/abb28f.

N. Tüfek, M. Yalcin, M. Alt?nta?, F. Kalao?lu, Y. Li, and S. K. Bahad?r, "Human Action Recognition Using Deep Learning Methods on Limited Sensory Data," IEEE Sens. J., vol. 20, no. 6, pp. 3101-3112, 2020, doi: 10.1109/jsen.2019.2956901.

M. Alhussein, K. Aurangzeb, and S. I. Haider, "Hybrid CNN-LSTM Model for Short-Term Individual Household Load Forecasting," Ieee Access, vol. 8, pp. 180544-180557, 2020, doi: 10.1109/access.2020.3028281.


Refbacks

  • There are currently no refbacks.


View My Stats IJARLIT