Skip to content

gamecoder08/StockPredictor

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

276 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Stock Ticker Analysis and Prediction System using Stacked LSTM

Python TensorFlow XGBoost Streamlit React Docker License

πŸ“‹ About

Ticker-Prediction System is an advanced machine learning project that leverages LSTM (Long Short Term Memory) neural networks combined with XGBoost ensemble methods to predict stock market trends using time-series analysis.

Key Features

  • πŸ€– Deep Learning Architecture: Stacked LSTM model for capturing temporal dependencies in stock data
  • πŸ“Š Data Preprocessing: Advanced techniques for continuous dataset normalization and transformation
  • πŸš€ Ensemble Method: XGBoost integration to enhance prediction accuracy
  • 🎨 Dual Interface: Both Streamlit web app and React-based frontend
  • 🐳 Docker Support: Containerized deployment with version tracking
  • πŸ“ˆ Time-Series Prediction: Sophisticated forecasting for financial data

Note: All research, testing, and model training work are maintained in a separate repository with different epoch cycles and parameters.

πŸ“– Description

This project combines cutting-edge deep learning techniques with practical deployment strategies:

  • Core Technology: LSTM networks with XGBoost ensemble methods for superior prediction performance
  • Multiple Interfaces:
    • Streamlit Application - Quick web-based interface
    • React Application - Full-featured frontend with advanced UI/UX
  • Containerization: Docker images for consistent deployment across environments with semantic versioning

πŸš€ Getting Started

Prerequisites

  • Python 3.8+
  • Node.js 14+
  • Docker (optional, for containerized deployment)
  • Git

1. Local Installation

Frontend (React)

Navigate to the Ticker Predictor Website folder:

cd "Ticker Predictor Website"
cd "Front-end"
npm install
npm run start

The React app will be available at https://localhost:3000

Backend (Python)

In a separate terminal, navigate to the Backend folder:

cd "Ticker Predictor Website"
cd "Backend"
python waitress_server.py

The backend server will connect with the React frontend automatically.

Visual Guide:

Terminal Output Example:
βœ“ Backend running on http://localhost:5000
βœ“ Frontend running on http://localhost:3000
βœ“ Connected and ready for predictions

2. Docker Deployment

Option A: React + Python Backend

Terminal 1 - Backend:

docker run -p 5000:5000 debasishray/predictor-backend:latest

Terminal 2 - Frontend:

docker run -p 3000:3000 debasishray/predictor-frontend:latest

Then navigate to: https://localhost:3000

Option B: Streamlit Application

docker run -p 8501:8501 debasishray/streamlit-app:latest

Access the app via the link provided in the terminal output.

🐳 Docker Image Deployment to GitHub Packages

Step-by-Step Guide

  1. Create a Docker image replica with a new tag:
docker tag debasishray/streamlit-app:v1.0 webapp
  1. Tag for GitHub Container Registry:
docker tag webapp ghcr.io/debasishray16/stockpredictor/webapp:latest
docker image ls
  1. Authenticate with GitHub Packages:
echo "YOUR_PAT_TOKEN" | docker login ghcr.io -u debasishray16 --password-stdin
  1. Push to GitHub Packages:
docker push ghcr.io/debasishray16/stockpredictor/webapp:latest

Format: ghcr.io/<username>/<repository>/<image>:tag

πŸ“Š Project Structure

