Congressional Trade Signals

Congressional Trade Signals

Enables querying of U.S. congressional stock trade data, including price history, recent trades, buy signals, stock activity, and politician activity, through natural language tools.

Category
访问服务器

README

Congressional Trade Signals

Do U.S. congressional stock trades beat the market — and can a retail investor act on them?

An end-to-end, auditable research pipeline that collects public STOCK Act disclosures, market-adjusts every trade against the S&P 500, detects multi-politician cluster buys, and scores them into STRONG / WATCH / SKIP signals — exposed both as a research dataset and as a live MCP server.

Research project extending Ziobrowski et al. (2004, 2011) into the post-STOCK Act era. Built as a Fellow at Humanitarians AI under the Mycroft verified-intelligence framework. Research only — not financial advice. No trades are placed.


The headline finding

In aggregate, congressional BUY trades beat the market by only +0.24% after per-trade SPY adjustment — most members simply ride market beta. The real signal is concentrated in cluster buys: when 2+ politicians independently buy the same ticker within 30 days, especially in semiconductors and AI infrastructure under active legislative oversight, those clusters show +17% to +68% alpha above SPY.

The value of the system is the skip rate — it filters out ~95% of trades as noise.


Architecture

 INGEST            GIGO (validate)             TOOL (analyze, read verified only)
┌─────────┐   ┌──────────────────────┐   ┌─────────────────────────────────────┐
│scraper  │ → │enricher              │ → │cluster_analyzer → langgraph_pipeline │
│(Selenium│   │(yfinance prices)     │   │(cluster detect)  (5-node multi-agent)│
│Capitol  │   │market_adjusted       │   │                                      │
│Trades)  │   │(SPY per-trade alpha) │   │           server.py (MCP, 5 tools)   │
└─────────┘   └──────────────────────┘   └─────────────────────────────────────┘
 data/raw/  ───────────────────────────→  data/verified/  ──→  logs/ + reports/

The LangGraph multi-agent pipeline (langgraph_pipeline.py)

conformance ──(fail)──→ END          hard data gate: never analyze garbage
     │
     ↓
 cluster ──→ scorer ──(0 STRONG)──→ report      skip the LLM when nothing to explain
                 │
              (STRONG>0)
                 ↓
            research (Claude) ──→ report         LLM thesis note per strong signal

Shared typed state with an append-only run-log reducer — every number in the final report traces back through the graph to its source filing (provenance).


Quick start

pip install -r requirements.txt

python scraper.py              # 1. INGEST  — scrape Capitol Trades → data/raw/trades.csv
python enricher.py             # 2. GIGO    — add yfinance prices (resumable, checkpointed)
python market_adjusted.py      # 3. GIGO    — per-trade SPY-matched alpha
python cluster_analyzer.py     # 4. TOOL    — detect clusters + politician sector profiles
python langgraph_pipeline.py --no-llm   # 5. TOOL — score signals, write log + report

Open dashboard.html in any browser for the interactive research dashboard.

As an MCP server (Claude Desktop)

server.py exposes 5 natural-language tools: get_price_history, get_recent_trades, get_buy_signals, get_stock_activity, get_politician_activity.


Methodology highlights

  • Per-trade market adjustment — each trade's return has SPY's return over the identical 30-day window subtracted. Stricter than the aggregate benchmarking in prior literature.
  • Returns measured from disclosure date, not transaction date — the moment a retail investor could realistically have known. No look-ahead.
  • Cluster = temporal co-occurrence, not ML clustering: 2+ distinct politicians buying the same ticker in a 30-day sliding window.
  • Two-factor score = cluster size × max buy-conviction ratio (BCR), validated against out-of-sample market-adjusted alpha.

Repo layout

Path What
scraper.py Selenium scraper for Capitol Trades (checkpoint/resume)
enricher.py yfinance price enrichment (incremental, resumable)
market_adjusted.py per-trade SPY alpha
cluster_analyzer.py cluster detection + politician sector profiles
langgraph_pipeline.py 5-node LangGraph multi-agent signal pipeline
server.py FastMCP server (5 tools)
dashboard.html interactive research dashboard (Chart.js)
PAPER_DRAFT.md working paper
recipes/, DATA_CONTRACT.md, logs/RUN_LOG.md Mycroft framework compliance

Author

Ameya Deshmukh@Ameya-Deshmukh26 deshmukh.amey@northeastern.edu · Northeastern University

License

MIT — see LICENSE.

Data sourced from public STOCK Act disclosures via Capitol Trades and price data via Yahoo Finance. This project is for research and educational purposes only and does not constitute financial advice.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选