# fengabing0207-oss/thesisboard architecture

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

- Interactive diagram: https://gitdiagram.com/fengabing0207-oss/thesisboard
- Repository: https://github.com/fengabing0207-oss/thesisboard

## Overview

ThesisBoard is a Streamlit research dashboard, not a trading or execution system. Researchers record pre-trade theses, inspect market headlines, or use News Signal Lab to capture headlines and assess point-in-time readiness, then audit forward outcomes and candidate strategies. Validation Lab demonstrates horizon-based and benchmark-adjusted evaluation. The graph preserves these distinct product branches and the scheduled research cycle. Some connections are based on README descriptions or the SOURCE INDEX; unsampled implementation details are not inferred.

Main entry points: [`app.py`](https://github.com/fengabing0207-oss/thesisboard/blob/main/app.py) (Streamlit pages), [`src/demo_validation_data.py`](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/demo_validation_data.py) (Validation Lab data), [`src/research_automation.py`](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/research_automation.py) (Research cycle), [`src/news_signal_lab.py`](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_signal_lab.py) (Signal feature lab)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Research dashboard"]
  node_dashboard["Streamlit pages<br/>[app.py]"]
  node_pretrade["Pre-Trade Check<br/>[pre_trade_check.py]"]
  node_journal[("Thesis journal<br/>[journal.py]")]
  node_market_news["Market News<br/>[market_news.py]"]
end

subgraph group_capture["News capture"]
  node_news_collector["Headline collector<br/>[news_collector.py]"]
  node_news_store[("News and audit store<br/>[news_store.py]")]
  node_postgres[("PostgreSQL backend")]
end

subgraph group_research["Validation and modeling"]
  node_signal_lab["Signal feature lab<br/>[news_signal_lab.py]"]
  node_integrity["Point-in-time audits"]
  node_policy["Model selection policy"]
  node_backtest["Position-book backtest"]
  node_strategy["Locked StrategySpec<br/>[strategy_spec.py]"]
  node_prices["Price provider<br/>[price_provider.py]"]
  node_validation_data["Validation Lab data"]
  node_event_study["Event study<br/>[event_study.py]"]
  node_abnormal_returns["Abnormal returns"]
  node_forward_tracker["Forward outcomes<br/>[forward_tracker.py]"]
  node_signal_store[("Signal outcome store<br/>[signal_store.py]")]
  node_rule_validator["Rule validator"]
  node_signal_evaluator["Cohort evaluator"]
end

subgraph group_operations["Research operations"]
  node_readiness["Collection readiness"]
  node_automation["Research cycle"]
end

node_researcher(("Researcher"))
node_anthropic["Anthropic summary"]

node_researcher -->|"uses"| node_dashboard
node_dashboard -->|"renders"| node_pretrade
node_pretrade -->|"saves decisions"| node_journal
node_dashboard -->|"renders"| node_market_news
node_market_news -.->|"optionally summarizes"| node_anthropic
node_dashboard -->|"offers capture"| node_news_collector
node_news_collector -->|"records captures"| node_news_store
node_news_store -->|"uses backend"| node_postgres
node_dashboard -->|"shows readiness"| node_readiness
node_dashboard -->|"shows lab"| node_signal_lab
node_signal_lab -.->|"reads headlines"| node_news_store
node_signal_lab -->|"audits predictions"| node_integrity
node_policy -->|"checks leakage"| node_integrity
node_backtest -->|"evaluates candidates"| node_policy
node_backtest -->|"locks strategy"| node_strategy
node_automation -->|"collects headlines"| node_news_collector
node_automation -->|"builds dataset"| node_signal_lab
node_automation -->|"calibrates candidates"| node_backtest
node_automation -->|"records audit"| node_news_store
node_automation -->|"checks progress"| node_readiness
node_dashboard -->|"shows validation"| node_validation_data
node_validation_data -->|"loads prices"| node_prices
node_validation_data -->|"computes events"| node_event_study
node_validation_data -->|"classifies signals"| node_rule_validator
node_validation_data -->|"compares cohorts"| node_signal_evaluator
node_validation_data -->|"tracks outcomes"| node_forward_tracker
node_forward_tracker -->|"adjusts returns"| node_abnormal_returns
node_forward_tracker -->|"records outcomes"| node_signal_store

click node_dashboard "https://github.com/fengabing0207-oss/thesisboard/blob/main/app.py"
click node_pretrade "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/pre_trade_check.py"
click node_journal "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/journal.py"
click node_market_news "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/market_news.py"
click node_news_collector "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_collector.py"
click node_news_store "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_store.py"
click node_postgres "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/postgres_news_store.py"
click node_readiness "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/research_readiness.py"
click node_signal_lab "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_signal_lab.py"
click node_integrity "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_signal_validation.py"
click node_policy "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_signal_policy.py"
click node_backtest "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_signal_backtest.py"
click node_strategy "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/strategy_spec.py"
click node_automation "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/research_automation.py"
click node_prices "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/price_provider.py"
click node_validation_data "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/demo_validation_data.py"
click node_event_study "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/event_study.py"
click node_abnormal_returns "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/abnormal_returns.py"
click node_forward_tracker "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/forward_tracker.py"
click node_signal_store "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/signal_store.py"
click node_rule_validator "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/rule_based_validator.py"
click node_signal_evaluator "https://github.com/fengabing0207-oss/thesisboard/blob/main/src/signal_evaluator.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_dashboard,node_pretrade,node_journal,node_market_news toneBlue
class node_news_collector,node_news_store,node_postgres toneAmber
class node_signal_lab,node_integrity,node_policy,node_backtest,node_strategy,node_prices,node_validation_data,node_event_study,node_abnormal_returns,node_forward_tracker,node_signal_store,node_rule_validator,node_signal_evaluator toneMint
class node_readiness,node_automation toneRose
class node_researcher,node_anthropic toneIndigo
```

## Components

### Research dashboard

- [Streamlit pages](https://github.com/fengabing0207-oss/thesisboard/blob/main/app.py): `app.py`
- [Pre-Trade Check](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/pre_trade_check.py): `src/pre_trade_check.py`
- [Thesis journal](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/journal.py): `src/journal.py`
- [Market News](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/market_news.py): `src/market_news.py`

### News capture

- [Headline collector](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_collector.py): `src/news_collector.py`
- [News and audit store](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_store.py): `src/news_store.py`
- [PostgreSQL backend](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/postgres_news_store.py): `src/postgres_news_store.py`

### Validation and modeling

- [Signal feature lab](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_signal_lab.py): `src/news_signal_lab.py`
- [Point-in-time audits](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_signal_validation.py): `src/news_signal_validation.py`
- [Model selection policy](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_signal_policy.py): `src/news_signal_policy.py`
- [Position-book backtest](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/news_signal_backtest.py): `src/news_signal_backtest.py`
- [Locked StrategySpec](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/strategy_spec.py): `src/strategy_spec.py`
- [Price provider](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/price_provider.py): `src/price_provider.py`
- [Validation Lab data](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/demo_validation_data.py): `src/demo_validation_data.py`
- [Event study](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/event_study.py): `src/event_study.py`
- [Abnormal returns](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/abnormal_returns.py): `src/abnormal_returns.py`
- [Forward outcomes](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/forward_tracker.py): `src/forward_tracker.py`
- [Signal outcome store](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/signal_store.py): `src/signal_store.py`
- [Rule validator](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/rule_based_validator.py): `src/rule_based_validator.py`
- [Cohort evaluator](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/signal_evaluator.py): `src/signal_evaluator.py`

### Research operations

- [Collection readiness](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/research_readiness.py): `src/research_readiness.py`
- [Research cycle](https://github.com/fengabing0207-oss/thesisboard/blob/main/src/research_automation.py): `src/research_automation.py`

### Other components

- **Researcher**
- **Anthropic summary**

## Connections

- Researcher → Streamlit pages: uses (evidence: `README.md`)
- Streamlit pages → Pre-Trade Check: renders (evidence: `app.py`)
- Pre-Trade Check → Thesis journal: saves decisions (evidence: `README.md`)
- Streamlit pages → Market News: renders (evidence: `README.md`)
- Market News → Anthropic summary: optionally summarizes (evidence: `README.md`)
- Streamlit pages → Headline collector: offers capture (evidence: `README.md`)
- Headline collector → News and audit store: records captures (evidence: `scripts/collect_news.py`)
- News and audit store → PostgreSQL backend: uses backend (evidence: `src/news_store.py`)
- Streamlit pages → Collection readiness: shows readiness (evidence: `app.py`)
- Streamlit pages → Signal feature lab: shows lab (evidence: `README.md`)
- Signal feature lab → News and audit store: reads headlines
- Signal feature lab → Point-in-time audits: audits predictions (evidence: `src/news_signal_lab.py`)
- Model selection policy → Point-in-time audits: checks leakage (evidence: `src/news_signal_policy.py`)
- Position-book backtest → Model selection policy: evaluates candidates (evidence: `src/news_signal_backtest.py`)
- Position-book backtest → Locked StrategySpec: locks strategy (evidence: `src/news_signal_backtest.py`)
- Research cycle → Headline collector: collects headlines (evidence: `src/research_automation.py`)
- Research cycle → Signal feature lab: builds dataset (evidence: `src/research_automation.py`)
- Research cycle → Position-book backtest: calibrates candidates (evidence: `src/research_automation.py`)
- Research cycle → News and audit store: records audit (evidence: `src/research_automation.py`)
- Research cycle → Collection readiness: checks progress (evidence: `src/research_automation.py`)
- Streamlit pages → Validation Lab data: shows validation (evidence: `README.md`)
- Validation Lab data → Price provider: loads prices (evidence: `src/demo_validation_data.py`)
- Validation Lab data → Event study: computes events (evidence: `src/demo_validation_data.py`)
- Validation Lab data → Rule validator: classifies signals (evidence: `src/demo_validation_data.py`)
- Validation Lab data → Cohort evaluator: compares cohorts (evidence: `src/demo_validation_data.py`)
- Validation Lab data → Forward outcomes: tracks outcomes (evidence: `src/demo_validation_data.py`)
- Forward outcomes → Abnormal returns: adjusts returns (evidence: `src/forward_tracker.py`)
- Forward outcomes → Signal outcome store: records outcomes (evidence: `src/forward_tracker.py`)
