Firefly-Optimized Long Short-Term Memory Networks for Stock Market Prediction
DOI:
https://doi.org/10.7492/n3kq2j37Abstract
Abstract—The article proposes an optimized stock market prediction framework that integrates Firefly Algorithm with Long Short-Term Memory (LSTM) networks to improve forecasting accuracy. Firefly is employed to optimize the key LSTM hyperparameters, including the number of layers, units per layer, learning rate, dropout rate, and batch size. The Firefly Algorithm dynamically fine-tunes these hyperparameters through iterative exploration and minimize the Mean Absolute Error (MAE). The proposed model was evaluated using historical stock market data and benchmarked against state-of-the-art models across performance metrics such as precision, recall, F-measure, and Area Under the Curve (AUC). Expanded simulation analysis demonstrated significant improvements in forecastin with precision improved by up to 8.18%, recall by 11.99%, F-measure by 7.52%, and AUC reaching 0.97, outperforming all compared models. These improvements are attributed to the effective hyperparameter optimization achieved through the Firefly Algorithm, enabling the LSTM model to generalize better and capture dynamic price trends and patterns. The superior performance of the proposed Firefly+LSTM model highlights its practical relevance in financial decision-making and investment planning by providing reliable and accurate stock price forecasts.














