EconPapers    
Economics at your fingertips  
 

Enhancing Stock Price Forecasting with LSTM Networks: A Comparative Study of Classic and PSO-Optimized Models on S&P 500 Stocks

Imad Talhartit, Sanae Ait Jillali and Mounime El Kabbouri
Additional contact information
Imad Talhartit: Université Hassan 1er [Settat], Ecole Nationale de Commerce et Gestion - Settat, Laboratory of Research in Finance, Audit and Governance of Organizations (LARFAGO) - National School of Business and Management – ENCG Settat, Hassan The First University, Settat, Morocco.
Sanae Ait Jillali: Université Hassan 1er [Settat], Ecole Nationale de Commerce et Gestion - Settat, Laboratory of Research in Finance, Audit and Governance of Organizations (LARFAGO) - National School of Business and Management – ENCG Settat, Hassan The First University, Settat, Morocco.
Mounime El Kabbouri: Université Hassan 1er [Settat], Ecole Nationale de Commerce et Gestion - Settat, Laboratory of Research in Finance, Audit and Governance of Organizations (LARFAGO) - National School of Business and Management – ENCG Settat, Hassan The First University, Settat, Morocco.

Post-Print from HAL

Abstract: This study is part of an empirical and quantitative approach aimed at improving stock market fluctuation forecasting through the application of artificial intelligence models. More specifically, it evaluates the performance of two methods based on Long Short-Term Memory (LSTM) neural networks, one of the most powerful algorithms for analyzing financial time series. The first method is grounded in a classic LSTM model, while the second incorporates hyperparameter optimization using the Particle Swarm Optimization (PSO) metaheuristic method, allowing for better convergence and enhanced prediction accuracy. The study is conducted on ten stocks representing the US S&P 500 index, with historical data spanning several decades, collected via the Investing.com and Yahoo Finance platforms. The empirical results demonstrate a clear superiority of the LSTM-PSO model regarding predictive accuracy, with significant reductions in errors (MSE, RMSE, MAE, MSLE, and RMSLE) compared to the traditional model. These findings emphasize the advantages of combining artificial intelligence and algorithmic optimization for handling complex financial data. In the global context of digitization and automation of investment decisions, this research contributes significantly to the development of reliable predictive systems. Finally, the study raises the question of whether this methodological framework could be effectively adapted to emerging markets, such as the Moroccan Stock Market, where financial environments are characterized by lower trading volumes, different volatility patterns, and more limited historical data. This opens up avenues for future research into the challenges and opportunities of applying advanced AI-based forecasting models in less mature financial markets.

Keywords: stock market forecasting; artificial intelligence; LSTM neural networks; Particle Swarm Optimization; financial time series; predictive modeling (search for similar items in EconPapers)
Date: 2025-07-18
Note: View the original document on HAL open archive server: https://hal.science/hal-05177777v1
References: Add references at CitEc
Citations:

Published in International Journal of Economics and Finance, 2025, 17 (8), pp.87. ⟨10.5539/ijef.v17n8p87⟩

Downloads: (external link)
https://hal.science/hal-05177777v1/document (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:hal:journl:hal-05177777

DOI: 10.5539/ijef.v17n8p87

Access Statistics for this paper

More papers in Post-Print from HAL
Bibliographic data for series maintained by CCSD ().

 
Page updated 2025-07-29
Handle: RePEc:hal:journl:hal-05177777