Skip to content

wafiyaalim/BDA_extra_experiment

Repository files navigation

Real-Time Stock Analytics Dashboard

Overview

A real-time stock analytics system that streams stock data from Chartink, stores it in MongoDB, and visualizes it with Streamlit. Detects anomalies in stock prices using moving averages and provides both live and historical views.


Features

  • Real-time streaming with Apache Kafka
  • 🗃️ Persistent storage using MongoDB
  • 📊 Interactive dashboard with Streamlit & Plotly
  • 🧮 Anomaly detection via moving averages
  • 🕒 View live or historical stock data

Tech Stack

Component Purpose
Python Core programming language
Apache Kafka Real-time message streaming
MongoDB NoSQL storage for historical stock data
Streamlit Web-based visualization
Plotly Interactive charts

Setup

Prerequisites

  • Python 3.8+
  • Kafka broker (local or Docker)
  • MongoDB server running locally or in Docker

Installation

# Clone the repo
git clone https://github.com/your-username/real-time-stock-analytics.git
cd real-time-stock-analytics

# Install dependencies
pip install -r requirements.txt

Running the Project

  1. Start Kafka & MongoDB
  2. Run Producer
python stock_producer.py
  1. Run Consumer
python stock_consumer.py
  1. Launch Dashboard
streamlit run app.py

Open your browser at http://localhost:8501


Project Structure

real-time-stock-analytics/
│
├── stock_producer.py      # Fetches data & sends to Kafka + MongoDB
├── stock_consumer.py      # Consumes Kafka data & stores in MongoDB
├── app.py                 # Streamlit dashboard
├── requirements.txt       # Dependencies
└── README.md              # Documentation

Results

  • Live streaming of stock data every 60 seconds
  • Automatic moving average calculations
  • Anomalies highlighted in dashboard
  • Interactive charts for trends & analysis

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages