In today’s era, stock prediction has become one of the dominant real world application. Most of the times, scientists attempted to establish a direct connection between information macroeconomic factors and stock returns; however, with the revelation of nonlinear slants in financial exchange record returns, there has been a significant shift in the scientists’ focus toward the nonlinear expectation of stock returns. Even though various articles on nonlinear measurable presenting of stock returns have appeared since then, the huge demand is the nonlinear model which is specified before the estimation is performed. Predicting stock value is a difficult task that necessitates a solid algorithmic structure to calculate returns. Because stock prices are volatile and depend on the market up and down, forecasting stock prices becomes difficult. It has never been easy to invest in a portfolio of assets; the abnormalities of the financial market prevent simple models from accurately predicting future asset values. Machine learning, which is teaching computers to execute activities that would ordinarily need human intelligence, is the current scientific study hot topic. This paper explores gated recurrent units (GRU), simple recurrent neural network (Simple RNN) and long short term memory (LSTM) models for stock price prediction. © 2023, The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.