Forecasting Stock Returns Using Long Short-Term Memory (LSTM) Model Based on Inflation Data and Historical Stock Price Movements

Keywords: forecasting, inflation, long short-term memory, stock forecasting, stock return

Abstract

The stock market is crucial for economic growth and development, offering profit opportunities that attract investors worldwide. However, its inherent volatility necessitates the inclusion of macroeconomic indicators like inflation, which can affect stock valuation and investor behavior. This study explores predicting stock returns using a Long Short-Term Memory (LSTM) model by incorporating inflation data, historical stock price movements, and calculated returns as input features. The dataset was split into 80% for training and 20% for testing, with hyperparameter tuning conducted using the RMSprop optimizer under varying batch sizes and epoch settings. Experimental results show that the configuration using RMSprop with a batch size of 8 and 200 epochs delivered the best performance, achieving a Root Mean Squared Error (RMSE) of 0.0167 and a Mean Absolute Percentage Error (MAPE) of 25.89%. These results represent a significant improvement over alternative configurations and previous benchmarks. This study underscores the importance of including inflation as a predictive variable, enhancing the model's accuracy. The findings highlight the relevance of incorporating macroeconomic factors into stock return forecasting, providing valuable insights for investors and financial analysts seeking data-driven strategies in decision-making processes.

Downloads

Download data is not yet available.

References

S. H. Namirah and Y. Nur, “Analisis Indikator Makro Terhadap Nilai Saham Sektor Perbankan LQ45 di Bursa Efek Indonesia.” [Online]. Available: https://e-jurnal.nobel.ac.id/index.php/manuver

T. Sulastri and D. Suselo, “Pengaruh Inflasi, Suku Bunga Dan Nilai Tukar Terhadap Harga Saham PT. Telekomunikasi Indonesia Tbk.,” JPEKA: Jurnal Pendidikan Ekonomi, Manajemen dan Keuangan, vol. 6, no. 1, pp. 29–40, May 2022, doi: 10.26740/jpeka.v6n1.p29-40.

F. F. Hasibuan, A. Soemitra, and R. D. Harahap, “Pengaruh Inflasi, Nilai Tukar, Harga Minyak Dunia Dan Harga Emas Dunia Terhadap Indeks Saham Syariah Indonesia,” Jurnal Manajemen Akuntansi (JUMSI), vol. 3, no. 1, pp. 211–221, Jan. 2023, doi: 10.36987/jumsi.v3i1.3983.

N. M. A. Dwijayanti, “Home / Archives / Vol 17 No 1 (2021): JBK-Jurnal Bisnis dan Kewirausahaan / Articles Pengaruh Nilai Tukar dan Inflasi Terhadap Harga Saham Perbankan Pada Masa Pandemi COVID-19,” Jurnal Bisnis dan Kewirausahaan, vol. 17, no. 1, pp. 86–93, Apr. 2021, doi: 10.31940/jbk.v17i1.2351.

S. Atu Rohmah, M. Michellita, T. W. Permatasari, and I. Safrudin, “Pengaruh Inflasi, Return on Asset , dan Return on Equity Terhadap Keputusan Investasi Saham Pada Perusahaan Manufaktur Yang Terdaftar di BEI,” Jurnal Ekonomi Bisnis Antartika, vol. 2, no. 2, pp. 94–98, Jul. 2024, doi: 10.70052/jeba.v2i2.321.

C. Chikwira and J. I. Mohammed, “The Impact of the Stock Market on Liquidity and Economic Growth: Evidence of Volatile Market,” Economies, vol. 11, no. 6, p. 155, May 2023, doi: 10.3390/economies11060155.

M. Zulfani, A. Dapadeda, A. Jaya Yogyakarta, J. Babarsari No, K. Sleman, and D. Istimewa Yogyakarta, “Prediksi Harga Saham Menggunakan Algoritma Neural Network,” vol. 18, no. 1, 2024, doi: 10.47111/JTI.

B. Jange, “Prediksi Harga Saham Bank BCA Menggunakan XGBoost,” ARBITRASE: Journal of Economics and Accounting, vol. 3, no. 2, pp. 231–237, Nov. 2022, doi: 10.47065/arbitrase.v3i2.495.

V. P. Damartya, D. Saepudin, and P. H. Gunawan, “Optimasi Portofolio Saham LQ45 dengan Mempertimbangkan Prediksi Return Menggunakan Metode Support Vector Regression (SVR).”

Moch Farryz Rizkilloh and Sri Widiyanesti, “Prediksi Harga Cryptocurrency Menggunakan Algoritma Long Short Term Memory (LSTM),” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 6, no. 1, pp. 25–31, Feb. 2022, doi: 10.29207/resti.v6i1.3630.

