# In stock prediction with LSTM, is there a need to get a dataset for a specific time period in order to predict future close price?

I am currently trying to predict the close price of the TSLA stock for March 2022 using LSTM model. Initially, I was using TSLA stock data starting from 2012 to of course March 2022. However, I was wondering if this is effective as the TSLA stock has undergone great changes in terms of its volatility, behavior, and momentum over the years. Below you can see the stock's price history starting almost 2014. After 2020 its behavior and momentum change drastically. Is there any way to extract only those last n months' data that can help predict future prices with higher accuracy?

The LSTM layer expects input of shape (batch_size, n_timesteps, n_features), you could adjust n_timesteps so that each sample uses only last n-month's data.