Engineering

Hermes: A Political Oracle That Bets on Polymarket Using AI News Intelligence

Political prediction markets don't move on charts — they move on information. Hermes is a Python bot that scores political markets using Grok sentiment, Perplexity probability estimation, and calibration consensus from Metaculus and Manifold. Here's how it works.

March 4, 2026
8 min read
#polymarket#prediction-markets#politics
Hermes: A Political Oracle That Bets on Polymarket Using AI News Intelligence
Share

You cannot chart a senate vote. There is no MACD on a presidential pardon. Bollinger Bands do not tighten before a ceasefire announcement. The entire technical analysis toolkit that works for crypto markets is structurally irrelevant to political prediction markets — and most people building bots for Polymarket haven't internalized that yet.

I have a crypto trading bot called Foresight that runs 24/7 on Polymarket. It uses a 9-factor scoring system built on the InDecision Framework — MACD, volume, momentum, timeframe alignment, the full technical stack. It works because crypto prices produce chartable data. You can measure momentum. You can detect divergence. You can quantify volume anomalies.

Political markets produce none of that. The price of a "Will the UK hold a general election before 2027?" contract doesn't trend on a chart. It jumps on a news headline. The edge isn't in reading the price action. The edge is in reading the information environment faster than the market reprices it.

That required a completely different bot with a completely different signal architecture. I named it Hermes.

Why the Name

Hermes — Greek messenger god, divine herald, patron of information and travelers between worlds. In mythology, Hermes carried intelligence between Olympus and the mortal realm faster than anyone else. Political markets work the same way. The edge belongs to whoever receives and interprets information first. Not the best analyst. The fastest messenger with the sharpest interpretation.

The Architecture

Hermes runs on a 5-minute scan cycle. Every cycle, it pulls active political markets from Polymarket's GAMMA API, filters for political events, scores the survivors through a 4-component signal engine, and places bets when the composite score crosses the threshold.

Signal Components
4
Grok sentiment + Perplexity probability + breaking news bonus + calibration consensus
HERMES — POLITICAL SIGNAL ENGINE
Scan → Score → Execute · 5-minute cycles · MIN_SCORE=70
MARKET SCANNER
GAMMA API · political keyword filter · volume + price gates (10¢–90¢)
GAMMA API
5-min poll
Keyword Filter
elections · geopolitics legislation · macro
Liquidity Gate
min volume 10¢–90¢ price range
SIGNAL ENGINE
composite score 0–100 · three independent intelligence feeds
GrokFeed
0–30 pts
xAI API · X/Twitter sentiment post volume + directional agreement among political commentators
NewsFeed
0–45 pts
Perplexity probability (0–30) + breaking news bonus (0–15) for stories < 6 hours old
Calibrator
0–25 pts
Metaculus + Manifold consensus compared vs Polymarket price edge delta → calibration bonus
COMPOSITE SCORE:
≥70 → EXECUTE
EXECUTION LAYER
Polymarket CLOB · FOK orders · SQLite trade log
Dedup Gate
30-min cooldown per market
Polymarket CLOB
FOK market order Polygon · ~2s confirm
TradeLogger
SQLite hermes_trades.db
X/Twitter sentiment (Grok)
News probability (Perplexity)
Calibration consensus (Metaculus/Manifold)
DRY_RUN=true by default

Three data sources. One composite score. No technical analysis anywhere in the stack.

Source 1: Grok and the X/Twitter Sentiment Layer

The first signal component queries xAI's Grok API for recent X/Twitter posts about the specific market question. Not generic political sentiment — targeted discussion about the exact event the market is pricing.

Grok returns a structured sentiment read: directional agreement among political commentators, volume of discussion, and the ratio of informed takes to noise. The scoring algorithm weights accounts with track records on similar topics higher than viral reactions from general audiences. A former intelligence analyst posting a thread about NATO policy carries more signal than a meme account with 2M followers reacting to the same headline.

Grok Feed
0-30 pts
X/Twitter sentiment — directional agreement, discussion volume, source quality

This component exists because X is where political intelligence surfaces first. Not cable news. Not press releases. Not wire services. By the time Reuters publishes, the informed discussion on X has been running for hours. Grok's access to the full X firehose makes it the fastest sentiment aggregator available for political events.

INSIGHT

Political markets don't have order books that reveal institutional positioning. The closest equivalent is the structure of informed discussion on X — who is saying what, how many people with domain expertise agree, and whether the volume is growing or fading.

Source 2: Perplexity and the News Probability Engine

The second component is a two-part signal that handles both base probability and recency.

The primary score (0-30 points) comes from Perplexity's API. Hermes sends the exact market question — "Will the US impose new sanctions on Iran before April 2026?" — and Perplexity returns a probability estimate grounded in its indexed news corpus. This isn't sentiment. It's a probability assessment from an AI that has read every relevant article, policy brief, and analyst report published in the last 72 hours.

The secondary score (0-15 points) is a breaking news bonus. If Perplexity's response references a news story published less than 6 hours ago that directly affects the market question, the bonus fires. The magnitude scales with how recently the story broke and how directly it impacts the outcome.

News Feed
0-45 pts
Perplexity probability (0-30) + breaking news bonus (0-15) for stories < 6 hours old

The breaking news bonus exists because political markets misprice recency. A ceasefire announcement at 2 AM Eastern takes hours to fully reprice across Polymarket's order book. Retail participants are asleep. Market makers adjust slowly on low-liquidity political contracts. A bot that detects the headline and cross-references it against open markets at 2:15 AM has a window that no technical indicator could ever provide.