E. S. Nugraha, Z. Alika, and D. Amir Hamzah, “Forecasting the Stock Price of PT Astra International Using the LSTM Method,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 8, no. 3, pp. 431–437, Jun. 2024, doi: 10.29207/resti.v8i3.5699.

N. Afrianto, D. H. Fudholi, and S. Rani, “Prediksi Harga Saham Menggunakan BiLSTM dengan Faktor Sentimen Publik,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 6, no. 1, pp. 41–46, Feb. 2022, doi: 10.29207/resti.v6i1.3676.

D. T. Saputro and D. Swanjaya, “Analisa Prediksi Harga Saham Menggunakan Neural Network dan Net Foreign Flow.”

A. Arfan and L. ETP, “Perbandingan Algoritma Long Short-Term Memory dengan SVR Pada Prediksi Harga Saham di Indonesia,” PETIR, vol. 13, no. 1, pp. 33–43, Mar. 2020, doi: 10.33322/petir.v13i1.858.

“Analisis Perbandingan Prediksi Harga Saham menggunakan Algoritma Artificial Neural Network dan Linear Regression,” Jurnal Ilmiah Komputasi, vol. 22, no. 2, Jun. 2023, doi: 10.32409/jikstik.22.2.3357.

L. Wang and R. S. T. Lee, “Stock Index Return Volatility Forecast via Excitatory and Inhibitory Neuronal Synapse Unit with Modified MF-ADCCA,” Fractal and Fractional, vol. 7, no. 4, Apr. 2023, doi: 10.3390/fractalfract7040292.

E. Feronika Br Simanungkalit, “Pengaruh Inflasi Terhadap Pertumbuhan Ekonomi di Indonesia,” 2020.

T. L. Situngkir and R. L. Batu, “Pengaruh Inflasi Dan Nilai Tukar Terhadap Indeks Harga Saham LQ45,” SENTRALISASI, vol. 9, no. 1, p. 36, Jan. 2020, doi: 10.33506/sl.v9i1.708.

J. Cao, S. Titman, X. Zhan, and W. Zhang, “ESG Preference, Institutional Trading, and Stock Return Patterns,” Journal of Financial and Quantitative Analysis, vol. 58, no. 5, pp. 1843–1877, Aug. 2023, doi: 10.1017/S0022109022000916.

Fakhri Rana Sausan, L. Korawijayanti, and Arum Febriyanti Ciptaningtias, “The Effect of Return on Asset (ROA), Debt to Equity Ratio (DER), Earning per Share (EPS), Total Asset Turnover (TATO) and Exchange Rate on Stock Return of Property and Real Estate Companies at Indonesia Stock Exchange Period 2012-2017,” Ilomata International Journal of Tax and Accounting, vol. 1, no. 2, pp. 103–114, Mar. 2020, doi: 10.52728/ijtc.v1i2.66.

S. Feblicia, dan Angela, U. Internasional Batam, I. Corresponding Author, and I. Artikel, “Analisis Pengaruh Inflasi, Suku Bunga dan Nilai Tukar Dollar Terhadap Indeks Harga Saham LQ45”, [Online]. Available: http://sosains.greenvest.co.id

F. Fathori, “Peran Pasar Modal Dalam Pembangunan Ekonomi: Studi Kasus Tentang Kontribusi Pasar Saham Terhadap Pertumbuhan Ekonomi di Negara Berkembang,” Currency: Jurnal Ekonomi dan Perbankan Syariah, vol. 2, no. 1, pp. 233–242, Mar. 2024, doi: 10.32806/syfdep0914.

R. Zapar, D. Pratama, and C. Lukaman Rohmat, “Penerapan Model Regresi Linier Untuk Prediksi Harga Saham Bank BCA Pada Bursa Efek Indonesia,” 2024. [Online]. Available: https://www.yahoofinance.com,

F. D. Adhinata and D. P. Rakhmadani, “Prediction of Covid-19 Daily Case in Indonesia Using Long Short Term Memory Method,” Teknika, vol. 10, no. 1, pp. 62–67, Feb. 2021, doi: 10.34148/teknika.v10i1.328.

Published
2025-05-13
How to Cite
Prasetyo, N. F., Witanti, W., & Hadiana, A. I. (2025). Forecasting Stock Returns Using Long Short-Term Memory (LSTM) Model Based on Inflation Data and Historical Stock Price Movements. Jurnal RESTI (Rekayasa Sistem Dan Teknologi Informasi), 9(3), 203 - 214. https://doi.org/10.29207/resti.v9i3.6422
Section
Information Technology Articles