trump-code-market-signals
trump-code-market-signals — an installable skill for AI agents.
By reason-machines · 1,284 installs
npx skills add reason-machines/trending-skills --skill trump-code-market-signals
Source repository · Upstream listing
Trump Code — Market Signal Analysis
Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
Trump Code is an open source system that applies brute force computation to find statistically significant patterns between Trump's Truth Social/X posting behavior and S&P 500 movements. It has tested 31.5M model combinations, maintains 551 surviving rules, and has a verified 61.3% hit rate across 566 predictions (z=5.39, p<0.05).
Installation
Environment Variables
CLI — Key Commands
Core Scripts
REST API (Live at trumpcode.washinmura.jp)
AI Chatbot API
MCP Server (Claude Code / Cursor Integration)
Add to ~/.claude/settings.json :
Available MCP tools: signals , models , predict , arbitrage , health , events , dual platform , crowd , full report
Open Data Files
All data lives in data/ and is updated daily:
Download Data via API
Real Code Examples
Parse Today's Signals
Find Top Performing Rules from Surviving Rules
Check Prediction Market Opportunities
Correlate Post Features with Returns
Run a Backtest on a Custom Signal
Key Signal Types
Signal Description Typical Impact
RELIEF pre market "Relief" language before 9:30 AM Avg +1.12% same day
TARIFF market hours Tariff mention during trading Avg 0.758% next day
DEAL Deal/agreement language 52.2% hit rate
CHINA (Truth Social only) China mentions (never on X) 1.5× weight boost
SILENCE Zero post day 80% bullish, avg +0.409%
Burst → silence Rapid posting then goes quiet 65.3% LONG signal
Model Reference
Model Strategy Hit Rate Avg Return
A3 Pre market RELIEF → surge 72.7% +1.206%
D3 Volume spike → panic bottom 70.2% +0.306%
D2 Signature switch → formal statement 70.0% +0.472%
C1 Burst → long silence → LONG 65.3% +0.145%
C3 ⚠️ Late night tariff (anti indicator) 37.5% −0.414%
Note: C3 is an anti indicator — if it fires, the circuit breaker auto inverts it to LONG (62% accuracy after inversion).
System Architecture Flow
Troubleshooting
realtime loop.py not detecting new posts
Check your network access to Truth Social scraper endpoints
Verify data/trump posts all.json timestamp is recent
Run python3 trump code cli.py health to see circuit breaker state
chatbot server.py fails to start
Ensure GEMINI KEYS env var is set: export GEMINI KEYS="key1,key2"
Port 8888 may be in use: lsof i :8888
overnight search.py runs out of memory
Runs ~31.5M combinations — needs ~4GB RAM
Run on a machine with 8GB+ or reduce search space in script config
Hit rate dropping below 55%
Check data/circuit breaker state.json — system may have auto paused
Review data/learning report.json for demoted rules
Re run overnight search.py to refresh surviving rules
Stale data in data/ directory
Daily pipeline syncs to GitHub automatically if running
Manually trigger: python3 trump code cli.py report to force refresh
Or pull latest from remote: git pull origin main