# suthaharan/stockpredictprophet architecture

> Architecture diagram of the GitHub repository suthaharan/stockpredictprophet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suthaharan/stockpredictprophet
- Repository: https://github.com/suthaharan/stockpredictprophet

## Overview

This is a small Streamlit stock-analysis app. Users choose a ticker and date range, fetch Yahoo Finance data, inspect raw prices, and generate a Prophet forecast. They can also view candlestick and moving-average charts. The README mentions weekly and yearly trend analysis, but the sampled source does not show a distinct implementation of those analyses; the forecast-component view is the closest visible capability. All app logic is in main.py, so subsystem boundaries here are functional rather than separate modules.

Main entry points: [`main.py`](https://github.com/suthaharan/stockpredictprophet/blob/master/main.py) (Data loading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs_data["Inputs and data"]
  node_app_controls["App controls<br/>[main.py]"]
  node_market_data["Yahoo Finance"]
  node_data_loading["Data loading<br/>[main.py]"]
  node_raw_data_view["Raw data view<br/>[main.py]"]
end

subgraph group_forecast["Forecasting"]
  node_forecast_prep["Forecast preparation<br/>[main.py]"]
  node_prophet["Prophet model"]
  node_forecast_view["Forecast views<br/>[main.py]"]
end

subgraph group_charts["Charts and analysis"]
  node_price_chart["Price chart<br/>[main.py]"]
  node_trend_charts["Trend analysis<br/>[main.py]"]
end

node_user(("User"))

node_user -->|"sets inputs"| node_app_controls
node_app_controls -->|"selects range"| node_data_loading
node_data_loading -->|"downloads prices"| node_market_data
node_data_loading -->|"displays rows"| node_raw_data_view
node_data_loading -->|"plots prices"| node_price_chart
node_data_loading -->|"selects close"| node_forecast_prep
node_forecast_prep -->|"fits and predicts"| node_prophet
node_prophet -->|"renders forecast"| node_forecast_view
node_app_controls -->|"sets averages"| node_trend_charts
node_data_loading -->|"plots candles"| node_trend_charts

click node_app_controls "https://github.com/suthaharan/stockpredictprophet/blob/master/main.py"
click node_data_loading "https://github.com/suthaharan/stockpredictprophet/blob/master/main.py"
click node_raw_data_view "https://github.com/suthaharan/stockpredictprophet/blob/master/main.py"
click node_forecast_prep "https://github.com/suthaharan/stockpredictprophet/blob/master/main.py"
click node_forecast_view "https://github.com/suthaharan/stockpredictprophet/blob/master/main.py"
click node_price_chart "https://github.com/suthaharan/stockpredictprophet/blob/master/main.py"
click node_trend_charts "https://github.com/suthaharan/stockpredictprophet/blob/master/main.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_app_controls,node_market_data,node_data_loading,node_raw_data_view,node_user toneBlue
class node_forecast_prep,node_prophet,node_forecast_view toneAmber
class node_price_chart,node_trend_charts toneMint
```

## Components

### Inputs and data

- [App controls](https://github.com/suthaharan/stockpredictprophet/blob/master/main.py): `main.py`
- **Yahoo Finance**
- [Data loading](https://github.com/suthaharan/stockpredictprophet/blob/master/main.py): `main.py`
- [Raw data view](https://github.com/suthaharan/stockpredictprophet/blob/master/main.py): `main.py`

### Forecasting

- [Forecast preparation](https://github.com/suthaharan/stockpredictprophet/blob/master/main.py): `main.py`
- **Prophet model**
- [Forecast views](https://github.com/suthaharan/stockpredictprophet/blob/master/main.py): `main.py`

### Charts and analysis

- [Price chart](https://github.com/suthaharan/stockpredictprophet/blob/master/main.py): `main.py`
- [Trend analysis](https://github.com/suthaharan/stockpredictprophet/blob/master/main.py): `main.py`

### Other components

- **User**

## Connections

- User → App controls: sets inputs (evidence: `main.py`)
- App controls → Data loading: selects range (evidence: `main.py`)
- Data loading → Yahoo Finance: downloads prices (evidence: `main.py`)
- Data loading → Raw data view: displays rows (evidence: `main.py`)
- Data loading → Price chart: plots prices (evidence: `main.py`)
- Data loading → Forecast preparation: selects close (evidence: `main.py`)
- Forecast preparation → Prophet model: fits and predicts (evidence: `main.py`)
- Prophet model → Forecast views: renders forecast (evidence: `main.py`)
- App controls → Trend analysis: sets averages (evidence: `main.py`)
- Data loading → Trend analysis: plots candles (evidence: `main.py`)
