As stated earlier, the stock market price has severe volatility and historical perspective, which make it suited for time analysis. This also challenges those classical algorithms, since long-term dependencies cannot be availed using those algorithms.
As outlined in following diagram, first we collect historical financial data. The data is then converted into a time series after the necessary preprocessing and feature engineering. The resultant time series data is then fed into the LSTM to carry out the training. The following diagram illustrates this:
![](https://static.packt-cdn.com/products/9781788997454/graphics/assets/f14e1f05-03e4-49e8-b51d-2cb98fb5e010.png)
Therefore, we will be using LSTM not only because it outperforms classical algorithms but also because we can solve long-term dependencies with it. Consequently, our project will have the following steps:
- Load and preprocess...