Analysis of Stock Price Prediction in the Energy Sector Using the Long Short-Term Memory (LSTM) Algorithm

  • Addin Firdaus Alfatah Universitas Singaperbangsa Karawang
  • Betha Nurina Sari Universitas Singaperbangsa Karawang
  • Carudin Carudin Universitas Singaperbangsa Karawang
Keywords: Stock Price, LSTM, Prediction, KDD, Energy Sector

Abstract

Stock prices are time series data that are highly volatile and difficult to predict accurately due to the influence of various internal and external factors. To address this issue, a model is needed that can learn historical patterns and capture long-term dependencies in the data. This study adopts the Knowledge Discovery in Database (KDD) methodology, which consists of five main stages: data selection, data cleaning, transformation, data mining, and evaluation. The dataset used consists of historical stock price data from the energy sector over a five-year period (2019–2023), covering five companies: ELSA, AKRA, INDY, MEDC, and PGAS. The LSTM model was trained using a batch size of 32 and 20 epochs, with an 80:20 train-test data split. Model evaluation was conducted using two main metrics: Root Mean Square Error (RMSE) and Mean Absolute Percentage Error (MAPE). Among the five stocks analyzed, the best results were achieved on ELSA with an RMSE of 12.21 and MAPE of 2.61%, indicating a very high level of prediction accuracy. In conclusion, the LSTM algorithm is capable of predicting stock prices in the energy sector effectively, particularly in recognizing medium-term trends. Although the model still has limitations in capturing sharp price fluctuations, the overall results demonstrate that LSTM is an effective method for stock price prediction based on historical data.

Published
2026-02-15
How to Cite
Alfatah, A., Sari, B., & Carudin, C. (2026). Analysis of Stock Price Prediction in the Energy Sector Using the Long Short-Term Memory (LSTM) Algorithm. Jurnal Ilmiah Wahana Pendidikan, 12(2.D), 45-51. Retrieved from https://jurnal.peneliti.net/index.php/JIWP/article/view/12538

Most read articles by the same author(s)

1 2 > >>