PROJECT 03 — TIME SERIES · DEEP LEARNING
STOCK PRICE
FORECASTING
Deep learning model to predict stock prices using LSTM, GRU, and ARIMA. Trained on 5 years of historical OHLCV data with technical indicators as features.
⭐ LSTM
GRU
ARIMA
Prophet
Random Forest
2.74%
MAPE — MEAN ABS % ERROR
0.9831
R² SCORE
$3.41
RMSE (USD)
60 days
SEQUENCE LENGTH
PRICE FORECAST
AAPL — ACTUAL vs PREDICTED (90-DAY WINDOW)
LSTM MODEL · DAILY CLOSING PRICE · VALIDATION SET
MODEL PERFORMANCE
RMSE COMPARISON ACROSS MODELS
TRAINING LOSS CURVE
LSTM TRAIN vs VALIDATION LOSS
VOLUME TREND
DAILY TRADE VOLUME (MILLIONS)
ERROR DISTRIBUTION
PREDICTION ERROR HISTOGRAM
30-DAY FORECAST
NEXT 30-DAY PRICE PREDICTIONS
MODEL ERROR COMPARISON
LOWER IS BETTER
30-DAY PRICE PROJECTION
FORECAST WITH CONFIDENCE INTERVAL
| PERIOD | PREDICTED | LOW | HIGH | CHANGE |
|---|---|---|---|---|
| +7 days | $192.80 | $189.40 | $196.20 | +1.78% |
| +14 days | $196.10 | $190.80 | $201.40 | +3.52% |
| +21 days | $194.30 | $187.60 | $201.00 | +2.57% |
| +30 days | $198.60 | $189.20 | $208.00 | +4.84% |
MAPE: 2.74%
TECH STACK
FRAMEWORKS & LIBRARIES
Python TensorFlow Keras LSTM GRU yfinance Pandas NumPy Scikit-learn ARIMA Prophet Matplotlib Plotly MinMaxScaler Dropout EarlyStopping Technical Indicators Time Series
DATASET
Yahoo Finance API · 5 years OHLCV · AAPL, MSFT, GOOGL
~1,260 trading days per stock · Daily frequency
BUSINESS INSIGHTS
KEY FINDINGS FROM THE MODEL
LSTM outperforms ARIMA by 41% in RMSE on non-stationary stock data, confirming deep learning superiority for complex time series.
60-day lookback window proved optimal — shorter windows missed trends, longer windows introduced noise.
RSI & MACD features improved MAPE by 18% vs price-only model, showing technical indicators add real predictive value.
Model struggles during black swan events (COVID crash, Fed announcements). Hybrid sentiment + price models recommended.