# kkrisc/avgo-report architecture

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

- Interactive diagram: https://gitdiagram.com/kkrisc/avgo-report
- Repository: https://github.com/kkrisc/avgo-report

## Overview

Options outlooks builds daily, ticker-specific forecasts from market data and publishes self-contained report pages plus an overview. The documented per-ticker workflow moves from option and earnings retrieval through implied-volatility, variance, and density modeling, then adds historical, physical-measure, positioning, and peer analysis before rendering. Configuration and optional hand-written context enrich reports; AI-spending data feeds the report set. The README documents the workflow and capabilities; source excerpts confirm selected calculations and data dependencies, but do not expose every pipeline invocation.

Main entry points: [`build_report.py`](https://github.com/kkrisc/avgo-report/blob/main/build_report.py) (Ticker report builder), [`cfg.py`](https://github.com/kkrisc/avgo-report/blob/main/cfg.py) (Run configuration), [`hist.py`](https://github.com/kkrisc/avgo-report/blob/main/hist.py) (Price history analysis), [`fetch.py`](https://github.com/kkrisc/avgo-report/blob/main/fetch.py) (Chain and snapshot fetch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Inputs and context"]
  node_tickerconfig["Ticker configuration<br/>[tickers.json]"]
  node_runconfig["Run configuration<br/>[cfg.py]"]
  node_earnings["Earnings calendar<br/>[earn.py]"]
  node_tickercontext["Ticker context inputs"]
  node_scenarioinputs["Earnings scenarios"]
  node_historyseeds["History seeds"]
  node_ai_spending["AI spending data<br/>[capex.py]"]
end

subgraph group_market["Market data and models"]
  node_chainfetch["Chain and snapshot fetch<br/>[fetch.py]"]
  node_parity["Forward and IV pricing<br/>[engine.py]"]
  node_variance["Variance term model<br/>[vmodel.py]"]
  node_smile_density["Smile and risk-neutral density<br/>[rnd.py]"]
end

subgraph group_analysis["Forecast and analysis"]
  node_history["Price history analysis<br/>[hist.py]"]
  node_physical["Physical forecasts<br/>[phys.py]"]
  node_positioning["Options positioning<br/>[fix.py]"]
  node_peeranalysis["Peer comparison<br/>[complex.py]"]
end

subgraph group_publication["Report publishing"]
  node_reportbuilder["Ticker report builder<br/>[build_report.py]"]
  node_reporttemplate["Report template"]
  node_overview["Overview builder<br/>[build_hub.py]"]
  node_published["Published report pages"]
end

node_reader(("Report readers"))
node_marketdata{{"Yahoo market data"}}

node_reader -->|"views"| node_published
node_marketdata -->|"provides quotes"| node_chainfetch
node_tickerconfig -->|"configures tickers"| node_runconfig
node_runconfig -->|"sets ticker"| node_chainfetch
node_chainfetch -->|"uses helpers"| node_earnings
node_chainfetch -->|"writes chain data"| node_parity
node_runconfig -->|"supplies parameters"| node_parity
node_parity -->|"provides IV surface"| node_variance
node_runconfig -->|"supplies event date"| node_variance
node_variance -->|"provides variance fit"| node_smile_density
node_runconfig -->|"supplies market inputs"| node_smile_density
node_marketdata -->|"provides price history"| node_history
node_runconfig -->|"sets ticker history"| node_history
node_earnings -->|"provides report dates"| node_history
node_history -->|"provides returns"| node_physical
node_smile_density -->|"provides densities"| node_physical
node_earnings -->|"provides reactions"| node_physical
node_history -->|"provides price series"| node_positioning
node_earnings -->|"provides report dates"| node_positioning
node_marketdata -->|"provides peer prices"| node_peeranalysis
node_runconfig -->|"sets peers"| node_peeranalysis
node_chainfetch -->|"provides option chains"| node_positioning
node_reporttemplate -->|"fills template"| node_reportbuilder
node_historyseeds -->|"seeds history"| node_reportbuilder
node_tickercontext -->|"adds context"| node_reportbuilder
node_scenarioinputs -->|"adds scenario tree"| node_reportbuilder
node_ai_spending -->|"supplies spending data"| node_reportbuilder
node_parity -->|"provides term data"| node_reportbuilder
node_smile_density -->|"provides forecasts"| node_reportbuilder
node_history -->|"provides history analysis"| node_reportbuilder
node_physical -->|"provides physical forecasts"| node_reportbuilder
node_positioning -->|"provides positioning"| node_reportbuilder
node_peeranalysis -->|"provides peer comparison"| node_reportbuilder
node_reportbuilder -->|"writes ticker pages"| node_published
node_reportbuilder -->|"supplies report status"| node_overview
node_overview -->|"writes overview"| node_published

click node_tickerconfig "https://github.com/kkrisc/avgo-report/blob/main/tickers.json"
click node_runconfig "https://github.com/kkrisc/avgo-report/blob/main/cfg.py"
click node_earnings "https://github.com/kkrisc/avgo-report/blob/main/earn.py"
click node_tickercontext "https://github.com/kkrisc/avgo-report/tree/main/notes"
click node_scenarioinputs "https://github.com/kkrisc/avgo-report/tree/main/scenarios"
click node_historyseeds "https://github.com/kkrisc/avgo-report/tree/main/seeds"
click node_ai_spending "https://github.com/kkrisc/avgo-report/blob/main/capex.py"
click node_chainfetch "https://github.com/kkrisc/avgo-report/blob/main/fetch.py"
click node_parity "https://github.com/kkrisc/avgo-report/blob/main/engine.py"
click node_variance "https://github.com/kkrisc/avgo-report/blob/main/vmodel.py"
click node_smile_density "https://github.com/kkrisc/avgo-report/blob/main/rnd.py"
click node_history "https://github.com/kkrisc/avgo-report/blob/main/hist.py"
click node_physical "https://github.com/kkrisc/avgo-report/blob/main/phys.py"
click node_positioning "https://github.com/kkrisc/avgo-report/blob/main/fix.py"
click node_peeranalysis "https://github.com/kkrisc/avgo-report/blob/main/complex.py"
click node_reportbuilder "https://github.com/kkrisc/avgo-report/blob/main/build_report.py"
click node_reporttemplate "https://github.com/kkrisc/avgo-report/blob/main/report_template.html"
click node_overview "https://github.com/kkrisc/avgo-report/blob/main/build_hub.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_tickerconfig,node_runconfig,node_earnings,node_tickercontext,node_scenarioinputs,node_historyseeds,node_ai_spending toneBlue
class node_chainfetch,node_parity,node_variance,node_smile_density toneAmber
class node_history,node_physical,node_positioning,node_peeranalysis toneMint
class node_reportbuilder,node_reporttemplate,node_overview,node_published toneRose
class node_reader,node_marketdata toneIndigo
```

## Components

### Inputs and context

- [Ticker configuration](https://github.com/kkrisc/avgo-report/blob/main/tickers.json): `tickers.json`
- [Run configuration](https://github.com/kkrisc/avgo-report/blob/main/cfg.py): `cfg.py`
- [Earnings calendar](https://github.com/kkrisc/avgo-report/blob/main/earn.py): `earn.py`
- [Ticker context inputs](https://github.com/kkrisc/avgo-report/tree/main/notes): `notes`
- [Earnings scenarios](https://github.com/kkrisc/avgo-report/tree/main/scenarios): `scenarios`
- [History seeds](https://github.com/kkrisc/avgo-report/tree/main/seeds): `seeds`
- [AI spending data](https://github.com/kkrisc/avgo-report/blob/main/capex.py): `capex.py`

### Market data and models

- [Chain and snapshot fetch](https://github.com/kkrisc/avgo-report/blob/main/fetch.py): `fetch.py`
- [Forward and IV pricing](https://github.com/kkrisc/avgo-report/blob/main/engine.py): `engine.py`
- [Variance term model](https://github.com/kkrisc/avgo-report/blob/main/vmodel.py): `vmodel.py`
- [Smile and risk-neutral density](https://github.com/kkrisc/avgo-report/blob/main/rnd.py): `rnd.py`

### Forecast and analysis

- [Price history analysis](https://github.com/kkrisc/avgo-report/blob/main/hist.py): `hist.py`
- [Physical forecasts](https://github.com/kkrisc/avgo-report/blob/main/phys.py): `phys.py`
- [Options positioning](https://github.com/kkrisc/avgo-report/blob/main/fix.py): `fix.py`
- [Peer comparison](https://github.com/kkrisc/avgo-report/blob/main/complex.py): `complex.py`

### Report publishing

- [Ticker report builder](https://github.com/kkrisc/avgo-report/blob/main/build_report.py): `build_report.py`
- [Report template](https://github.com/kkrisc/avgo-report/blob/main/report_template.html): `report_template.html`
- [Overview builder](https://github.com/kkrisc/avgo-report/blob/main/build_hub.py): `build_hub.py`
- **Published report pages**

### Other components

- **Report readers**
- **Yahoo market data**

## Connections

- Report readers → Published report pages: views (evidence: `README.md`)
- Yahoo market data → Chain and snapshot fetch: provides quotes (evidence: `fetch.py`)
- Ticker configuration → Run configuration: configures tickers (evidence: `cfg.py`)
- Run configuration → Chain and snapshot fetch: sets ticker (evidence: `README.md`)
- Chain and snapshot fetch → Earnings calendar: uses helpers (evidence: `fetch.py`)
- Chain and snapshot fetch → Forward and IV pricing: writes chain data (evidence: `README.md`)
- Run configuration → Forward and IV pricing: supplies parameters (evidence: `engine.py`)
- Forward and IV pricing → Variance term model: provides IV surface (evidence: `README.md`)
- Run configuration → Variance term model: supplies event date (evidence: `vmodel.py`)
- Variance term model → Smile and risk-neutral density: provides variance fit (evidence: `rnd.py`)
- Run configuration → Smile and risk-neutral density: supplies market inputs (evidence: `rnd.py`)
- Yahoo market data → Price history analysis: provides price history (evidence: `hist.py`)
- Run configuration → Price history analysis: sets ticker history (evidence: `hist.py`)
- Earnings calendar → Price history analysis: provides report dates (evidence: `hist.py`)
- Price history analysis → Physical forecasts: provides returns (evidence: `phys.py`)
- Smile and risk-neutral density → Physical forecasts: provides densities (evidence: `phys.py`)
- Earnings calendar → Physical forecasts: provides reactions (evidence: `phys.py`)
- Price history analysis → Options positioning: provides price series (evidence: `fix.py`)
- Earnings calendar → Options positioning: provides report dates (evidence: `fix.py`)
- Yahoo market data → Peer comparison: provides peer prices (evidence: `complex.py`)
- Run configuration → Peer comparison: sets peers (evidence: `complex.py`)
- Chain and snapshot fetch → Options positioning: provides option chains (evidence: `README.md`)
- Report template → Ticker report builder: fills template (evidence: `build_report.py`)
- History seeds → Ticker report builder: seeds history (evidence: `README.md`)
- Ticker context inputs → Ticker report builder: adds context (evidence: `README.md`)
- Earnings scenarios → Ticker report builder: adds scenario tree (evidence: `README.md`)
- AI spending data → Ticker report builder: supplies spending data (evidence: `README.md`)
- Forward and IV pricing → Ticker report builder: provides term data (evidence: `README.md`)
- Smile and risk-neutral density → Ticker report builder: provides forecasts (evidence: `README.md`)
- Price history analysis → Ticker report builder: provides history analysis (evidence: `README.md`)
- Physical forecasts → Ticker report builder: provides physical forecasts (evidence: `README.md`)
- Options positioning → Ticker report builder: provides positioning (evidence: `README.md`)
- Peer comparison → Ticker report builder: provides peer comparison (evidence: `README.md`)
- Ticker report builder → Published report pages: writes ticker pages (evidence: `README.md`)
- Ticker report builder → Overview builder: supplies report status (evidence: `README.md`)
- Overview builder → Published report pages: writes overview (evidence: `README.md`)
