PSO meets LSTM: adaptive forecasting of NYSE stock prices with volatility-aware performance
摘要
The stock market plays a pivotal role in the global financial system, often marked by significant volatility and its profound impact on investors. Due to this, accurately predicting closing prices is essential for making well-informed investment choices. However, accurate stock price prediction remains a challenging task due to the inherent volatility and complexity of financial markets. In this work, we propose a novel forecasting framework that integrates Particle Swarm Optimization (PSO) with a Long Short-Term Memory (LSTM) network to enhance multi-day stock price prediction on the New York Stock Exchange (NYSE). Unlike prior studies that employ static model architectures or generic optimization strategies, our approach dynamically searches for both the optimal hyperparameters, the architectural configuration—such as the number of layers, nodes per layer- and the sequence length tailored to each individual stock. By leveraging PSO’s gradient-free, population-based search capabilities, our method enables efficient exploration of a large and high-dimensional space, achieving faster convergence and improved accuracy compared to traditional hyperparameter tuned LSTM models. Extensive experiments conducted on historical data from nine major companies and the S&P 500 index demonstrate that the proposed PSO-LSTM model outperforms a LSTM hyper-tuned using Grid Search, Optuna or Hyperband in terms of predictive accuracy as well as computational efficiency. The model's ability to forecast prices up to five days in advance, while adapting to the unique characteristics of each stock, represents a significant advancement in time series forecasting for financial applications.
Graphical abstract