Analisis Optimasi Pada Algoritma Long ShortTerm Memory Untuk Memprediksi Harga Saham
DOI:
https://doi.org/10.30865/mib.v7i1.5421Keywords:
Stock Price Prediction, Neural Network, LSTM, Comparison, Optimizer.Abstract
Stocks are the most popular financial market instrument at the moment, indicated by an increase in investors' shares of 27.15% from the previous year. The biggest risk for stock investors in investing is the risk of falling prices (capital loss) and the risk of liquidation. To minimize this risk, before investing, you should do an analysis first, one of which is by predicting stock price movements. The best method for predicting stock prices is to use Long Short Term Memory (LSTM). In order to predict optimally, it is important to select an optimization algorithm before creating a model. Of the eight optimization algorithms studied, namely SGD, RMSProp, Adam, AdaGrad, AdaMax, AdaDelta, Nadam, and Ftrl. Adam's optimization has the highest level of accuracy in predicting stock prices, where the accuracy value between predicted stock prices and actual stock prices is 98.88% with the average difference between the predicted price and the actual price of IDR 46. This research is expected to provide benefits in predicting stock prices as accurately as possible using the Long Short Term Memory (LSTM) model with the selection of the right optimization algorithm.
References
KSEI, “Statistik Pasar Modal Indonesia,†Nov. 2022. [Online]. Available: www.ksei.co.id
B. Y. Pandji, Indwiarti, and A. A. Rohmawati, “PERBANDINGAN PREDIKSI HARGA SAHAM DENGAN MODEL ARIMA DAN ARTIFICIAL NEURAL NETWORK,†2019, doi: 10.21108/indojc.2019.4.2.344.
M. Y. Darsyah and M. S. Nur, “MODEL TERBAIK ARIMA DAN WINTER PADA PERAMALAN DATA SAHAM BANK,†2016.
A. H. Manurung, W. Budiharto, and H. Prabowo, “Algorithm and modeling of stock prices forecasting based on long short-term memory (LSTM),†ICIC Express Letters, vol. 12, no. 12, pp. 1277–1283, Dec. 2018, doi: 10.24507/icicel.12.12.1277.
M. Roondiwala, H. Patel, and S. Varma, “Predicting Stock Prices Using LSTM,†Article in International Journal of Science and Research, vol. 6, 2017, doi: 10.21275/ART20172755.
A. Yusuf, “PREDIKSI INDEKS HARGA SAHAM GABUNGAN (IHSG) MENGGUNAKAN LONG SHORT-TERM MEMORY,†vol. 15, no. 2, pp. 124–132, 2021, [Online]. Available: http://ppjp.ulm.ac.id/journals/index.php/epsilon
W. Budiharto, “Data science approach to stock prices forecasting in Indonesia during Covid-19 using Long Short-Term Memory (LSTM),†J Big Data, vol. 8, no. 1, Dec. 2021, doi: 10.1186/s40537-021-00430-0.
P. Chhajer, M. Shah, and A. Kshirsagar, “The applications of artificial neural networks, support vector machines, and long–short term memory for stock market prediction,†Decision Analytics Journal, vol. 2, Mar. 2022, doi: 10.1016/j.dajour.2021.100015.
Y. Setiawan, T. Tarno, 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/
D. P. Kingma and J. Ba, “Adam: A Method for Stochastic Optimization,†Dec. 2014, [Online]. Available: http://arxiv.org/abs/1412.6980
S. Ruder, “An overview of gradient descent optimization algorithms,†Sep. 2016, [Online]. Available: http://arxiv.org/abs/1609.04747
A. Almeida and G. Azkune, “Predicting human behaviour with recurrent neural networks,†Applied Sciences (Switzerland), vol. 8, no. 2, Feb. 2018, doi: 10.3390/app8020305.
A. C. Wilson, R. Roelofs, M. Stern, N. Srebro, and B. Recht, “The Marginal Value of Adaptive Gradient Methods in Machine Learning,†2017.
Yahoo Finance, “https://finance.yahoo.com/.â€
S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,†1997.
P. Wang, X. Zheng, G. Ai, D. Liu, and B. Zhu, “Time series prediction for the epidemic trends of COVID-19 using the improved LSTM deep learning method: Case studies in Russia, Peru and Iran,†Chaos Solitons Fractals, vol. 140, Nov. 2020, doi: 10.1016/j.chaos.2020.110214.
Phi M, “Illustrated Guide to LSTM’s and GRU’s: A step by step explanation,†Towards Data Sci, 2018.
A. Géron, Hands-on machine learning with Scikit-Learn, Keras, and TensorFlow: Concepts, tools, and techniques to build intelligent systems, Second Edition. O’Reilly Media, 2019.
C. Sammut and G. I. Webb, “Encyclopedia of Machine Learning,†2011.
“MAPE (Mean Absolute Percentage Error. Working with Planning.†https://docs.oracle.com/en/cloud/saas/planning-budgeting-cloud/pfusu/insights_metrics_MAPE.html (accessed Dec. 23, 2022).
Downloads
Published
Issue
Section
License

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).