# bhupesh-debug/quant-ipo-engine architecture

> Architecture diagram of the GitHub repository bhupesh-debug/quant-ipo-engine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bhupesh-debug/quant-ipo-engine
- Repository: https://github.com/bhupesh-debug/quant-ipo-engine

## Overview

IPO Quant Engine builds a deduplicated mainboard/SME IPO universe, fetches Yahoo Finance prices and snapshots, computes per-IPO performance metrics, verdicts and forward scores, then produces an Excel report and interactive dashboard. The runner is the control-flow entry point; analytics stages are separate, and cached market data supports reruns. The README documents the broader scoring and output capabilities. Some raw-data preparation and downstream implementation details were not sampled, so only documented or evidenced links are shown.

Main entry points: [`run_pipeline.py`](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/run_pipeline.py) (Pipeline Runner), [`data_feeds/yahoo.py`](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/data_feeds/yahoo.py) (Yahoo Fetch), [`data`](https://github.com/bhupesh-debug/quant-ipo-engine/tree/main/data) (IPO Master CSV), [`config.py`](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/config.py) (Methodology Config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_universe["IPO Universe"]
  node_sme_parser["SME Parser<br/>[parse_sme.py]"]
  node_merge["Universe Merge<br/>[merge.py]"]
  node_master[("IPO Master CSV")]
end

subgraph group_market["Market Data"]
  node_yahoo_fetch["Yahoo Fetch<br/>[yahoo.py]"]
  node_yahoo["Yahoo Finance"]
  node_market_cache[("Price and Snapshot Cache")]
end

subgraph group_analysis["Analytics"]
  node_metrics["Performance Metrics<br/>[metrics.py]"]
  node_verdicts["Rule-Based Verdicts<br/>[verdicts.py]"]
  node_scoring["Forward Scoring<br/>[scoring.py]"]
  node_performance[("Performance CSV")]
  node_config["Methodology Config<br/>[config.py]"]
end

subgraph group_reports["Reports"]
  node_excel["Excel Report<br/>[excel_report.py]"]
  node_dashboard["Interactive Dashboard<br/>[dashboard.py]"]
end

node_researcher(("Researcher"))
node_runner["Pipeline Runner<br/>[run_pipeline.py]"]

node_researcher -->|"runs"| node_runner
node_runner -->|"calls"| node_merge
node_sme_parser -->|"prepares SME input"| node_master
node_merge -->|"writes master"| node_master
node_runner -->|"calls fetch"| node_yahoo_fetch
node_yahoo_fetch -->|"downloads data"| node_yahoo
node_yahoo_fetch -->|"caches data"| node_market_cache
node_runner -->|"reads on rerun"| node_market_cache
node_runner -->|"builds metrics"| node_metrics
node_runner -->|"passes universe"| node_master
node_runner -->|"passes market data"| node_market_cache
node_metrics -->|"uses formulas"| node_config
node_runner -->|"adds verdicts"| node_verdicts
node_verdicts -->|"uses thresholds"| node_config
node_runner -->|"adds scores"| node_scoring
node_scoring -->|"uses weights"| node_config
node_runner -->|"writes results"| node_performance
node_runner -->|"builds report"| node_excel
node_runner -->|"builds dashboard"| node_dashboard
node_excel -.->|"renders results"| node_performance
node_dashboard -->|"renders results"| node_performance

click node_runner "https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/run_pipeline.py"
click node_sme_parser "https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/data/_raw/parse_sme.py"
click node_merge "https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/universe/merge.py"
click node_master "https://github.com/bhupesh-debug/quant-ipo-engine/tree/main/data"
click node_yahoo_fetch "https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/data_feeds/yahoo.py"
click node_market_cache "https://github.com/bhupesh-debug/quant-ipo-engine/tree/main/data"
click node_metrics "https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/analytics/metrics.py"
click node_verdicts "https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/analytics/verdicts.py"
click node_scoring "https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/analytics/scoring.py"
click node_performance "https://github.com/bhupesh-debug/quant-ipo-engine/tree/main/data"
click node_config "https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/config.py"
click node_excel "https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/outputs/excel_report.py"
click node_dashboard "https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/outputs/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_sme_parser,node_merge,node_master toneBlue
class node_yahoo_fetch,node_yahoo,node_market_cache toneAmber
class node_metrics,node_verdicts,node_scoring,node_performance,node_config toneMint
class node_excel,node_dashboard toneRose
class node_researcher toneIndigo
class node_runner toneTeal
```

## Components

### IPO Universe

- [SME Parser](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/data/_raw/parse_sme.py): `data/_raw/parse_sme.py`
- [Universe Merge](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/universe/merge.py): `universe/merge.py`
- [IPO Master CSV](https://github.com/bhupesh-debug/quant-ipo-engine/tree/main/data): `data`

### Market Data

- [Yahoo Fetch](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/data_feeds/yahoo.py): `data_feeds/yahoo.py`
- **Yahoo Finance**
- [Price and Snapshot Cache](https://github.com/bhupesh-debug/quant-ipo-engine/tree/main/data): `data`

### Analytics

- [Performance Metrics](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/analytics/metrics.py): `analytics/metrics.py`
- [Rule-Based Verdicts](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/analytics/verdicts.py): `analytics/verdicts.py`
- [Forward Scoring](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/analytics/scoring.py): `analytics/scoring.py`
- [Performance CSV](https://github.com/bhupesh-debug/quant-ipo-engine/tree/main/data): `data`
- [Methodology Config](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/config.py): `config.py`

### Reports

- [Excel Report](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/outputs/excel_report.py): `outputs/excel_report.py`
- [Interactive Dashboard](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/outputs/dashboard.py): `outputs/dashboard.py`

### Other components

- **Researcher**
- [Pipeline Runner](https://github.com/bhupesh-debug/quant-ipo-engine/blob/main/run_pipeline.py): `run_pipeline.py`

## Connections

- Researcher → Pipeline Runner: runs (evidence: `README.md`)
- Pipeline Runner → Universe Merge: calls (evidence: `run_pipeline.py`)
- SME Parser → IPO Master CSV: prepares SME input (evidence: `data/_raw/parse_sme.py`)
- Universe Merge → IPO Master CSV: writes master (evidence: `universe/merge.py`)
- Pipeline Runner → Yahoo Fetch: calls fetch (evidence: `run_pipeline.py`)
- Yahoo Fetch → Yahoo Finance: downloads data (evidence: `data_feeds/yahoo.py`)
- Yahoo Fetch → Price and Snapshot Cache: caches data (evidence: `README.md`)
- Pipeline Runner → Price and Snapshot Cache: reads on rerun (evidence: `run_pipeline.py`)
- Pipeline Runner → Performance Metrics: builds metrics (evidence: `run_pipeline.py`)
- Pipeline Runner → IPO Master CSV: passes universe (evidence: `run_pipeline.py`)
- Pipeline Runner → Price and Snapshot Cache: passes market data (evidence: `run_pipeline.py`)
- Performance Metrics → Methodology Config: uses formulas (evidence: `analytics/metrics.py`)
- Pipeline Runner → Rule-Based Verdicts: adds verdicts (evidence: `run_pipeline.py`)
- Rule-Based Verdicts → Methodology Config: uses thresholds (evidence: `analytics/verdicts.py`)
- Pipeline Runner → Forward Scoring: adds scores (evidence: `run_pipeline.py`)
- Forward Scoring → Methodology Config: uses weights (evidence: `analytics/scoring.py`)
- Pipeline Runner → Performance CSV: writes results (evidence: `run_pipeline.py`)
- Pipeline Runner → Excel Report: builds report (evidence: `run_pipeline.py`)
- Pipeline Runner → Interactive Dashboard: builds dashboard (evidence: `run_pipeline.py`)
- Excel Report → Performance CSV: renders results
- Interactive Dashboard → Performance CSV: renders results (evidence: `outputs/dashboard.py`)
