📈 Stock Market Predictor

Bidirectional LSTM · GPU Mixed Precision · 10 Technical Indicators · 30-Day Forecast

BiLSTMMACDRSI Bollinger BandsSMA/EMA MomentumGPU float16
$205.99
Last Close (AAPL demo)
$8.24
Test RMSE
3.38%
Test MAPE
73.7%
Direction Accuracy
BiLSTM
Model

AAPL Close Price with Moving Averages & Bollinger Bands

Close
SMA 20
SMA 50
$8.24
RMSE
3.38%
MAPE
73.7%
Direction Accuracy
BiLSTM
Architecture

Predicted vs Actual Close Price (Test Set — last 100 days)

Actual
Predicted

Model Architecture

LayerOutput ShapeParameters
Input(60, 10)
Bidirectional LSTM (64 units)(60, 128)38,400
BatchNormalization + Dropout(0.2)(60, 128)512
Bidirectional LSTM (32 units)(64,)41,216
BatchNormalization + Dropout(0.2)(64,)256
Dense(32, relu) + Dropout(0.1)(32,)2,080
Dense(16, relu)(16,)528
Dense(1, float32)(1,)17

30-Day Price Forecast

Historical
Forecast

Forecast Table

Project Overview

This project predicts stock closing prices using a Bidirectional LSTM neural network trained on real historical OHLCV data enriched with 10 technical indicators. Training is GPU-accelerated using TensorFlow's MirroredStrategy and float16 mixed precision.

Technical Indicators Used

✅ SMA 20 / SMA 50 (trend)
✅ EMA 12 / EMA 26 (trend)
✅ MACD + Signal (momentum)
✅ RSI 14 (overbought/oversold)
✅ Bollinger Band Width
✅ Daily Return & 20d Volatility
✅ 5-Day Price Momentum
✅ Volume Ratio (vs 20d avg)

GPU Acceleration

Mixed precision (float16) training with MirroredStrategy gives ~2–3× speedup on NVIDIA T4/P100/A100. Enable on Kaggle: Settings → Accelerator → GPU T4 x2. Enable on Colab: Runtime → Change runtime type → T4 GPU.

Dataset

Price/Volume Data for All US Stocks & ETFs — Daily OHLCV data for all NYSE/NASDAQ stocks. Trained on AAPL. 80/10/10 split.

⚠️ Disclaimer

Educational project only. Stock price predictions are inherently uncertain. Do NOT use this for real investment decisions.