# goutamboppana/iiit_sri_city-boppana_goutam-hackathon architecture

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

- Interactive diagram: https://gitdiagram.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon
- Repository: https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon

## Overview

This repository combines an NLP financial-risk signal generator with a Streamlit dashboard for tactical index rebalancing and hypothetical portfolio stress testing. The principal workflow ingests news and tweets, identifies relevant tickers, classifies sentiment and events, scores impact, validates and saves signals, then lets dashboard users explore those signals and run portfolio analyses. The README documents dashboard behavior and major capabilities; app.py and src/stress.py were not read in full, so their internal call paths are not inferred.

Main entry points: [`src/run_engine.py`](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/run_engine.py) (Engine Runner), [`src/ingest.py`](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/ingest.py) (Ingest and Filter), [`app.py`](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/app.py) (Streamlit Dashboard), [`src/engine.py`](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/engine.py) (Sentiment and Events)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Signal Ingestion"]
  node_ingestion["Ingest and Filter<br/>[ingest.py]"]
  node_ticker["Ticker Recognition<br/>[ingest.py]"]
end

subgraph group_risk["Risk Analysis"]
  node_runner["Engine Runner<br/>[run_engine.py]"]
  node_nlp["Sentiment and Events<br/>[engine.py]"]
  node_impact["Impact Scoring<br/>[impact.py]"]
  node_schema["Signal Validation<br/>[schema.py]"]
end

subgraph group_portfolio["Portfolio Analytics"]
  node_rebalance["Index Rebalancer<br/>[rebalance.py]"]
  node_stress["Stress Scenarios<br/>[stress.py]"]
  node_portfolio_results["Portfolio Results<br/>[rebalance.py]"]
  node_stress_results["Stress Results<br/>[stress.py]"]
end

subgraph group_interface["Dashboard and Data"]
  node_signals["Signal Files"]
  node_dashboard["Streamlit Dashboard<br/>[app.py]"]
end

node_news(("NewsAPI / Headlines"))
node_tweets(("Tweet Sources"))

node_news -->|"provides news"| node_ingestion
node_tweets -->|"provides tweets"| node_ingestion
node_ingestion -->|"detects tickers"| node_ticker
node_runner -->|"loads sources"| node_ingestion
node_runner -->|"analyzes text"| node_nlp
node_nlp -->|"scores impact"| node_impact
node_runner -->|"validates signals"| node_schema
node_runner -->|"writes signals"| node_signals
node_dashboard -->|"reads signals"| node_signals
node_dashboard -->|"runs rebalancing"| node_rebalance
node_dashboard -->|"runs stress tests"| node_stress
node_rebalance -->|"returns weights"| node_portfolio_results
node_stress -->|"returns estimates"| node_stress_results

click node_ingestion "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/ingest.py"
click node_ticker "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/ingest.py"
click node_runner "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/run_engine.py"
click node_nlp "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/engine.py"
click node_impact "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/impact.py"
click node_schema "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/schema.py"
click node_signals "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/tree/main/data"
click node_dashboard "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/app.py"
click node_rebalance "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/rebalance.py"
click node_stress "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/stress.py"
click node_portfolio_results "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/rebalance.py"
click node_stress_results "https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/stress.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_ingestion,node_ticker toneBlue
class node_runner,node_nlp,node_impact,node_schema toneAmber
class node_rebalance,node_stress,node_portfolio_results,node_stress_results,node_news toneMint
class node_signals,node_dashboard toneRose
class node_tweets toneIndigo
```

## Components

### Signal Ingestion

- [Ingest and Filter](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/ingest.py): `src/ingest.py`
- [Ticker Recognition](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/ingest.py): `src/ingest.py`

### Risk Analysis

- [Engine Runner](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/run_engine.py): `src/run_engine.py`
- [Sentiment and Events](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/engine.py): `src/engine.py`
- [Impact Scoring](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/impact.py): `src/impact.py`
- [Signal Validation](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/schema.py): `src/schema.py`

### Portfolio Analytics

- [Index Rebalancer](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/rebalance.py): `src/rebalance.py`
- [Stress Scenarios](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/stress.py): `src/stress.py`
- [Portfolio Results](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/rebalance.py): `src/rebalance.py`
- [Stress Results](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/src/stress.py): `src/stress.py`

### Dashboard and Data

- [Signal Files](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/tree/main/data): `data`
- [Streamlit Dashboard](https://github.com/goutamboppana/iiit_sri_city-boppana_goutam-hackathon/blob/main/app.py): `app.py`

### Other components

- **NewsAPI / Headlines**
- **Tweet Sources**

## Connections

- NewsAPI / Headlines → Ingest and Filter: provides news (evidence: `README.md`)
- Tweet Sources → Ingest and Filter: provides tweets (evidence: `README.md`)
- Ingest and Filter → Ticker Recognition: detects tickers (evidence: `src/ingest.py`)
- Engine Runner → Ingest and Filter: loads sources (evidence: `src/run_engine.py`)
- Engine Runner → Sentiment and Events: analyzes text (evidence: `src/run_engine.py`)
- Sentiment and Events → Impact Scoring: scores impact (evidence: `src/engine.py`)
- Engine Runner → Signal Validation: validates signals (evidence: `src/run_engine.py`)
- Engine Runner → Signal Files: writes signals (evidence: `README.md`)
- Streamlit Dashboard → Signal Files: reads signals (evidence: `README.md`)
- Streamlit Dashboard → Index Rebalancer: runs rebalancing (evidence: `README.md`)
- Streamlit Dashboard → Stress Scenarios: runs stress tests (evidence: `README.md`)
- Index Rebalancer → Portfolio Results: returns weights (evidence: `src/rebalance.py`)
- Stress Scenarios → Stress Results: returns estimates (evidence: `src/stress.py`)
