# isezdasgith/snp500-market-risk-and-froth-dashboard architecture

> Architecture diagram of the GitHub repository isezdasgith/snp500-market-risk-and-froth-dashboard, 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/isezdasgith/snp500-market-risk-and-froth-dashboard
- Repository: https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard

## Overview

This CLI dashboard turns market indicators and explicit subjective ratings into a weighted risk/froth score, verdict, and historical chart. The main workflow is manual entry or optional auto-fetch, scoring across four distinct categories, report generation, and saving/charting each run. `dashboard.py` is the orchestrator; `indicators.py` defines the categories and scoring model, while `data_sources.py` provides optional fetchers. The graph reflects the shown dashboard and fetcher code; external service links are evidenced there, while history behavior is also documented in the README.

Main entry points: [`dashboard.py`](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/dashboard.py) (Composite scoring), [`data_sources.py`](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/data_sources.py) (Fetch dispatch), [`history.json`](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/history.json) (Run history), [`indicators.py`](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/indicators.py) (Macro fundamentals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Dashboard"]
  node_entry["Input collection<br/>[dashboard.py]"]
  node_scoring["Composite scoring<br/>[dashboard.py]"]
  node_report["Score and verdict<br/>[dashboard.py]"]
end

subgraph group_model["Risk Model"]
  node_macro["Macro fundamentals<br/>[indicators.py]"]
  node_valuation["Valuation and positioning<br/>[indicators.py]"]
  node_technical["Technical trend<br/>[indicators.py]"]
  node_qualitative["Qualitative judgment<br/>[indicators.py]"]
end

subgraph group_fetch["Data Fetching"]
  node_fetchers["Fetch dispatch<br/>[data_sources.py]"]
end

subgraph group_history["History"]
  node_history[("Run history<br/>[history.json]")]
  node_chart["History chart<br/>[dashboard.py]"]
end

node_user(("Dashboard user"))
node_fred["FRED"]
node_yahoo["Yahoo Finance"]
node_multpl["Multpl"]

node_user -->|"enters values"| node_entry
node_entry -.->|"optionally fetches"| node_fetchers
node_entry -->|"provides values"| node_scoring
node_scoring -->|"scores indicators"| node_macro
node_scoring -->|"scores indicators"| node_valuation
node_scoring -->|"scores indicators"| node_technical
node_scoring -->|"scores indicators"| node_qualitative
node_scoring -->|"produces result"| node_report
node_fetchers -->|"requests series"| node_fred
node_fetchers -->|"fetches prices"| node_yahoo
node_fetchers -->|"scrapes valuations"| node_multpl
node_report -->|"displays result"| node_user
node_report -->|"appends run"| node_history
node_history -->|"plots history"| node_chart
node_chart -->|"shows chart"| node_user

click node_entry "https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/dashboard.py"
click node_scoring "https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/dashboard.py"
click node_report "https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/dashboard.py"
click node_macro "https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/indicators.py"
click node_valuation "https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/indicators.py"
click node_technical "https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/indicators.py"
click node_qualitative "https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/indicators.py"
click node_fetchers "https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/data_sources.py"
click node_history "https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/history.json"
click node_chart "https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/dashboard.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_entry,node_scoring,node_report,node_user toneBlue
class node_macro,node_valuation,node_technical,node_qualitative toneAmber
class node_fetchers toneMint
class node_history,node_chart toneRose
class node_fred,node_yahoo,node_multpl toneIndigo
```

## Components

### Dashboard

- [Input collection](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/dashboard.py): `dashboard.py`
- [Composite scoring](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/dashboard.py): `dashboard.py`
- [Score and verdict](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/dashboard.py): `dashboard.py`

### Risk Model

- [Macro fundamentals](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/indicators.py): `indicators.py`
- [Valuation and positioning](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/indicators.py): `indicators.py`
- [Technical trend](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/indicators.py): `indicators.py`
- [Qualitative judgment](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/indicators.py): `indicators.py`

### Data Fetching

- [Fetch dispatch](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/data_sources.py): `data_sources.py`

### History

- [Run history](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/history.json): `history.json`
- [History chart](https://github.com/isezdasgith/snp500-market-risk-and-froth-dashboard/blob/main/dashboard.py): `dashboard.py`

### Other components

- **Dashboard user**
- **FRED**
- **Yahoo Finance**
- **Multpl**

## Connections

- Dashboard user → Input collection: enters values (evidence: `dashboard.py`)
- Input collection → Fetch dispatch: optionally fetches (evidence: `dashboard.py`)
- Input collection → Composite scoring: provides values (evidence: `dashboard.py`)
- Composite scoring → Macro fundamentals: scores indicators (evidence: `dashboard.py`)
- Composite scoring → Valuation and positioning: scores indicators (evidence: `dashboard.py`)
- Composite scoring → Technical trend: scores indicators (evidence: `dashboard.py`)
- Composite scoring → Qualitative judgment: scores indicators (evidence: `dashboard.py`)
- Composite scoring → Score and verdict: produces result (evidence: `dashboard.py`)
- Fetch dispatch → FRED: requests series (evidence: `data_sources.py`)
- Fetch dispatch → Yahoo Finance: fetches prices (evidence: `data_sources.py`)
- Fetch dispatch → Multpl: scrapes valuations (evidence: `data_sources.py`)
- Score and verdict → Dashboard user: displays result (evidence: `dashboard.py`)
- Score and verdict → Run history: appends run (evidence: `dashboard.py`)
- Run history → History chart: plots history (evidence: `dashboard.py`)
- History chart → Dashboard user: shows chart (evidence: `dashboard.py`)
