# shreyas230418/indian-stock-prediction-system architecture

> Architecture diagram of the GitHub repository shreyas230418/indian-stock-prediction-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shreyas230418/indian-stock-prediction-system
- Repository: https://github.com/shreyas230418/indian-stock-prediction-system

## Overview

This is a single-file Streamlit stock-analysis dashboard. Users select or search an Indian stock and a time period, then view market metrics, technical indicators, charts, and a price prediction; the dashboard also offers a Gemini assistant, watchlist, portfolio tracking, SIP estimates, and CSV download. The README documents yFinance as the live-data source, but the excerpt omits its retrieval call. Features are separated below as conceptual responsibilities within app.py, not as independent modules; relationships not shown in the excerpts are cited to the README or omitted.

Main entry points: [`app.py`](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py) (Streamlit Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_streamlit_ui["Streamlit Dashboard<br/>[app.py]"]
  node_market_data["NSE Market Data<br/>[app.py]"]
end

subgraph group_analysis["Stock Analysis"]
  node_metrics["Price Metrics<br/>[app.py]"]
  node_technicals["RSI &amp; Averages<br/>[app.py]"]
  node_charts["Candlestick Charts<br/>[app.py]"]
  node_prediction["Price Prediction<br/>[app.py]"]
end

subgraph group_investing["Investment Tools"]
  node_watchlist["Watchlist<br/>[app.py]"]
  node_portfolio["Portfolio Tracking<br/>[app.py]"]
  node_sip["SIP Calculator<br/>[app.py]"]
  node_csv_export["CSV Download<br/>[app.py]"]
end

subgraph group_assistant["AI Assistant"]
  node_gemini["Gemini Assistant<br/>[app.py]"]
end

node_investor(("Investor"))
node_yfinance(("yFinance"))
node_gemini_service(("Google Gemini"))

node_investor -->|"selects stock"| node_streamlit_ui
node_streamlit_ui -->|"requests prices"| node_market_data
node_market_data -->|"fetches data"| node_yfinance
node_market_data -->|"provides prices"| node_metrics
node_market_data -->|"provides prices"| node_technicals
node_market_data -->|"provides prices"| node_charts
node_market_data -->|"provides prices"| node_prediction
node_streamlit_ui -->|"displays"| node_metrics
node_streamlit_ui -->|"displays"| node_technicals
node_streamlit_ui -->|"renders"| node_charts
node_streamlit_ui -->|"displays"| node_prediction
node_streamlit_ui -->|"manages"| node_watchlist
node_streamlit_ui -->|"calculates"| node_portfolio
node_streamlit_ui -->|"calculates"| node_sip
node_streamlit_ui -->|"downloads"| node_csv_export
node_investor -->|"asks questions"| node_gemini
node_gemini -->|"requests response"| node_gemini_service
node_gemini -->|"shows response"| node_streamlit_ui

click node_streamlit_ui "https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py"
click node_market_data "https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py"
click node_metrics "https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py"
click node_technicals "https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py"
click node_charts "https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py"
click node_prediction "https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py"
click node_watchlist "https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py"
click node_portfolio "https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py"
click node_sip "https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py"
click node_csv_export "https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py"
click node_gemini "https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit_ui,node_market_data toneBlue
class node_metrics,node_technicals,node_charts,node_prediction toneAmber
class node_watchlist,node_portfolio,node_sip,node_csv_export toneMint
class node_gemini toneRose
class node_investor,node_yfinance,node_gemini_service toneIndigo
```

## Components

### Dashboard

- [Streamlit Dashboard](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py): `app.py`
- [NSE Market Data](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py): `app.py`

### Stock Analysis

- [Price Metrics](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py): `app.py`
- [RSI & Averages](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py): `app.py`
- [Candlestick Charts](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py): `app.py`
- [Price Prediction](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py): `app.py`

### Investment Tools

- [Watchlist](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py): `app.py`
- [Portfolio Tracking](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py): `app.py`
- [SIP Calculator](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py): `app.py`
- [CSV Download](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py): `app.py`

### AI Assistant

- [Gemini Assistant](https://github.com/shreyas230418/indian-stock-prediction-system/blob/main/app.py): `app.py`

### Other components

- **Investor**
- **yFinance**
- **Google Gemini**

## Connections

- Investor → Streamlit Dashboard: selects stock (evidence: `README.md`)
- Streamlit Dashboard → NSE Market Data: requests prices (evidence: `README.md`)
- NSE Market Data → yFinance: fetches data (evidence: `README.md`)
- NSE Market Data → Price Metrics: provides prices (evidence: `app.py`)
- NSE Market Data → RSI & Averages: provides prices (evidence: `app.py`)
- NSE Market Data → Candlestick Charts: provides prices (evidence: `app.py`)
- NSE Market Data → Price Prediction: provides prices (evidence: `app.py`)
- Streamlit Dashboard → Price Metrics: displays (evidence: `app.py`)
- Streamlit Dashboard → RSI & Averages: displays (evidence: `app.py`)
- Streamlit Dashboard → Candlestick Charts: renders (evidence: `app.py`)
- Streamlit Dashboard → Price Prediction: displays (evidence: `app.py`)
- Streamlit Dashboard → Watchlist: manages (evidence: `app.py`)
- Streamlit Dashboard → Portfolio Tracking: calculates (evidence: `app.py`)
- Streamlit Dashboard → SIP Calculator: calculates (evidence: `app.py`)
- Streamlit Dashboard → CSV Download: downloads (evidence: `app.py`)
- Investor → Gemini Assistant: asks questions (evidence: `app.py`)
- Gemini Assistant → Google Gemini: requests response (evidence: `app.py`)
- Gemini Assistant → Streamlit Dashboard: shows response (evidence: `app.py`)
