sstklen/trump-code
🔐 AI decoding Trump's posts × stock market | AI 解碼川普推文 × 美股 | AIでトランプ投稿×株式市場を解読 — 31.5M models, 61.3% hit rate, open source
What it solves
Trump Code is designed to identify statistically significant patterns between Donald Trump's social media posts (primarily on Truth Social and X) and the movements of the US stock market (S&P 500). It aims to move beyond gut feeling and opinion by using brute-force computation to find rules that can predict market direction based on posting behavior.
How it works
The system uses a closed-loop pipeline that detects posts every 5 minutes and processes them through a "Three Brains" architecture:
- Opus: Performs deep causal analysis.
- Evolver: Breeds new rules from existing successful ones using crossover and mutation.
- Circuit Breaker: Monitors system health and pauses operations if performance degrades.
It has tested over 31.5 million model combinations to find "surviving rules" (currently 551) that pass train/test validation. The system also integrates real-time data from prediction markets like Polymarket and Kalshi to cross-reference signals.
Who it’s for
Financial researchers, data scientists, and traders interested in the intersection of social media sentiment analysis and market volatility, specifically regarding the impact of presidential communications.
Highlights
- High Hit Rate: Reports a 61.3% hit rate across 566 verified predictions.
- Dual-Platform Intelligence: Analyzes the time gap and content differences between Truth Social and X to find arbitrage windows.
- Brute-Force Engine: Uses a PyTorch GPU-accelerated engine to test millions of rule combinations rapidly.
- Open Data: Provides 100% open access to archives of posts, prediction logs, and surviving rules.
- Comprehensive Tooling: Includes a live dashboard, a CLI, an API, and an MCP server for integration with AI agents like Claude Code or Cursor.
Related
- Project
- Project
- Project
- Project
- Project