Skip to content

Jalalab/stock-market-predictor

Repository files navigation

📈 Stock Market Price Predictor

A deep learning web application for predicting stock market prices using multiple model architectures, built with Python, Keras and Streamlit.

🚀 How to Run

pip install -r requirements.txt
streamlit run app.py

🧠 Models Used

Model Description
LSTM Long Short-Term Memory for sequence prediction
Bi-LSTM + Attention Bidirectional LSTM with custom attention mechanism
Transformer Attention-based architecture for time series

✨ Features

  • 📊 Real-time stock data fetching via Yahoo Finance
  • 📉 Moving Average analysis (MA50, MA100, MA200)
  • 🔮 Future price prediction (30, 100, 200 days)
  • 📋 Model accuracy comparison (RMSE, MAE, R² Score)
  • 🏆 Automatic best model selection

🛠️ Tools & Libraries

  • Python
  • Keras / TensorFlow
  • Streamlit
  • Yahoo Finance (yfinance)
  • Pandas & NumPy
  • Scikit-learn
  • Matplotlib

📁 Project Structure

├── app.py                                  # Streamlit web app
├── StockUpdate2.ipynb                      # LSTM & Bi-LSTM training
├── StockUpdate2_with_Transformer.ipynb     # Transformer model training
├── LSTM_model.keras                        # Saved LSTM model
├── bi_lstm_model.keras                     # Saved Bi-LSTM model
├── bi_lstm_attention_model.keras           # Saved Bi-LSTM + Attention model
└── README.md

📊 How It Works

  1. Enter any stock symbol (e.g. GOOG, AAPL, TSLA)
  2. App fetches historical data from 2012–2022
  3. Models predict future prices
  4. Dashboard shows original vs predicted prices
  5. Accuracy comparison table shows best performing model

👤 Author

Jalal Abedin — LinkedIn | GitHub

About

Stock-prediction lstm transformer deep-learning streamlit python keras time-series finance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors