for stock price predictionwe will utilize lstm units to implement an rnn model rnns are typically useful in sequence modeling applicationssome of them are as followssequence classification tasks like sentiment analysis of given corpus (see for the detailed use casesequence tagging tasks like pos tagging given sentence sequence mapping tasks like speech recognition unlike traditional forecasting approaches (like arima)which require preprocessing of time series information to conform to stationarity and other assumptions along with parameter identification (pdqfor instance)neural networks (particularly rnnsimpose far fewer restrictions since stock price information is also time series datawe will explore the application of lstms to this use case and generate forecasts there are number of ways this problem can be modeled to forecast values the following sections covers two such approaches regression modeling we introduced regression modeling in to analyze bike demand based on certain predictor variables in essenceregression modeling refers to the process of investigating relationship between dependent and independent variables to model our current use case as regression problemwe state that the stock price at timestamp + (dependent variableis function of stock price at timestamps tt - - - where is the past window of stock prices now that we have framework defined on how we would model our time serieswe need to transform our time series data into windowed form see figure - figure - transformation of stock price time series into windowed format the windowed transformation is outlined in figure - where window size of is used the value at time + is forecasted using past four values we have data for the & index since hence we would apply this windowed transformation in rolling fashion and create multiple such sequences thusif we have time series of length and window size of nthere would be - - total windows generated