| Market | Theater | Side | Entry | Now | P&L | Cost | TP / SL | Held |
|---|---|---|---|---|---|---|---|---|
| No open positions | ||||||||
| Market | Theater | Claude ¢ | Market ¢ (live) | Spread | Edge ↓ | Δ Cycle |
|---|---|---|---|---|---|---|
| No assessment data yet - waiting for next signal cycle | ||||||
| Market | Side | Price | P&L | Hold | Status | Conf |
|---|---|---|---|---|---|---|
| No trade activity yet | ||||||
| Market | Theater | Side | Entry | Now | P&L | Cost | TP / SL | Held |
|---|---|---|---|---|---|---|---|---|
| No open positions | ||||||||
| Market | Theater | Claude ¢ | Market ¢ (live) | Spread | Edge ↓ | Δ Cycle |
|---|---|---|---|---|---|---|
| No assessment data yet - waiting for next signal cycle | ||||||
| Market | Side | Price | P&L | Hold | Status | Conf |
|---|---|---|---|---|---|---|
| No trade activity yet | ||||||
| Market | Alignment | YES / NO Flow | Volume | Trades | Biggest | Momentum |
|---|---|---|---|---|---|---|
| Loading… | ||||||
All geo markets currently assessed by Claude — live probability estimate vs market price, sorted by absolute edge. Updates with each signal cycle.
Probability accuracy, edge capture, P&L attribution, and threshold sensitivity
How TrenchSignals works - architecture, data sources, intelligence layers, and risk controls
An autonomous prediction market trading bot that monitors global geopolitical news in real time across four conflict theaters — Iran/Middle East, Ukraine, Taiwan, and North Korea — uses Claude (Anthropic) to assess multi-theater escalation probabilities, and places trades on Kalshi when it finds a meaningful edge between its own estimate and the current market price. Runs 24/7 on a cloud VPS as a managed service.
edge = Claude's estimate − market mid. Per-theater escalation probabilities are used as fallbacks for theater-specific markets, preventing signal bleed across theaters. A trade is only considered when the edge clears a meaningful threshold that adjusts dynamically with market volatility.| Source | Type | Notes |
|---|---|---|
| 70 RSS feeds | Western wire, Israeli official, Iranian state, Iranian opposition, OSINT, Gulf/Arab (Al Arabiya, Arab News, Naharnet), Turkish (TRT, Anadolu Agency), Chinese state (Xinhua, Global Times), nuclear specialist (Arms Control Assoc, Bulletin of Atomic Scientists, FAS, 38 North), IAEA direct, EU diplomatic, think tanks (CSIS, CFR, Brookings), US government, Google News topic feeds | Polled every tick, 10-worker parallel fetch |
| Telegram channels (28) | Real-time OSINT — Iran-focused, military/weapons ID, Gaza Now, Flash Point ME, Aurora Intel (AIS/NOTAM/satellite), Nuclear Iran, The Cradle, Calibre Obscura, Ukraine Weapons Tracker, N12 Israel | Direct Telethon stream when credentials present; rsshub RSS polling as fallback |
| Twitter / X | 25+ curated handles across source types — smart money traders auto-added from Polymarket leaderboard | Polled every tick |
| NewsAPI | Supplementary headline coverage | Optional; RSS is primary |
| Source | What we get | Frequency |
|---|---|---|
| Kalshi | Tracked conflict markets — mid prices, bid/ask, open interest, full 24h trade history | Every 30 min |
| Polymarket Data API | Conflict markets — prices, lifetime volume, top trader positions and large trades | Every 30 min |
| Yahoo Finance | 11 instruments: Israeli Shekel/USD (ILS — real-time war premium indicator), Tel Aviv 35 index, Brent crude, WTI crude (Brent-WTI spread = ME-specific risk), Gold, VIX, USD Index, Defense ETFs (ITA + XAR), Uranium ETF (nuclear deal proxy), Nat Gas | Every 15 min (cached) |
| Manifold Markets | Open Iran/Israel prediction market questions with community probability estimates — superforecaster consensus used to calibrate Claude's priors | Every 30 min (cached) |
| USGS Seismic Feed | Earthquake events in Iran bounding box — flags shallow (<10 km) moderate-magnitude events near Natanz, Fordow, Parchin, Bushehr as potential nuclear test signatures | Every 15 min (cached) |
Each layer addresses a different weakness in relying solely on Claude's raw self-report.
| Layer | Name | What it solves |
|---|---|---|
| 0 | Raw | Claude's direct 0–1 estimate |
| 1 | EWMA Smooth | Single-cycle noise and outlier spikes — α=0.25, ~30 min half-life |
| 2 | Composite | Circular self-referencing — deterministic weighted formula across all four theaters, with a multi-theater activity bonus up to 1.25× |
| 3 | Market-Implied | Missing external anchor — mean Kalshi mid price per theater, globally weighted |
| 4 | Persistent Decay | Gaps between signal cycles — probability decays toward a neutral mean between polls, persists across restarts |
All five layers are visible on the escalation chart. The persistent decay value is shown as a horizontal reference line reflecting the live state between signal cycles.
Size scales with conviction — a tiered multiplier links confidence to allocation, and Claude provides an additional sizing recommendation on top. A direction-skew penalty reduces size when the portfolio is already concentrated one way. Default take-profit is +20¢ price move from entry; stop-loss is −10¢. Both thresholds are dynamic — Claude can adjust them at each review based on how the thesis has evolved. A secondary 50% return floor also triggers an exit when a position's return on entry cost exceeds 50%, catching cheap contracts (e.g. 9¢ entry) that can never reach the absolute 20¢ delta but are clearly winners. Settled markets (resolved to 0% or 100%) are handled automatically — the bot records the published result price and closes the position without attempting to place a sell order on a closed book.
Mean price movement across all tracked markets is monitored continuously. During calm periods the edge threshold relaxes slightly; during crises it tightens - making it naturally harder to enter during the noisiest environments.
Consecutive SKIP signals trigger a warning flag - indicating either a data source issue or a genuinely quiet news cycle with no actionable edge.
The signal pipeline runs continuously and records every market evaluation to SQLite so the Calibration tab can score predictions against ground truth once markets settle.
| File | Role |
|---|---|
| apps/run_bot.py | Entry point — initialises all components and launches strategy tasks |
| strategies/geopolitical.py | Core strategy loop — tick logic, trade execution, dynamic position management, settlement handling |
| src/signal_analyzer.py | Claude API wrapper — constructs prompts with all intelligence layers, parses structured responses, produces trade signals; includes source velocity detection |
| src/kalshi_client.py | Kalshi REST API client — orders, positions, market discovery, balance; conflict market filtering with ticker denylist |
| src/kalshi_flow_tracker.py | Order flow aggregator — taker-side volumes, large trades, momentum, net escalation flow |
| src/volume_spike_detector.py | Volume spike detector — flags markets with ≥3× normal hourly volume as potential breaking-event indicators |
| src/whale_tracker.py | Smart-money tracker — top trader positions, net escalation bias, and per-market divergence scoring (split whales = uncertainty signal) |
| src/market_indicators.py | Financial market indicators — 11 instruments (ILS shekel, TA35, Brent, WTI, Gold, VIX, ITA, XAR, URA uranium, Nat Gas, USD Index) from Yahoo Finance; 15-min cache; Brent-WTI spread + ILS leading indicator logic |
| src/event_calendar.py | Scheduled event calendar — IAEA board sessions, UNSC votes, Iran nuclear talks, DPRK dates, NATO summits; upcoming events injected as calibration context |
| src/metaculus_client.py | Superforecaster consensus — Manifold Markets open Iran/Israel questions; 30-min cache; community probability estimates injected for Claude to compare against its own assessments |
| src/seismic_monitor.py | USGS seismic monitor — Iran bounding box; shallow/moderate events near Natanz, Fordow, Parchin, Bushehr flagged as nuclear-test candidates; 15-min cache |
| src/telegram_stream.py | Telegram OSINT stream — direct Telethon connection to 28 OSINT channels when credentials present; rsshub RSS polling as parallel fallback |
| src/news_monitor.py | RSS + NewsAPI poller — 70 RSS feeds + 28 Telegram channels across 13 source types; parallel 10-worker fetch; includes Al Arabiya, Anadolu Agency, Xinhua, IAEA direct, Arms Control Assoc, Bulletin of Atomic Scientists, CSIS, CFR, Brookings |
| src/twitter_monitor.py | Twitter/X client — keyword and handle-based monitoring; SourceType enum for all 14 source categories |
| src/market_mapper.py | Market discovery — finds and scores conflict-relevant Polymarket markets by relevance |
| src/shadow_logger.py | Calibration data capture — logs every market evaluation (signal, confidence, side, entry price) to SQLite for post-hoc analysis; runs alongside the strategy on every tick regardless of whether a trade is placed |
| web/api.py | FastAPI dashboard backend — positions, trades, signals, market assessments, calibration report; EWMA smoothing, composite formula, market-implied baseline, and persistent decay computed here. Supports dual-instance deployment (port 8000 and port 8001) via env vars. 10-second response cache. |
| scripts/calibrate.py | Calibration report generator — computes Brier score, P&L attribution by theater/direction/exit type, confidence bucket accuracy, and threshold sensitivity from shadow_log.sqlite; writes calibration.json for the dashboard Calibration tab |
| scripts/sync_resolutions.py | Resolution syncer — polls Kalshi daily for settled market outcomes, fills the resolutions table in shadow_log.sqlite so calibrate.py can score predictions against ground truth |
TrenchSignals reads geopolitical news around the clock, scores escalation probability with Claude AI, and autonomously manages positions on Kalshi prediction markets — no manual intervention required.
150+ live sources — RSS feeds, Telegram OSINT channels, Twitter/X, and official statements — are ingested every cycle and ranked by credibility before anything reaches Claude.
Claude reads across sources with opposing biases and produces a calibrated escalation probability, cross-checked against smart money positioning and live Kalshi prices.
One trade is selected per cycle — the highest-edge candidate that passes all risk filters. Every signal is logged with full reasoning.
A position is entered and monitored every 30 seconds. Claude reviews every exit trigger and adjusts thresholds as the news evolves — not on a fixed timer.
RSS feeds, Telegram OSINT channels, curated Twitter/X handles, and official government statements — all weighted by source bias so Claude reasons across adversarial signals.
Iranian state media, Western wire services, and independent OSINT are read in the same pass. A calibrated read, not a reaction to whichever headline is loudest.
Top Polymarket traders are tracked by position. When they're on the other side of a signal, confidence is penalized accordingly.
Open positions are checked every 30 seconds. Claude exits, holds, or adjusts thresholds based on the latest news — not a clock.
Every signal and trade is logged with Claude's full reasoning. Nothing is a black box.
Every market call is scored against the outcome. Brier scores and P&L attribution feed back into signal quality over time.
We're onboarding a limited number of traders. Join the waitlist and we'll reach out when a spot opens up.