skip to content
jasondank.com/projects/stock-prediction

Projects / 2023 · 13 of 13

CNN-LSTM Stock Market Prediction

PRICE · ACTUAL VS PREDICTEDactualpredictedFORECASTRSI (14)7030THE MODELyfinance · OHLCVRSI · MACD · BollingerConv1DLSTMDenseNext close
Actual price against the CNN-LSTM’s prediction, with Bollinger Bands and RSI, and the forecast running ahead

What it does

This project implements a Convolutional Neural Network (CNN) and Long Short-Term Memory (LSTM) model to predict stock prices. The model uses historical stock data, along with technical indicators, to forecast future stock prices.

  • Implemented a combined CNN and LSTM model in TensorFlow to forecast stock prices from historical data.
  • Engineered technical indicators (RSI, MACD, Bollinger Bands) from yfinance data and added logging, model management, and actual-vs-predicted visualisation.

What I'm proudest of

Engineering features like RSI, MACD and Bollinger Bands from raw prices, and pairing a CNN for local patterns with an LSTM for the sequence, taught me a lot. So did learning how hard markets really are to predict.

Screenshots

Actual price (blue) against the model’s prediction (red)
Actual price (blue) against the model’s prediction (red)