The non-stationary, non-linear, and extremely noisy nature of stock price time series data, which are created from economic factors and systematic and unsystematic risks, makes it difficult to make reliable predictions of stock prices in the securities market. Conventional methods may improve forecasting accuracy, but they can additionally complicate the computations involved, increasing the likelihood of prediction errors. To address these issues, a novel hybrid model that combines recurrent neural networks and grey wolf optimization was introduced in the current study. The suggested model outperformed other models in the study with high efficacy, minimal error, and peak performance. Utilizing data from Alphabet stock spanning from June 29, 2023, to January 1, 2015, the effectiveness of the hybrid model was assessed. The gathered information comprised daily prices and trading volume. The outcomes showed that the suggested model is a reliable and effective method for analyzing and forecasting the time series of the financial market. The suggested model is additionally particularly well-suited to the volatile stock market and outperforms other recent strategies in terms of forecasting accuracy.