Modification of the LSTM Model in Time Series Data Prediction
Abstract
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.
Downloads
References
[2] Y. Lin, Y. Yan, J. Xu, Y. Liao, and F. Ma, “Forecasting stock index price using the CEEMDAN-LSTM model,” North American Journal of Economics and Finance, vol. 57, Jul. 2021, doi: 10.1016/j.najef.2021.101421.
[3] Y. Huang, Y. Song, and Z. Jing, “Load forecasting using federated learning with considering electricity data privacy preservation of EASP,” Ain Shams Engineering Journal, vol. 15, no. 6, Jun. 2024, doi: 10.1016/j.asej.2024.102724.
[4] Y. Tadayonrad and A. B. Ndiaye, “A new key performance indicator model for demand forecasting in inventory management considering supply chain reliability and seasonality,” Supply Chain Analytics, vol. 3, Sep. 2023, doi: 10.1016/j.sca.2023.100026.
[5] Y. Ensafi, S. H. Amin, G. Zhang, and B. Shah, “Time-series forecasting of seasonal items sales using machine learning – A comparative analysis,” International Journal of Information Management Data Insights, vol. 2, no. 1, Apr. 2022, doi: 10.1016/j.jjimei.2022.100058.
[6] N. Azahra, S. C. Alifia, N. P. Andyka, S. Wijayanto, and M. Y. Fathoni, “Peramalan Jumlah Produksi Tebu Menggunakan Metode Time Series Model Moving Averages,” JURIKOM (Jurnal Riset Komputer), vol. 9, no. 4, p. 840, Aug. 2022, doi: 10.30865/jurikom.v9i4.4388.
[7] B. D. Cahyono, D. Swanjaya, and S. Rochana, “Perbandingan Metode Exponential Smoothing Pada Prediksi Harga Penutupan Harian Cryptocurrency Penulis Korespondensi,” Online, 2024.
[8] B. Jange, P. Studi, K. Akuntansi, and D. Riau, “Prediksi Harga Saham Bank BCA Menggunakan Prophet,” 2021.
[9] Q. Q. He, C. Wu, and Y. W. Si, “LSTM with particle Swam optimization for sales forecasting,” Electronic Commerse Research and Applications, vol. 51, Jan. 2022, doi: 10.1016/j.elerap.2022.101118.
[10] A. Kurniawati, M. Sabri Ahmad, M. Fhadli, and S. Lutfi, “ANALISIS PERBANDINGAN METODE TIME SERIES FORECASTING UNTUK PREDIKSI PENJUALAN OBAT DI APOTEK (STUDI KASUS: KIMIA FARMA APOTEK TAKOMA),” 2023.
[11] Y. Setiawan and P. Kartikasari, “PREDIKSI HARGA JUAL KAKAO DENGAN METODE LONG SHORT-TERM MEMORY MENGGUNAKAN METODE OPTIMASI ROOT MEAN SQUARE PROPAGATION DAN ADAPTIVE MOMENT ESTIMATION DILENGKAPI GUI RSHINY,” vol. 11, no. 1, pp. 99–107, 2022, [Online]. Available: https://ejournal3.undip.ac.id/index.php/gaussian/
[12] R. Darmawan and S. Amini, “Perbandingan Hasil Sentimen Analysis Menggunakan Algoritma Naïve Bayes dan K-Nearest Neighbor pada Twitter Comparison of Sentiment Analysis Results Using Naïve Bayes and K-Nearest Neighbor Algorithm on Twitter,” 2022. [Online]. Available: https://senafti.budiluhur.ac.id/index.php/
[13] M. Reyad, A. M. Sarhan, and M. Arafa, “A modified Adam algorithm for deep neural network optimization,” Neural Computing and Applications, vol. 35, no. 23, pp. 17095–17112, Aug. 2023, doi: 10.1007/s00521-023-08568-z.
[14] J. J. Pangaribuan, F. Fanny, O. P. Barus, and R. Romindo, “Prediksi Penjualan Bisnis Rumah Properti Dengan Menggunakan Metode Autoregressive Integrated Moving Average (ARIMA),” Jurnal Sistem Informasi Bisnis, vol. 13, no. 2, pp. 154–161, Oct. 2023, doi: 10.21456/vol13iss2pp154-161.
[15] A. Arkadia, B. Hananto, and D. S. Prasvita, “Optimasi Long Short Term Memory Dengan Adam Menggunakan Data Udara Kota DKI Jakarta,” 2022.
[16] S. Hochreiter and J. ¨ Urgen Schmidhuber, “Long Short-Term Memory.”
[17] T. Ericko, M. Dolok Lauro, and T. Handhayani, “Jurnal Ilmu Komputer dan Sistem Informasi PREDIKSI HARGA PANGAN DI PASAR TRADISIONAL KOTA SURABAYA DENGAN METODE LSTM.” [Online]. Available: https://www.bi.go.id/hargapangan
[18] Y. Lin, Y. Yan, J. Xu, Y. Liao, and F. Ma, “Forecasting stock index price using the CEEMDAN-LSTM model,” North American Journal of Economics and Finance, vol. 57, Jul. 2021, doi: 10.1016/j.najef.2021.101421.
[19] N. Awalloedin, W. Gata, and H. Setiawan, “Prediksi Harga Beras Super dan Medium Menggunakan LSTM dan BILSTM (Moving Average Smoothing),” Jurnal Ilmu Komputer, vol. 16, no. 1, [Online]. Available: https://hargapangan.id/
[20] J. Heaton, “Ian Goodfellow, Yoshua Bengio, and Aaron Courville: Deep learning,” MIT Press, vol. 19, no. 1–2, pp. 305–307, Jun. 2018, doi: 10.1007/s10710-017-9314-z.

This work is licensed under a Creative Commons Attribution 4.0 International License.
The Authors submitting a manuscript do so on the understanding that if accepted for publication, the copyright of the article shall be assigned to Jurnal Lontar Komputer as the publisher of the journal. Copyright encompasses exclusive rights to reproduce and deliver the article in all forms and media, as well as translations. The reproduction of any part of this journal (printed or online) will be allowed only with written permission from Jurnal Lontar Komputer. The Editorial Board of Jurnal Lontar Komputer makes every effort to ensure that no wrong or misleading data, opinions, or statements be published in the journal.
This work is licensed under a Creative Commons Attribution 4.0 International License.