Credential Fixture Review
python scripts/_api_config.py is review material for the 48h Geopolitics Cluster Trader skill. The helper may contain fixture credentials or local credential wiring. Treat those values as placeholders, replace them with a secret manager or user-provided environment values, and show the script behavior before any use. Do not contact external services with embedded sample credentials.
48h Geopolitics Cluster Trader
This is a template.
The default signal is geopolitical cluster consistency checking — remix it with additional constraint types, news sentiment, or satellite data feeds.
The skill handles all the plumbing (market discovery, cluster grouping, trade execution, safeguards). Your agent provides the alpha.
Strategy Overview
Polymarket lists many geopolitical markets that form logical clusters:
- Strike-count markets: "Will Israel strike 5 countries?", "...6 countries?", "...7 countries?"
- Daily military action: "Will Israel take military action in Gaza on March 21?", "...in Lebanon on March 20?"
- Bilateral escalation: "Will Iran conduct military action against Israel?"
- Ceasefire markets: "Will there be a ceasefire in Gaza?"
These markets are logically constrained. Striking 7 countries requires striking 6 first, so P(7) <= P(6) always. Escalation in one region affects others. When retail trades these markets in isolation, the constraints break — and that is the edge.
The Edge: Logical Consistency Arbitrage
Three Violation Types
Monotonicity violations (strike-count markets):
- P(strike 7) must be <= P(strike 6) <= P(strike 5)
- If P(strike 7) = 8% but P(strike 6) = 5%, the 7-market is overpriced or the 6-market is underpriced
Correlation violations (daily military action):
- If Israel has 100% probability of action in Gaza on a given date, correlated regions (Lebanon, Syria) should reflect heightened risk
- A very low probability in a correlated region on the same date may be underpriced
Prerequisite chain violations:
- If P(Iran military action against Israel) = 8%, then P(Israel strikes 6+ countries) — which likely requires Iranian theater escalation — should not be much higher
- The downstream event cannot greatly exceed its prerequisite
Example
| Market |
Probability |
| Israel strike 5 countries |
20% |
| Israel strike 6 countries |
15.9% |
| Israel strike 7 countries |
18% |
Violation: P(strike 7) = 18% > P(strike 6) = 15.9%. The 7-market is overpriced. Trade: sell NO on the 7-market (or buy YES on the 6-market).
Why This Works
- Retail trades in silos — users view each market independently without cross-referencing logically related markets
- Logical constraints are structural — cumulative events, prerequisite chains, and correlation are mathematical facts, not opinions
- Resolution forces convergence — as resolution approaches, the market must price consistently or create guaranteed arbitrage
- Low-liquidity geopolitical markets — these niche markets have less market-maker coverage, so mispricings persist longer
Signal Logic
- Discover geopolitical markets via keyword search (Israel, military, strike, Iran, Gaza, Lebanon, war, ceasefire)
- Parse each question: extract event type, region, actor, threshold, date
- Group into clusters (strike-count, daily-action, bilateral, ceasefire)
- Check consistency constraints:
- Strike counts: monotonically decreasing probabilities
- Daily action: cross-region correlation on same date
- Prerequisites: downstream events bounded by upstream probability
- Rank violations by magnitude
- Trade only opportunities that pass threshold gates (
YES_THRESHOLD / NO_THRESHOLD)
- Size by conviction (violation magnitude + threshold distance), not flat amount
Safety & Execution Mode
The skill defaults to paper trading (venue="sim"). Real trades only with --live flag.
| Scenario |
Mode |
Financial risk |
python trader.py |
Paper (sim) |
None |
| Cron / automaton |
Paper (sim) |
None |
python trader.py --live |
Live (polymarket) |
Real USDC |
autostart: false and cron: null mean nothing runs automatically until configured in Simmer UI.
Required Credentials
| Variable |
Required |
Notes |
SIMMER_API_KEY |
Yes |
Trading authority. Treat as a high-value credential. |
Tunables (Risk Parameters)
All declared as tunables in clawhub.json and adjustable from the Simmer UI.
| Variable |
Default |
Purpose |
SIMMER_MAX_POSITION |
35 |
Max USDC per trade at full conviction |
SIMMER_MIN_TRADE |
5 |
Floor for any trade |
SIMMER_MIN_VOLUME |
5000 |
Min market volume filter (USD) |
SIMMER_MAX_SPREAD |
0.08 |
Max bid-ask spread |
SIMMER_MIN_DAYS |
0 |
Min days until resolution (0 = allow same-day) |
SIMMER_MAX_POSITIONS |
8 |
Max concurrent open positions |
SIMMER_YES_THRESHOLD |
0.38 |
Buy YES only if market probability <= this |
SIMMER_NO_THRESHOLD |
0.62 |
Sell NO only if market probability >= this |
SIMMER_MIN_VIOLATION |
0.04 |
Min cluster consistency violation to trigger a trade |
Edge Thesis
Geopolitical events are not independent coin flips. They form causal chains: escalation in one theater raises risk in adjacent theaters; striking N countries is a prerequisite for striking N+1. Prediction markets price each event individually, but the joint probability distribution must be internally consistent.
When it is not, the inconsistency is a free edge. This skill systematically detects and trades these logical violations, acting as an automated consistency enforcer for geopolitical prediction markets.
Dependency
simmer-sdk by Simmer Markets (SpartanLabsXyz)
1---2name: polymarket-48h-geopolitics-cluster-trader-23description: Trades logical inconsistencies in geopolitical event clusters on Polymarket. Geopolitical markets form clusters where probabilities must satisfy constraints — strike-count markets are cumulative (P(7) <= P(6)), daily military action across regions should correlate, and prerequisite events constrain downstream markets. When these constraints are violated, the mispriced market reverts. This skill detects violations and trades the correction, sizing by conviction.4---56789### Credential Fixture Review1011`python scripts/_api_config.py` is review material for the `48h Geopolitics Cluster Trader` skill. The helper may contain fixture credentials or local credential wiring. Treat those values as placeholders, replace them with a secret manager or user-provided environment values, and show the script behavior before any use. Do not contact external services with embedded sample credentials.1213# 48h Geopolitics Cluster Trader1415> **This is a template.**16> The default signal is geopolitical cluster consistency checking — remix it with additional constraint types, news sentiment, or satellite data feeds.17> The skill handles all the plumbing (market discovery, cluster grouping, trade execution, safeguards). Your agent provides the alpha.1819## Strategy Overview2021Polymarket lists many geopolitical markets that form logical clusters:2223- **Strike-count markets**: "Will Israel strike 5 countries?", "...6 countries?", "...7 countries?"24- **Daily military action**: "Will Israel take military action in Gaza on March 21?", "...in Lebanon on March 20?"25- **Bilateral escalation**: "Will Iran conduct military action against Israel?"26- **Ceasefire markets**: "Will there be a ceasefire in Gaza?"2728These markets are logically constrained. Striking 7 countries requires striking 6 first, so P(7) <= P(6) always. Escalation in one region affects others. When retail trades these markets in isolation, the constraints break — and that is the edge.2930## The Edge: Logical Consistency Arbitrage3132### Three Violation Types33341. **Monotonicity violations** (strike-count markets):35 - P(strike 7) must be <= P(strike 6) <= P(strike 5)36 - If P(strike 7) = 8% but P(strike 6) = 5%, the 7-market is overpriced or the 6-market is underpriced37382. **Correlation violations** (daily military action):39 - If Israel has 100% probability of action in Gaza on a given date, correlated regions (Lebanon, Syria) should reflect heightened risk40 - A very low probability in a correlated region on the same date may be underpriced41423. **Prerequisite chain violations**:43 - If P(Iran military action against Israel) = 8%, then P(Israel strikes 6+ countries) — which likely requires Iranian theater escalation — should not be much higher44 - The downstream event cannot greatly exceed its prerequisite4546### Example4748| Market | Probability |49|--------|-------------|50| Israel strike 5 countries | 20% |51| Israel strike 6 countries | 15.9% |52| Israel strike 7 countries | 18% |5354Violation: P(strike 7) = 18% > P(strike 6) = 15.9%. The 7-market is overpriced. Trade: sell NO on the 7-market (or buy YES on the 6-market).5556## Why This Works57581. **Retail trades in silos** — users view each market independently without cross-referencing logically related markets592. **Logical constraints are structural** — cumulative events, prerequisite chains, and correlation are mathematical facts, not opinions603. **Resolution forces convergence** — as resolution approaches, the market must price consistently or create guaranteed arbitrage614. **Low-liquidity geopolitical markets** — these niche markets have less market-maker coverage, so mispricings persist longer6263## Signal Logic64651. Discover geopolitical markets via keyword search (Israel, military, strike, Iran, Gaza, Lebanon, war, ceasefire)662. Parse each question: extract event type, region, actor, threshold, date673. Group into clusters (strike-count, daily-action, bilateral, ceasefire)684. Check consistency constraints:69 - Strike counts: monotonically decreasing probabilities70 - Daily action: cross-region correlation on same date71 - Prerequisites: downstream events bounded by upstream probability725. Rank violations by magnitude736. Trade only opportunities that pass threshold gates (`YES_THRESHOLD` / `NO_THRESHOLD`)747. Size by conviction (violation magnitude + threshold distance), not flat amount7576## Safety & Execution Mode7778**The skill defaults to paper trading (`venue="sim"`). Real trades only with `--live` flag.**7980| Scenario | Mode | Financial risk |81|---|---|---|82| `python trader.py` | Paper (sim) | None |83| Cron / automaton | Paper (sim) | None |84| `python trader.py --live` | Live (polymarket) | Real USDC |8586`autostart: false` and `cron: null` mean nothing runs automatically until configured in Simmer UI.8788## Required Credentials8990| Variable | Required | Notes |91|---|---|---|92| `SIMMER_API_KEY` | Yes | Trading authority. Treat as a high-value credential. |9394## Tunables (Risk Parameters)9596All declared as `tunables` in `clawhub.json` and adjustable from the Simmer UI.9798| Variable | Default | Purpose |99|---|---|---|100| `SIMMER_MAX_POSITION` | `35` | Max USDC per trade at full conviction |101| `SIMMER_MIN_TRADE` | `5` | Floor for any trade |102| `SIMMER_MIN_VOLUME` | `5000` | Min market volume filter (USD) |103| `SIMMER_MAX_SPREAD` | `0.08` | Max bid-ask spread |104| `SIMMER_MIN_DAYS` | `0` | Min days until resolution (0 = allow same-day) |105| `SIMMER_MAX_POSITIONS` | `8` | Max concurrent open positions |106| `SIMMER_YES_THRESHOLD` | `0.38` | Buy YES only if market probability <= this |107| `SIMMER_NO_THRESHOLD` | `0.62` | Sell NO only if market probability >= this |108| `SIMMER_MIN_VIOLATION` | `0.04` | Min cluster consistency violation to trigger a trade |109110## Edge Thesis111112Geopolitical events are not independent coin flips. They form causal chains: escalation in one theater raises risk in adjacent theaters; striking N countries is a prerequisite for striking N+1. Prediction markets price each event individually, but the joint probability distribution must be internally consistent.113114When it is not, the inconsistency is a free edge. This skill systematically detects and trades these logical violations, acting as an automated consistency enforcer for geopolitical prediction markets.115116## Dependency117118`simmer-sdk` by Simmer Markets (SpartanLabsXyz)119- PyPI: https://pypi.org/project/simmer-sdk/120- GitHub: https://github.com/SpartanLabsXyz/simmer-sdk