Prediksi Saham Menggunakan Recurrent Neural Network (RNN-LSTM) dengan Optimasi Adaptive Moment Estimation
Abstract
Predicting stock price movements is a complex challenge in the financial market due to unpredictable price fluctuations and high sensitivity levels. Noise in historical stock price data and temporal dependencies between previous and current prices make recognizing price movement patterns difficult. In a dynamic market environment, the model's ability to generate accurate predictions holds significant implications for more informed investment decision-making. The Recurrent Neural Network - Long Short-Term Memory (RNN-LSTM) model holds great potential for stock price prediction. It captures temporal dependencies, identifies non-linear relationships, and deciphers complex trends in stock price data. This study employs deep learning techniques with the RNN-LSTM model optimized using Adaptive Moment Estimation (Adam) to enhance stock price prediction accuracy by leveraging historical stock price data and technical factors. Data preprocessing, including handling missing values and data normalization, aids the model in navigating the dataset's intricacies. Test results utilizing the Mean Squared Error (MSE) metric reveal the model's ability to produce predictions that closely resemble actual stock prices, with a low loss value of 0109012. The model also exhibits good predictive accuracy, as evidenced by a favorable Mean Percentage Error (MPE) score of 1.74% between predicted and actual values. These findings hold valuable implications for assisting investors and financial practitioners in managing complexity and uncertainty within the stock market
Downloads
References
W. Hastomo, A. Satyo, B. Karno, N. Kalbuana, E. Nisfiani, and L. ETP -, “Optimasi Deep Learning untuk Prediksi Saham di Masa Pandemi Covid-19,” JEPIN (Jurnal Edukasi dan Penelitian Informatika), vol. 7, no. 2, pp. 133–140, 2021.
M. Abdul Dwiyanto Suyudi, E. C. Djamal, A. Maspupah Jurusan Informatika, and F. Sains dan Informatika Universitas Jenderal Achmad Yani Cimahi, “Prediksi Harga Saham menggunakan Metode Recurrent Neural Network,” 2019.
M. Arhami and M. Nasir, Data Mining-Algoritma dan Implementasi. Penerbit Andi, 2020.
L. Troiano, E. M. Villa, and V. Loia, “Replicating a Trading Strategy by Means of LSTM for Financial Industry Applications,” IEEE Trans Industr Inform, vol. 14, no. 7, pp. 3226–3234, Jul. 2018, doi: 10.1109/TII.2018.2811377.
I. A. El-Khodary, “A Decision Support System for Technical Analysis of Financial Markets Based on the Moving Average Crossover,” World Appl Sci J, vol. 6, no. 11, pp. 1457–1472, 2009.
M. Nabipour, P. Nayyeri, H. Jabani, A. Mosavi, E. Salwana, and S. Shahab, “Deep learning for stock market prediction,” Entropy, vol. 22, no. 8, Aug. 2020, doi: 10.3390/E22080840.
Z. Hu, Y. Zhao, and M. Khushi, “A survey of forex and stock price prediction using deep learning,” Applied System Innovation, vol. 4, no. 1. MDPI AG, pp. 1–30, Mar. 01, 2021. doi: 10.3390/ASI4010009.
J. Wang, T. Sun, B. Liu, Y. Cao, and D. Wang, “Financial Markets Prediction with Deep Learning,” in Proceedings - 17th IEEE International Conference on Machine Learning and Applications, ICMLA 2018, Institute of Electrical and Electronics Engineers Inc., Jan. 2019, pp. 97–104. doi: 10.1109/ICMLA.2018.00022.
Y. Mahena, M. Rusli, and E. Winarso, “Prediksi Harga Emas Dunia Sebagai Pendukung Keputusan Investasi Saham Emas Menggunakan Teknik Data Mining,” Kalbiscentia J. Sains dan Teknol, vol. 2, no. 1, pp. 36–51, 2015.
Z. Allen-Zhu, Y. Li, and Z. Song, “A Convergence Theory for Deep Learning via Over-Parameterization,” in In International conference on machine learning, 2019, pp. 242–252. [Online]. Available: https://arxiv.org/abs/1811.03962.
Ü. AYCEL and Y. SANTUR, “A New moving average approach to predict the direction of stock movements in algorithmic trading,” Journal of New Results in Science, vol. 11, no. 1, pp. 13–25, Apr. 2022, doi: 10.54187/jnrs.979836.
A. Garlapati, D. R. Krishna, K. Garlapati, N. M. Srikara Yaswanth, U. Rahul, and G. Narayanan, “Stock Price Prediction Using Facebook Prophet and Arima Models,” in 2021 6th International Conference for Convergence in Technology, I2CT 2021, Institute of Electrical and Electronics Engineers Inc., Apr. 2021. doi: 10.1109/I2CT51068.2021.9418057.
H. Herwartz, “Stock return prediction under GARCH — An empirical assessment,” Int J Forecast, vol. 33, no. 3, pp. 569–580, Jul. 2017, doi: 10.1016/j.ijforecast.2017.01.002.
Y. Han, K. Yang, and G. Zhou, “A new anomaly: The cross-sectional profitability of technical analysis,” Journal of Financial and Quantitative Analysis, vol. 48, no. 5, pp. 1433–1461, 2013, doi: 10.1017/S0022109013000586.
W. Lu, J. Li, Y. Li, A. Sun, and J. Wang, “A CNN-LSTM-based model to forecast stock prices,” Complexity, vol. 2020, 2020, doi: 10.1155/2020/6622927.
M. A. Istiake Sunny, M. M. S. Maswood, and A. G. Alharbi, “Deep Learning-Based Stock Price Prediction Using LSTM and Bi-Directional LSTM Model,” in 2nd Novel Intelligent and Leading Emerging Sciences Conference, NILES 2020, Institute of Electrical and Electronics Engineers Inc., Oct. 2020, pp. 87–92. doi: 10.1109/NILES50944.2020.9257950.
D. W. Jorgenson and M. L. Weitzman, “Can Neural Networks Predict Stock Market?,” AC Investment Research Journal, vol. 220, no. 44, 2023.
Y. Zhu, “Stock price prediction using the RNN model,” in Journal of Physics: Conference Series, IOP Publishing Ltd, Oct. 2020. doi: 10.1088/1742-6596/1650/3/032103.
G. Ding and L. Qin, “Study on the prediction of stock price based on the associated network model of LSTM,” International Journal of Machine Learning and Cybernetics, vol. 11, no. 6, pp. 1307–1317, Jun. 2020, doi: 10.1007/s13042-019-01041-1.
D. Lien Minh, A. Sadeghi-Niaraki, H. D. Huy, K. Min, and H. Moon, “Deep learning approach for short-term stock trends prediction based on two-stream gated recurrent unit network,” IEEE Access, vol. 6, pp. 55392–55404, Sep. 2018, doi: 10.1109/ACCESS.2018.2868970.
H. H. Tan and K. H. Lim, “Vanishing Gradient Mitigation with Deep Learning Neural Network Optimization,” in In 2019 7th international conference on smart computing & communications (ICSCC), 2019, pp. 1–4.
F. Kamalov, L. Smail, and I. Gurrib, “Stock price forecast with deep learning,” in 2020 International Conference on Decision Aid Sciences and Application, DASA 2020, Institute of Electrical and Electronics Engineers Inc., Nov. 2020, pp. 1098–1102. doi: 10.1109/DASA51403.2020.9317260.
M. A. D. Suyudi, E. C. Djamal, and A. Maspupah, “Prediksi Harga Saham menggunakan Metode Recurrent Neural Network,” Seminar Nasional Aplikasi Teknologi Informasi (SNATi), pp. 1907–5022, 2019.
K. K. Chandriah and R. V. Naraganahalli, “RNN / LSTM with modified Adam optimizer in deep learning approach for automobile spare parts demand forecasting,” Multimed Tools Appl, vol. 80, no. 17, pp. 26145–26159, Jul. 2021, doi: 10.1007/s11042-021-10913-0.
K. Stia Rani and N. Nyoman Ayu Diantini, “Pengaruh Kinerja Keuangan Perusahaan Terhadap Harga Saham Dalam Indeks LQ45 Di Bei,” vol. 4, no. 6, pp. 1504–1524, 2015.
D. C. Yıldırım, I. H. Toroslu, and U. Fiore, “Forecasting directional movement of Forex data using LSTM with technical and macroeconomic indicators,” Financial Innovation, vol. 7, no. 1, Dec. 2021, doi: 10.1186/s40854-020-00220-2.
J. Liu et al., “Innovative procedures of data preparation to ensure data integrity for crop modelling,” 2020.
J. Schmidhuber and S. Hochreiter, “Long short-term memory,” 1997.
J. W. Messner, P. Pinson, J. Browell, M. B. Bjerregård, and I. Schicker, “Evaluation of wind power forecasts—An up-to-date view,” Wind Energy, vol. 23, no. 6, pp. 1461–1481, Jun. 2020, doi: 10.1002/we.2497.
Saigal S and Mehrotra D, “Performance Comparison Of Time Series Data Using Predictive Data Mining Techniques Advances In Information Mining,” vol. 4, no. 1, pp. 57–66, 2012, [Online]. Available: http://www.bioinfo.in/contents.php?id=32
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Prediksi Saham Menggunakan Recurrent Neural Network (RNN-LSTM) dengan Optimasi Adaptive Moment Estimation
Pages: 806-815
Copyright (c) 2023 Sio Jurnalis Pipin, Ronsen Purba, Heru Kurniawan

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).