Stock prediction is a vital approach used to forecast stock’s future prices by analyzing historical data. This technique plays a crucial role in assisting investors in making informed decisions in the stock market. There are various methods employed for stock prediction, with the most common being traditional statistical methods and machine learning methods. Traditional statistical methods involve models such as ARIMA and GARCH, while machine learning methods involve LSTM and GRU models.This research paper aims to compare the performance of SARIMA , LSTM and GRU models in stock prediction. To enhance their performance, the models will be optimized by incorporating DWT-ARIMA-XGBoost[1], LSTM-XGBoost[2] and GRU-XGBoost techniques. These methods will then be deployed to predict stock prices, with a subsequent comparison of the results obtained from the three models. After comparing those models, this paper selects four models that have high level of prediction to study their generalization. This analysis will provide valuable insights into the effectiveness and suitability of these models for stock prediction tasks. The paper evaluates these models based on their prediction accuracy, generalization ability.