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

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

Full description

Saved in:
Bibliographic Details
Main Authors: Nur Faid Prasetyo, Wina Witanti, Asep Id Hadiana
Format: Article
Language:English
Published: Ikatan Ahli Informatika Indonesia 2025-05-01
Series:Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi)
Subjects:
Online Access:https://jurnal.iaii.or.id/index.php/RESTI/article/view/6422
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary: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.
ISSN:2580-0760