Data Scientist turning Quant (III) — Using LSTM Neural Networks to Predict Tomorrow’s Stock Price
Short background about me. I am a data scientist by trade and my investment portfolio turned from great (thanks to the 10-year bull market rally) to not-so-great. For the purpose of these blog posts, I am naive and assume that using the tools I use every day in my job could help me to be a better investor in the future. My goal is to experiment and to learn, and I would like to take you, the reader, on a ride with me in this exploratory multi-part series on predicting the stock market.
While not necessary, I suggest you to read the series in chronological order, starting with Part I about my motivation. In Part II I tried to predict 1-day and 7-days stock direction moves using Logistic Regression and Random Forest models and various well-known technical analysis indicators like RSI and moving-average crossings.
The models’ performance was far from being convincing. TA indicators in were found to be non-predictive. Interestingly enough, I found past returns to have the highest feature importance when it came to predict future stock directions.
I asked myself: How well would I do predicting the stock price by solely using past price information? In this Part III, I will do exactly that! I will train and explore various Long Short-Term Memory (LSTM) neural network models and see if that will make me rich (spoiler: it won’t).
The performance at first glance was astonishing. However, the devil is in the detail and you should always have a critical mindset when reading articles like these. This article ends with putting LSTM’s predictive performance back into context, preparing the scene for Part IV on random models, which has yet to be written.
I hope you have fun reading this series and learn something on the way, too. I surely learned a lot. If you have anything to add to my journey, feel free to write it in the comments or to contact me here/on LinkedIn.
Disclaimer: To avoid any legal liabilities: nothing here is investment advice nor am I qualified to give such advice. When you crunch data, the fact that there’s always an outcome is not proof that this is what’s actually happening to create this outcome. Take anything you read with a…