🧠 Deep Learning Stock Prediction (CNN + LSTM)

Advanced deep learning model for accurate price forecasting

🔮 Predict Stock Prices Using Deep Learning

Example symbols:

BTC-USD RELIANCE TCS INFY HDFCBANK

About CNN + LSTM Model

This deep learning model combines Convolutional Neural Networks (CNN) and Long Short-Term Memory (LSTM) networks to capture both local patterns and long-term dependencies in stock price data. The CNN layer extracts local features from the input sequences, while the LSTM layer learns temporal patterns over longer periods. The model is trained on 4 years of historical data using a 60-day lookback window to predict the next 5 days of closing prices.

Model Architecture

  • • Conv1D (64 filters, kernel_size=3)
  • • MaxPooling1D (pool_size=2)
  • • Dropout (0.2)
  • • LSTM (100 units)
  • • Dense (50 units)
  • • Output (1 unit)

Training Configuration

  • • Epochs: 20
  • • Batch Size: 32
  • • Lookback: 60 days
  • • Optimizer: Adam
  • • Loss: Mean Squared Error