StockPredictor/
β”‚
β”œβ”€β”€ πŸ“„ README.md                          # Project documentation
β”œβ”€β”€ πŸ“„ LICENCE                            # MIT License
β”œβ”€β”€ πŸ“„ .gitignore                         # Git ignore configuration
β”œβ”€β”€ πŸ“„ docker-compose.yml                 # Docker Compose configuration
β”‚
β”œβ”€β”€ πŸ“‚ Ticker Predictor Website/          # Main application folder
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ Front-end/                     # React Frontend Application
β”‚   β”‚   β”œβ”€β”€ πŸ“„ package.json               # Node.js dependencies
β”‚   β”‚   β”œβ”€β”€ πŸ“„ package-lock.json          # Dependency lock file
β”‚   β”‚   β”œβ”€β”€ πŸ“„ tailwind.config.js         # Tailwind CSS configuration
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Dockerfile                 # Frontend container config
β”‚   β”‚   β”œβ”€β”€ πŸ“„ .dockerignore              # Docker ignore rules
β”‚   β”‚   β”œβ”€β”€ πŸ“„ .gitignore                 # Git ignore rules
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ public/                    # Static public assets
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ index.html             # Main HTML entry point
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ manifest.json          # PWA manifest
β”‚   β”‚   β”‚   └── πŸ“„ robots.txt             # SEO robots configuration
β”‚   β”‚   β”‚
β”‚   β”‚   └── πŸ“‚ src/                       # Source code
β”‚   β”‚       β”œβ”€β”€ πŸ“„ index.js               # React entry point
β”‚   β”‚       β”œβ”€β”€ πŸ“„ index.css              # Global CSS styles
β”‚   β”‚       β”œβ”€β”€ πŸ“„ App.js                 # Main App component
β”‚   β”‚       β”œβ”€β”€ πŸ“„ App.css                # App-specific styles
β”‚   β”‚       β”œβ”€β”€ πŸ“„ reportWebVitals.js     # Performance monitoring
β”‚   β”‚       β”‚
β”‚   β”‚       β”œβ”€β”€ πŸ“‚ Components/            # React Components
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ Main.js            # Main dashboard component
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ Sidebar.js         # Sidebar navigation (70KB)
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ Dashboardview.js   # Dashboard view component
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ StockPredictionChart.js  # Chart visualization
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ LoadingAnim.js     # Loading animation component
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ Spinner.js         # Spinner component
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ aboutModel.js      # Model information component
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ companyInfo.js     # Company details (9KB)
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ companyDesc.js     # Company description
β”‚   β”‚       β”‚   β”‚
β”‚   β”‚       β”‚   └── πŸ“‚ Styles/            # Component-specific styles
β”‚   β”‚       β”‚       └── πŸ“„ spinner.css    # Spinner animations
β”‚   β”‚       β”‚
β”‚   β”‚       β”œβ”€β”€ πŸ“‚ router/                # Route configuration
β”‚   β”‚       β”‚   └── πŸ“„ Router.js          # React Router setup
β”‚   β”‚       β”‚
β”‚   β”‚       └── πŸ“‚ assets/                # Media assets
β”‚   β”‚           β”œβ”€β”€ 🎞️ idle.gif          # Idle state animation
β”‚   β”‚           β”œβ”€β”€ 🎞️ loading.gif       # Loading animation
β”‚   β”‚           └── 🎞️ loading2.gif      # Alternative loading animation
β”‚   β”‚
β”‚   └── πŸ“‚ Back-end/                      # Python Backend Server
β”‚       β”œβ”€β”€ πŸ“„ model_api.py               # ML model API (12.7KB)
β”‚       β”œβ”€β”€ πŸ“„ waitress_server.py         # WSGI server launcher
β”‚       β”œβ”€β”€ πŸ“„ requirements.txt           # Python dependencies
β”‚       β”œβ”€β”€ πŸ“„ Dockerfile                 # Backend container config
β”‚       β”œβ”€β”€ πŸ“„ .dockerignore              # Docker ignore rules
β”‚       β”‚
β”‚       └── πŸ“‚ model/                     # Trained ML Models
β”‚           β”œβ”€β”€ πŸ€– 8_15_23_125_LXg.h5     # LSTM model (2.2MB)
β”‚           └── πŸ€– 8_15_23_300_LXg.h5     # LSTM model (2.2MB)
β”‚
β”œβ”€β”€ πŸ“‚ assets/                            # Project assets
β”‚   β”œβ”€β”€ πŸ“‚ images/                        # Documentation images
β”‚   β”‚   β”œβ”€β”€ πŸ–ΌοΈ Website_Preview.png       # Website screenshot
β”‚   β”‚   └── πŸ–ΌοΈ terminal_screenshot.png   # Terminal output screenshot
β”‚   β”‚
β”‚   └── πŸ“‚ dataset/                       # Training datasets (optional)

πŸ”— Related Resources

πŸ‘₯ Contributors

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

🀝 Support & Contributing

For questions, suggestions, or issues:


Last Updated: 2026-04-29 | Status: Active Development

About

"Stock Ticker Predictor" project basically aims to provide a visual representation and analysis of data related to time-series data which is constantly changing. This provides a dashboard to user, made using reactJs - tailwindCSS, displaying current trends and stocks data which uses "LSTM" + "XGBoost" model.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 83.0%
  • Python 9.4%
  • CSS 7.0%
  • Other 0.6%