Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📈 Stock Market Forecasting

Comparing ARIMA, Prophet and LSTM for predicting stock closing prices

Python TensorFlow Prophet statsmodels yfinance Open In Colab


📌 Overview

Which forecasting approach works best on real stock prices: a classical statistical model, an additive trend model, or a deep neural network?

This project downloads Apple (AAPL) daily prices from 2015 to 2023, holds out the last 100 business days as a test set, and compares three models by RMSE (root mean squared error):

Model Type Idea
ARIMA (5,1,0) Statistical Uses past values and differencing to model the series
Prophet Additive trend + seasonality Meta's model for business time series
LSTM Deep learning Two stacked LSTM layers learn from 60-day windows

🏆 Results (AAPL, last 100 business days)

Rank Model RMSE ↓
🥇 LSTM 9.12
🥈 ARIMA 9.83
🥉 Prophet 18.04

The LSTM and ARIMA models track short-term movement closely; Prophet captures the long-term trend but misses day-to-day changes.

Results from the notebook run. LSTM numbers vary slightly between runs because of random weight initialisation.

📸 Charts

Closing price (2015 – 2023)

Closing price

ARIMA LSTM
ARIMA forecast LSTM forecast

Prophet

Prophet forecast

🔄 Pipeline

flowchart LR
    A[yfinance download] --> B[Close price, business days, forward-fill]
    B --> C[Train / last 100 days test]
    C --> D1[ARIMA 5,1,0]
    C --> D2[Prophet]
    C --> D3[LSTM 60-day window]
    D1 & D2 & D3 --> E[RMSE comparison + charts]
Loading

📂 Project Structure

Stock_Market_Forecasting_Project/
├── notebooks/
│   └── Stock_Market_Forecasting_Project.ipynb   # Original Colab notebook with outputs
├── src/
│   └── forecast.py                              # Script version (any ticker, saves charts)
├── outputs/                                     # Forecast charts
├── requirements.txt
└── README.md

🚀 Getting Started

Option 1: Google Colab — click the Open in Colab badge above and run all cells.

Option 2: Run locally

git clone https://github.com/Gaganajain/Stock_Market_Forecasting_Project.git
cd Stock_Market_Forecasting_Project
pip install -r requirements.txt
python src/forecast.py

Try another stock or date range:

python src/forecast.py --ticker MSFT --start 2018-01-01 --end 2024-12-31 --epochs 10

🛠️ Tech Stack

Area Tools
Data yfinance, Pandas, NumPy
Statistical model statsmodels ARIMA
Trend model Prophet
Deep learning TensorFlow / Keras LSTM
Evaluation & charts scikit-learn, Matplotlib

🔮 Future Improvements

  • Add technical indicators (moving averages, RSI, volume) as LSTM features
  • Walk-forward validation instead of a single split
  • Try GRU, Transformer and XGBoost models
  • Streamlit dashboard to pick a ticker and view forecasts

⚠️ For learning purposes only. Not financial advice.

👩‍💻 Author

Gagana Jain A · GitHub

⭐ If you found this useful, consider giving the repo a star!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages