Polytraders Dev Guide
internal
v3 spine Phase 1 · Shared contracts 9 demo-wired · 0 shadow-ready · 0 production-live · 100 pending · 109 total 15/33 infra tasks the plan status board

Plan › Intelligence layer · Politics decision-making

Politics decision-making — what tells the system to buy or sell

Polymarket politics markets (candidate-win, indictment-by-date, bill-passes, candidate-drops-out) have a quiet structural advantage: established external models already publish probabilities, and Kalshi often lists the exact same question at a different price. This page shows the bots we already have, the new valuator bots we’re adding, and the flow that turns them into a buy/sell decision.

← Crypto decision-making M2 alignment All layers Signal.json

01 · how it fits together

Politics decision flow

External forecast models, polls, court dockets, and legislative trackers feed existing sensors. Existing sensors fan into the new politics valuators. Valuators converge on the shared combiners (fairvalueengine → edgeranker → disagreementscorer). The combined Signal goes to Strategy, then Risk, then Execution. Every action emits an AuditEnvelope with the canonical builderCode.

External feeds Existing sensors New valuators (politics) Shared combiners Decision 538 / Silver Bulletin Economist / DDHQ Kalshi API Manifold / Metaculus FEC / Congress.gov PACER / court dockets RCP / pollster releases News terminals newsingest socialsentiment crossmarketgraph contradictiondetector marketontologybuilder resolutionruleparser sourceoftruthverifier orderflowanalyzer election_model_aggregator poll_aggregator kalshi_polymarket_spread question_matcher legal_procedural_tracker legislative_tracker candidate_dropout_predictor political_regime_detector political_catalyst_calendar fairvalueengine edgeranker disagreementscorer Strategy Risk Execution CLOB V2 every action emits AuditEnvelope with reason code + builderCode
existing sensor new valuator shared combiner decision pipeline

02 · sensors we already specced

Existing politics-relevant bots (8)

These are already specified at docs-complete and feed the new valuators below. They are the ground truth layer — they do not decide anything by themselves.

intel.newsingest

Existing

Ingests, deduplicates, and tags news from a configurable list of sources. Outputs structured headline events.

I/O   in: news feeds · out: headline events

intel.socialsentiment

Existing

Aggregates social platform sentiment for tracked entities (candidates, parties, topics). Outputs sentiment time-series.

I/O   in: social platforms · out: sentiment features

intel.crossmarketgraph

Existing

Maintains a graph of related Polymarket markets and computes consistency constraints (sum-to-one, partition, hierarchical).

I/O   in: markets + outcomes · out: relational graph + violation events

intel.contradictiondetector

Existing

Detects logical contradictions across related markets (e.g. P(A) + P(¬A) ≠ 1).

I/O   in: cross-market graph + prices · out: contradiction events

intel.marketontologybuilder

Existing

Builds a typed ontology over markets: vertical, entity, predicate, resolution kind.

I/O   in: market metadata · out: typed market records

intel.resolutionruleparser

Existing

Parses resolution rules into a structured object. Shared with crypto.

I/O   in: market metadata · out: parsed resolution rule

intel.sourceoftruthverifier

Existing

Verifies that the source of truth named in a market’s rules is accessible, parseable, and on the trusted allowlist.

I/O   in: parsed rule · out: verification status

intel.orderflowanalyzer

Existing

Same as crypto: book + flow features. Shared.

I/O   in: Polymarket book + fills · out: flow features

03 · new bots to build

New politics valuator bots (9)

Each new bot turns sensor output and external feeds into a Signal with a real fair-value or expected-edge number. They write to the locked Signal schema; nothing about the execution path changes.

intel.election_model_aggregator

New

Core valuator for candidate-win markets. Weighted Bayesian ensemble across 538, Silver Bulletin, Economist, DDHQ, Nate Silver, Manifold, Metaculus, plus Kalshi as a market signal. Weights derived from historical accuracy.

I/O   in: external forecast models · out: Signal{score_type='fair_value', source_weights, credible_interval}

intel.poll_aggregator

New

Pollster-rated, house-effects-adjusted polling average. Outputs daily candidate-by-candidate estimates with trend and standard error.

I/O   in: pollster releases + 538 ratings · out: Signal{score_type='custom', candidate_shares, trend_7d, trend_30d}

intel.kalshi_polymarket_spread

New

Same-question cross-venue arbitrage detector. Detects price spreads between Kalshi and Polymarket on questions matched by question_matcher and reports tradeable edge after fees.

I/O   in: Kalshi book + Polymarket book + matched questions · out: Signal{score_type='expected_edge', spread, time-to-convergence}

intel.question_matcher

New

Entity-resolves political questions across Polymarket, Kalshi, Manifold, Metaculus. Uses LLM with structured rule-checks. Required infrastructure for kalshi_polymarket_spread to be safe.

I/O   in: question texts + resolution rules · out: Signal{score_type='custom', matched_questions, confidence}

intel.legal_procedural_tracker

New

For indictment / case / ruling markets. Parses PACER federal docket and state court RSS for trigger events; maintains per-case state machines with base rates.

I/O   in: court dockets + news terminals · out: Signal{score_type='custom', case_state, next_event_estimate}

intel.legislative_tracker

New

For “bill passes by date Y” markets. Maps each bill through its gate machine (introduced → committee → floor → passed → signed) and estimates probability at each gate using historical base rates conditional on whip count.

I/O   in: Congress.gov + GovTrack + whip reports · out: Signal{score_type='fair_value', current_gate, gates_remaining}

intel.candidate_dropout_predictor

New

For “candidate X drops out by Y” markets. Logistic model where cash-on-hand vs burn rate is the dominant predictor, conditioned on polling position and news tone.

I/O   in: FEC filings + poll trend + news tone · out: Signal{score_type='fair_value', key_drivers}

intel.political_regime_detector

New

Classifies the current political regime: quiet / primary_season / debate_window / gaffe_active / scandal_breaking / election_eve / post_election_count. Strategy and Risk read this.

I/O   in: news velocity + headline polarity + market vol-of-vol · out: Signal{score_type='custom', regime}

intel.political_catalyst_calendar

New

Calendar of political catalysts: debates, primaries, FEC reporting deadlines, court hearing dates, conventions, election day.

I/O   in: official calendars + court docket · out: Signal{score_type='custom', next_catalyst_at, severity}

04 · cross-vertical infrastructure

Shared combiners (3, used by both crypto and politics)

Built once. Consumed by every vertical. Same contract: Signal in, Signal out, audited every step.

intel.fairvalueengine

Shared

Generic combiner that takes vertical-specific valuator Signals and emits the final fair-value Signal. Records source weights and a decomposition so the audit trail shows which inputs drove the number.

I/O   in: all fair_value Signals · out: Signal{score_type='fair_value', decomposition}

intel.edgeranker

Shared

Generic. Takes a fair_value Signal plus current book, fees, slippage estimate, and time-to-resolution; outputs an expected-edge Signal. Below a configurable threshold, no trade.

I/O   in: fair_value + book + fees · out: Signal{score_type='expected_edge', breakdown}

intel.disagreementscorer

Shared

Generic. Quantifies how much valuators disagree on the same market. High disagreement → reduce size; very high → Risk hard-block.

I/O   in: all fair_value Signals · out: Signal{score_type='confidence'}

Status. All 9 new bots are at described, not specced. We have the role and the I/O contract; we have not invented parameters, thresholds, acceptance tests, or runbooks. That work happens when you say go.
Ready to build — give the word.

On approval, each bot gets a full spec (the same 27-field shape every other bot has), a fixture pack, and an entry in the build order. Until then, this page is the contract.

awaiting go