← all repositories
sstklen/trump-code

Brute-forcing 31.5M models to trade on Trump's tweets

A Python system that treats presidential social media as a cryptanalysis problem, evolved 551 surviving trading rules from brute-force search.

795 stars Python Domain AppsLanguage Models
trump-code
Not currently ranked — collecting fresh signals.
star history

What it does

The project scrapes Trump’s Truth Social and X posts, extracts 384 features, and tests model combinations against S&P 500 movements. It runs a daily closed loop: predict, verify, promote or demote rules, then evolve new ones via crossover and mutation. Output goes to a live dashboard, CLI, API, chatbot, and MCP server.

The interesting bit

The brute-force angle is unusually literal: 31.5 million model combinations tested, 551 survivors. The README claims a 61.3% hit rate across 566 verified predictions (z=5.39, p<0.05). More curiously, it treats platform choice as signal: Truth Social allegedly publishes 6.2 hours before X, and China-related posts appear only on Truth Social (203 posts vs. 0 on X), creating a claimed arbitrage window.

Key highlights

  • Three-brained architecture: Claude Opus for causal analysis, an evolutionary engine for breeding rules, and a circuit breaker that halts the system if performance degrades
  • Dual-platform intelligence: weights Truth Social higher than X, with specific rules for cross-platform timing gaps
  • Polymarket integration: tracks 316+ active Trump prediction markets alongside stock signals
  • Fully open data: 44,000+ posts, 566 verified predictions, 551 rules, and 384 features × 414 trading days published daily as JSON
  • 11 named strategy models ranked by live performance, from “Pre-market RELIEF” (72.7% hit rate) to “Late-night tariff” (37.5%, auto-inverted)

Caveats

  • The 61.3% hit rate and statistical significance claims are self-reported from the project’s own predictions_log.json; no third-party audit or pre-registration is mentioned
  • Several “discoveries” read as post-hoc pattern fitting (e.g., “Silence = 80% bullish” from zero-post days), and the README does not clarify how much the 551 rules overlap or compete
  • The “6.2 hour” Truth Social-to-X lag is based on 38/39 matched posts—a small sample, and the README does not explain matching methodology

Verdict

Worth a look if you’re interested in alternative data pipelines, evolutionary model selection, or the mechanics of prediction-market arbitrage. Treat the hit-rate claims as exploratory, not validated. If you find political signal trading distasteful, the codebase still offers a complete example of brute-force rule mining with open data.

Frequently asked

What is sstklen/trump-code?
A Python system that treats presidential social media as a cryptanalysis problem, evolved 551 surviving trading rules from brute-force search.
Is trump-code open source?
Yes — sstklen/trump-code is open source, released under the MIT license.
What language is trump-code written in?
sstklen/trump-code is primarily written in Python.
How popular is trump-code?
sstklen/trump-code has 795 stars on GitHub.
Where can I find trump-code?
sstklen/trump-code is on GitHub at https://github.com/sstklen/trump-code.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.