This paper applies ARIMA and the Greylag Goose Optimizer (GGO) algorithm, among others, for pre-trending the stock market prediction. This study aims to improve stock price forecasting using proper feature selection methods and time series modeling. The dataset encompasses historical pricing data that was scraped from Yahoo Finance in January 2019. There were many models for feature selection applied in the data preprocessing phase, such as bGGO, bGWO, bGWO_PSO, bPSO, bWAO, bBBO, bMVO, bSBO, bGWOGA and bFA. The model’s performance was judged on metrics based on average error, select size and fitness; the GGO (Greylag Goose Optimizer) algorithm had the best performance rating, with an Average error equal to 0.36455. The ARIMA model was used to predict future stock prices based on the selected features, with the lowest MSE being 0.001367831 and an RMSE of 0.0369842, evidencing powerful forecasting ability. This outcome proves the reliability of integrating feature selection approaches with ARIMA for stock price prediction; it helps improve forecast accuracy and provides valuable insights for investors and analysts. The final point indicates the importance of powerful optimization tools in decision-making.