# shashankrboppidi2/cipherb-screen architecture

> Architecture diagram of the GitHub repository shashankrboppidi2/cipherb-screen, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shashankrboppidi2/cipherb-screen
- Repository: https://github.com/shashankrboppidi2/cipherb-screen

## Overview

Cipher B is a scheduled market-screening toolkit that turns equity, ETF, and crypto price histories into candidate lists and reports. The main equity workflow loads the CORE watchlists, fetches market data, evaluates 4-hour and weekly Cipher B plus AutoFib gates, enriches qualifying names, and writes CSV/JSON/HTML outputs and an optional email. Separate screens cover ETFs (including configurable 3-day mode), crypto, and hourly gold-dot alerts. Shared indicator logic supports these workflows. Source excerpts are partial, so unsampled implementation details and uncertain wiring are omitted.

Main entry points: [`crypto_screen.py`](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/crypto_screen.py) (Crypto Screen), [`screen.py`](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/screen.py) (Equity Screen), [`gold_screen.py`](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/gold_screen.py) (Gold Dot Screen), [`etf_screen.py`](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/etf_screen.py) (ETF Screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Universes and Data"]
  node_equity_lists["Equity Watchlists"]
  node_etf_list["ETF Universe<br/>[etfs.csv]"]
  node_meta["Company Metadata<br/>[universe_meta.csv]"]
  node_yahoo["Yahoo Finance"]
  node_coingecko["CoinGecko"]
  node_coinbase["Coinbase Data"]
end

subgraph group_screens["Screening Workflows"]
  node_equity_screen["Equity Screen<br/>[screen.py]"]
  node_etf_screen["ETF Screen<br/>[etf_screen.py]"]
  node_crypto_screen["Crypto Screen<br/>[crypto_screen.py]"]
  node_gold_screen["Gold Dot Screen<br/>[gold_screen.py]"]
  node_enrichment["Equity Enrichment<br/>[screen.py]"]
end

subgraph group_signals["Signal Logic"]
  node_cipher_logic["Cipher B Signals<br/>[cipherb.py]"]
  node_gold_logic["Gold Signals<br/>[gold.py]"]
end

subgraph group_outputs["Reports and Delivery"]
  node_reports["Report Generation<br/>[screen.py]"]
  node_etf_reports["ETF Reports<br/>[etf_screen.py]"]
  node_crypto_reports["Crypto Reports<br/>[crypto_screen.py]"]
  node_gold_reports["Gold Reports<br/>[gold_screen.py]"]
  node_results["Screen Results"]
  node_email["SMTP Email"]
end

node_operator(("Operator / Scheduler"))

node_operator -->|"starts run"| node_equity_screen
node_operator -->|"starts run"| node_etf_screen
node_operator -->|"starts run"| node_crypto_screen
node_operator -->|"starts run"| node_gold_screen
node_equity_screen -->|"loads symbols"| node_equity_lists
node_etf_screen -->|"loads universe"| node_etf_list
node_equity_screen -->|"downloads bars"| node_yahoo
node_etf_screen -->|"downloads bars"| node_yahoo
node_crypto_screen -->|"gets ranked coins"| node_coingecko
node_crypto_screen -->|"gets products and candles"| node_coinbase
node_crypto_screen -->|"downloads bars"| node_yahoo
node_gold_screen -->|"loads symbols"| node_equity_lists
node_gold_screen -->|"downloads bars"| node_yahoo
node_gold_screen -->|"uses coin universe and candles"| node_crypto_screen
node_equity_screen -->|"computes signals"| node_cipher_logic
node_etf_screen -->|"computes signals"| node_cipher_logic
node_crypto_screen -->|"computes signals"| node_cipher_logic
node_gold_screen -->|"computes gold dots"| node_gold_logic
node_equity_screen -->|"enriches candidates"| node_enrichment
node_enrichment -->|"reads metadata"| node_meta
node_enrichment -->|"fetches details and news"| node_yahoo
node_equity_screen -->|"builds report"| node_reports
node_etf_screen -->|"builds report"| node_etf_reports
node_crypto_screen -->|"builds report"| node_crypto_reports
node_gold_screen -->|"builds report"| node_gold_reports
node_equity_screen -->|"writes CSV and JSON"| node_results
node_reports -->|"writes HTML"| node_results
node_etf_screen -->|"writes CSV"| node_results
node_etf_reports -->|"writes HTML"| node_results
node_crypto_screen -->|"writes CSV"| node_results
node_crypto_reports -->|"writes HTML"| node_results
node_gold_screen -->|"writes hits CSV"| node_results
node_gold_reports -->|"writes HTML"| node_results
node_equity_screen -->|"sends report"| node_email
node_etf_screen -->|"sends report"| node_email
node_crypto_screen -->|"sends alerts"| node_email
node_gold_screen -->|"sends alerts"| node_email

click node_equity_lists "https://github.com/shashankrboppidi2/cipherb-screen/tree/main/watchlists"
click node_etf_list "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/watchlists/etfs.csv"
click node_meta "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/universe_meta.csv"
click node_equity_screen "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/screen.py"
click node_etf_screen "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/etf_screen.py"
click node_crypto_screen "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/crypto_screen.py"
click node_gold_screen "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/gold_screen.py"
click node_cipher_logic "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/cipherb.py"
click node_gold_logic "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/gold.py"
click node_enrichment "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/screen.py"
click node_reports "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/screen.py"
click node_etf_reports "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/etf_screen.py"
click node_crypto_reports "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/crypto_screen.py"
click node_gold_reports "https://github.com/shashankrboppidi2/cipherb-screen/blob/main/gold_screen.py"
click node_results "https://github.com/shashankrboppidi2/cipherb-screen/tree/main/results"

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_equity_lists,node_etf_list,node_meta,node_yahoo,node_coingecko,node_coinbase toneBlue
class node_equity_screen,node_etf_screen,node_crypto_screen,node_gold_screen,node_enrichment toneAmber
class node_cipher_logic,node_gold_logic toneMint
class node_reports,node_etf_reports,node_crypto_reports,node_gold_reports,node_results,node_email,node_operator toneRose
```

## Components

### Universes and Data

- [Equity Watchlists](https://github.com/shashankrboppidi2/cipherb-screen/tree/main/watchlists): `watchlists`
- [ETF Universe](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/watchlists/etfs.csv): `watchlists/etfs.csv`
- [Company Metadata](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/universe_meta.csv): `universe_meta.csv`
- **Yahoo Finance**
- **CoinGecko**
- **Coinbase Data**

### Screening Workflows

- [Equity Screen](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/screen.py): `screen.py`
- [ETF Screen](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/etf_screen.py): `etf_screen.py`
- [Crypto Screen](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/crypto_screen.py): `crypto_screen.py`
- [Gold Dot Screen](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/gold_screen.py): `gold_screen.py`
- [Equity Enrichment](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/screen.py): `screen.py`

### Signal Logic

- [Cipher B Signals](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/cipherb.py): `cipherb.py`
- [Gold Signals](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/gold.py): `gold.py`

### Reports and Delivery

- [Report Generation](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/screen.py): `screen.py`
- [ETF Reports](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/etf_screen.py): `etf_screen.py`
- [Crypto Reports](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/crypto_screen.py): `crypto_screen.py`
- [Gold Reports](https://github.com/shashankrboppidi2/cipherb-screen/blob/main/gold_screen.py): `gold_screen.py`
- [Screen Results](https://github.com/shashankrboppidi2/cipherb-screen/tree/main/results): `results`
- **SMTP Email**

### Other components

- **Operator / Scheduler**

## Connections

- Operator / Scheduler → Equity Screen: starts run
- Operator / Scheduler → ETF Screen: starts run
- Operator / Scheduler → Crypto Screen: starts run
- Operator / Scheduler → Gold Dot Screen: starts run
- Equity Screen → Equity Watchlists: loads symbols
- ETF Screen → ETF Universe: loads universe
- Equity Screen → Yahoo Finance: downloads bars
- ETF Screen → Yahoo Finance: downloads bars
- Crypto Screen → CoinGecko: gets ranked coins
- Crypto Screen → Coinbase Data: gets products and candles
- Crypto Screen → Yahoo Finance: downloads bars
- Gold Dot Screen → Equity Watchlists: loads symbols
- Gold Dot Screen → Yahoo Finance: downloads bars
- Gold Dot Screen → Crypto Screen: uses coin universe and candles
- Equity Screen → Cipher B Signals: computes signals
- ETF Screen → Cipher B Signals: computes signals
- Crypto Screen → Cipher B Signals: computes signals
- Gold Dot Screen → Gold Signals: computes gold dots
- Equity Screen → Equity Enrichment: enriches candidates
- Equity Enrichment → Company Metadata: reads metadata
- Equity Enrichment → Yahoo Finance: fetches details and news
- Equity Screen → Report Generation: builds report
- ETF Screen → ETF Reports: builds report
- Crypto Screen → Crypto Reports: builds report
- Gold Dot Screen → Gold Reports: builds report
- Equity Screen → Screen Results: writes CSV and JSON
- Report Generation → Screen Results: writes HTML
- ETF Screen → Screen Results: writes CSV
- ETF Reports → Screen Results: writes HTML
- Crypto Screen → Screen Results: writes CSV
- Crypto Reports → Screen Results: writes HTML
- Gold Dot Screen → Screen Results: writes hits CSV
- Gold Reports → Screen Results: writes HTML
- Equity Screen → SMTP Email: sends report
- ETF Screen → SMTP Email: sends report
- Crypto Screen → SMTP Email: sends alerts
- Gold Dot Screen → SMTP Email: sends alerts
