It is a well-known fact in finance that the price of financial assets because of volatility are difficult to forecast. Although economists like to use models only few do the right modelling. Modern technology developments like Machine Learning (ML) and Deep Learning (DL) have opened exciting new possibilities for improving prediction accuracy in financial forecast. The broader objective of this research paper is to choose right model and predict right prices for the financial assets for investors and portfolio managers. In this context, this research paper highlights how the Decision Tree, Random Forest and Long Short-Term Memory (LSTM) algorithms help to forecast the stock price in case of NIFTY 50 index. To achieve the objective historical stock data from the years 2014 to 2024 is used and preprocess it with feature engineering, normalization, and the sliding window approach. For analysis, MSE, RMSE, MAE and R2 are used to evaluate the performance. It tests hypothesis through (t-tests) and volatility-specific analysis to check robustness. The data shows that Random Forest has the best performance, but LSTM is more sensitive to volatility. This research is useful for investors and financial analyst who can use ML and DL for better decision-making regarding stock market forecasting..