Lontar Komputer (Jun 2025)

Modification of the LSTM Model in Time Series Data Prediction

  • Daniel Robi Sanjaya,
  • Bayu Surarso,
  • Tarno Tarno

DOI
https://doi.org/10.24843/LKJITI.2025.v16.i01.p02
Journal volume & issue
Vol. 16, no. 1
pp. 14 – 26

Abstract

Read online

Accurate stock price forecasting is crucial in supporting investment decision-making, especially during stock price fluctuations. This research aims to improve the accuracy of stock price prediction on time series data through modification of the Long Short-Term Memory (LSTM) model. The modification is done by simplifying the hyperparameters, adding dense layers, and applying the Adam optimizer. In addition, this research also aims to compare the prediction error rate of the LSTM model with several other methods using the Mean Absolute Percentage Error (MAPE) metric. The results show that the modified LSTM model produces lower MAPE on different stock data, namely 3.51% (train) and 1.65% (test) for ANTM.JK, 2.24% (train) and 1.69% (test) for BBRI.JK, 2.17% (train) and 1.52% (test) for BBCA.JK, and 3.06% (train) and 1.43% (test) for BBNI.JK. This model outperforms the LSTM method before modification and other methods such as RNN, CNN, SES, WMA, and Facebook Prophet. This finding shows that LSTM modification significantly improves the accuracy of stock price prediction.