# taj1920/nextclose-yahoo-finance-stock-analysis architecture

> Architecture diagram of the GitHub repository taj1920/nextclose-yahoo-finance-stock-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/taj1920/nextclose-yahoo-finance-stock-analysis
- Repository: https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis

## Overview

NextClose is a Streamlit stock-analysis and prediction app. Users choose a company, history period, and interval; the app fetches Yahoo Finance prices, engineers features, trains and evaluates regression models, then displays a next-day estimate and actual-versus-predicted charts. The README is only a title, so product capabilities are grounded in the app source. The sampled files show no persistent store; external Yahoo Finance access is visible in the data module.

Main entry points: [`app.py`](https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/app.py) (Streamlit app), [`data.py`](https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/data.py) (Price history and features), [`config.py`](https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/config.py) (Stock and period options), [`models.py`](https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/models.py) (Regression training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Streamlit app<br/>[app.py]"]
  node_settings["Stock and period options<br/>[config.py]"]
  node_prediction["Next-day prediction<br/>[app.py]"]
  node_analytics["Trend analytics<br/>[app.py]"]
end

subgraph group_market_data["Market data"]
  node_history["Price history and features<br/>[data.py]"]
end

subgraph group_modeling["Modeling and evaluation"]
  node_trainer["Regression training<br/>[models.py]"]
  node_report["Performance report<br/>[models.py]"]
end

node_user(("Stock analyst"))
node_market_data{{"Yahoo Finance"}}

node_user -->|"chooses inputs"| node_app
node_app -->|"loads options"| node_settings
node_app -->|"requests history"| node_history
node_history -->|"downloads prices"| node_market_data
node_app -->|"trains models"| node_trainer
node_app -->|"builds report"| node_report
node_app -->|"predicts prices"| node_prediction
node_app -->|"plots trends"| node_analytics
node_app -->|"displays results"| node_user

click node_app "https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/app.py"
click node_settings "https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/config.py"
click node_history "https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/data.py"
click node_trainer "https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/models.py"
click node_report "https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/models.py"
click node_prediction "https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/app.py"
click node_analytics "https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/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_app,node_settings,node_prediction,node_analytics toneBlue
class node_history toneAmber
class node_trainer,node_report toneMint
class node_user,node_market_data toneIndigo
```

## Components

### User experience

- [Streamlit app](https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/app.py): `app.py`
- [Stock and period options](https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/config.py): `config.py`
- [Next-day prediction](https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/app.py): `app.py`
- [Trend analytics](https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/app.py): `app.py`

### Market data

- [Price history and features](https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/data.py): `data.py`

### Modeling and evaluation

- [Regression training](https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/models.py): `models.py`
- [Performance report](https://github.com/taj1920/nextclose-yahoo-finance-stock-analysis/blob/main/models.py): `models.py`

### Other components

- **Stock analyst**
- **Yahoo Finance**

## Connections

- Stock analyst → Streamlit app: chooses inputs (evidence: `app.py`)
- Streamlit app → Stock and period options: loads options (evidence: `app.py`)
- Streamlit app → Price history and features: requests history (evidence: `app.py`)
- Price history and features → Yahoo Finance: downloads prices (evidence: `data.py`)
- Streamlit app → Regression training: trains models (evidence: `app.py`)
- Streamlit app → Performance report: builds report (evidence: `app.py`)
- Streamlit app → Next-day prediction: predicts prices (evidence: `app.py`)
- Streamlit app → Trend analytics: plots trends (evidence: `app.py`)
- Streamlit app → Stock analyst: displays results (evidence: `app.py`)
