Skip to the content.

Hybrid ML for Stock Forecasting (APPLE)

A fixed XGBoost → LSTM pipeline with a chronological split to forecast next-day closing price of Apple closing price.

Python 3.10+ License: MIT Cite this repo Open in Colab Based in Ireland

Executive Summary

Problem & Target

Data & Features

Train / Validation / Test

Pipeline (high level)

1) Feature engineering on OHLCV (Open, High, Low, Close, Volume) 2) XGBoost predicts next-day log return and then reconstruct price 3) SHAP explains feature contribution to XGBOOST
4) LSTM consumes the ordered XGBoost prediction stream to model temporal dependence
5) Then reconstruct next-day price from predicted log return
6) Evaluate with RMSE/R^2 (returns & prices) and Directional Accuracy

How to Run

image

Figures of SHAP analysis and Final output
image

image

Reproducibility & Quality

Project files (quick access)

Ethics & Disclaimer

Research purpose only; not financial advice. Verify data licensing and corporate actions.

Contact (Ireland)

Abdullah Al Tawab — Dublin · Open to walk-throughs and technical discussion.