Source 3: The Calibrator and Prediction Market Consensus

The third component is the one that makes this system structurally different from a news-reading bot with a betting API bolted on.

The Calibrator pulls community forecasts from Metaculus and Manifold Markets for the same question Polymarket is pricing. These platforms have years of track record data. Metaculus forecasters in particular are historically well-calibrated — their 70% predictions resolve at roughly 70% over thousands of questions. That calibration data is public, auditable, and statistically significant.

SIGNAL

Metaculus forecasters have been independently evaluated and shown to outperform general prediction market prices on medium-to-long-horizon political questions. When a Metaculus community forecast diverges from a Polymarket price, one of them is wrong — and the track record favors Metaculus.

The Calibrator scores the gap between the consensus forecast and Polymarket's current price. If Metaculus and Manifold both estimate 75% probability on an event that Polymarket is pricing at 58%, the calibration bonus fires hard. If all three platforms agree, the bonus is minimal — there's no edge in consensus.

Calibrator
0-25 pts
Metaculus + Manifold consensus edge vs Polymarket price — fires on divergence

This is the core thesis: Polymarket has more liquidity but worse calibration than specialized forecasting platforms. The Calibrator exploits that structural gap. Metaculus has the track record. Polymarket has the order book. Hermes sits in the middle and trades the difference.

Market Filtering: What Hermes Ignores

Not every political market gets scored. Hermes applies three gates before a market enters the signal engine.

Political keyword filter. Only markets matching political categories — elections, policy, legislation, geopolitics, diplomacy, sanctions, referenda. Crypto markets, entertainment markets, and sports markets are filtered out entirely. Foresight handles crypto. Hermes handles politics. No overlap.

Volume gate. Minimum USDC liquidity threshold. Thin markets mean wide spreads, partial fills, and slippage that eats edge. If a market doesn't have enough liquidity to execute a clean fill-or-kill order, it's not worth scoring.

Price gate: 10-90 cents. This is the rule that filters the most markets and produces the most value. A contract trading at 4 cents is pricing the event at 4% probability. Even if Hermes thinks the true probability is 12%, the absolute edge is small and the risk of total loss is high. A contract at 93 cents is pricing near-certainty — the upside is 7 cents and any surprise reversal is catastrophic. The sweet spot is the middle of the distribution where mispricings are large enough to trade and resolution uncertainty is genuine.

WARNING

Markets above 90 cents are traps. The crowd has already priced the outcome. You're paying $0.93 to win $0.07 — and if the 7% scenario hits, you lose everything. Hermes learned this lesson from Foresight's bounce trap incident and applies it structurally.

After filtering, a scored market won't be re-evaluated for 30 minutes. This prevents the bot from churning on the same market across consecutive 5-minute cycles when the information environment hasn't materially changed.

The Threshold and the Trade

A market that passes all three gates gets scored by the 4-component engine. The composite score ranges from 0 to 100. The threshold is 70.

Minimum Signal Score
70
composite threshold — below this, no trade is placed regardless of individual component strength

At 70+, Hermes places a fill-or-kill order through the Polymarket CLOB. FOK means the entire order fills at the specified price or it cancels — no partial fills, no hanging orders. The default position size is $5. Conservative by design. This is a system proving its edge before scaling, not a system swinging for the fences.

Every trade — win, loss, or skip — is logged to SQLite with the full score breakdown, the market question, the timestamp, and the resolution outcome. The database is the accountability layer. You can query it to see exactly why every trade was placed and what each component contributed to the decision.

Why This is Different From Everything Else on Polymarket

Most Polymarket bots I've seen fall into two categories: market-making bots that provide liquidity and earn the spread, and technical bots that try to apply price-action strategies to binary contracts. The market makers are legitimate businesses. The TA bots are applying the wrong model to the wrong domain.

Political events don't trend. They jump. A policy announcement doesn't build momentum over 14 candles — it reprices the market in one block. The entire concept of momentum, mean reversion, and support/resistance assumes continuous price discovery. Political markets have discontinuous price discovery driven by external information shocks.

Hermes is built around the information shock model. It doesn't care what the price did yesterday. It cares what Grok is seeing on X right now, what Perplexity estimates given today's news corpus, and whether Metaculus forecasters agree with the market's current price. Every component is measuring the information environment, not the price environment.

That's the structural difference. Tesseract Intelligence as a concept is about seeing the competitive landscape from every angle simultaneously. Hermes applies that principle to political markets — triangulating between social sentiment, news probability, and calibration consensus to find the edges that single-source analysis misses.

What's Next

Hermes runs in dry-run mode by default. Every signal is scored, every trade is logged, but no capital is deployed until the operator explicitly enables live mode. The test suite covers 133 scenarios at 95% coverage. The signal engine has been validated against historical political market resolutions to confirm that 70+ scores correlate with correct directional calls at a rate that justifies the position sizing.

The system is live. The scanner runs every 5 minutes. The signal engine scores what the filter passes. The trade logger captures everything. The edge — if it holds — is structural: faster information aggregation from higher-quality sources than the median Polymarket participant.

Political markets are won by messengers, not analysts. Hermes is the messenger.

Explore the Invictus Labs Ecosystem

// Join the Network

Follow the Signal

If this was useful, follow along. Daily intelligence across AI, crypto, and strategy — before the mainstream catches on.

No spam. Unsubscribe anytime.

Share
// More SignalsAll Posts →