Predicting stock price movements continues to be one of the most difficult problems in financial analytics due to the volatility and non-linear nature of market dynamics. This study introduces a hybrid prediction method that combines a Recurrent Neural Network (RNN) with Moth Flame Optimization (MFO) in order to enhance the accuracy and reliability of stock price predictions on the Shang Hai Stock Exchange index. RNNs capture sequentialness and temporal dependency within financial time series, while MFO balances exploration and exploitation during the optimization of model parameters based on its adaptive spiral search. The proposed MFO-RNN was evaluated against three benchmark models via comparative experiments to elucidate predictive performance. The findings indicate that the proposed MFO-RNN model supersedes other models in all performance metrics with = 0.9932; its robustness and accuracy were evident, even in volatile market conditions. The results indicate that the hybrid machine learning–metaheuristic framework can overcome some of the shortcomings of traditional forecasting methods. The MFO-RNN framework being offered is an innovative and regulatory-compliant, scalable tool for financial forecasters, assisting the decisions of investors and analysts in data-driven, risk-feeling ways, and adaptively during turbulent market conditions.
Zhenhuan Sui (2026) studied this question.