Geopolitics Weekly Pattern Trader
This is a template.
The default signal is keyword-based geopolitical market discovery combined with conviction-based sizing and weekly_pattern_multiplier() — four weekly cycle factors, no external API required.
The skill handles all the plumbing (market discovery, trade execution, safeguards). Your agent provides the alpha.
Strategy Overview
Geopolitical news flow follows predictable weekly cycles. Military operations and official statements spike Monday through Thursday during government working hours. Diplomatic announcements — UN sessions, G7/G20 summits, bilateral talks — cluster around Tuesday through Thursday. Weekends see reduced news flow from both Western and non-Western governments, leaving Polymarket prices stale and ripe for Monday repricing.
Polymarket's US-dominated retail base amplifies this pattern: US traders are least active Saturday-Sunday, meaning Friday evening and weekend news breaks sit unpriced for 24-48 hours. Monday mornings bring a wave of repricing as Asian and European news from the weekend flows into the US market open.
This skill exploits four distinct weekly windows:
- 1. Weekend Staleness — Reduced US retail attention on Saturday/Sunday means news isn't fully absorbed. Moderate-probability geopolitical markets (20-40% or 60-80%) are most likely to reprice Monday.
- 2. Monday Repricing — The sharpest window. Weekend events get priced in during Monday 00:00-14:00 UTC as Asian, European, and US sessions open sequentially. Early Monday conviction boost: 1.25x.
- 3. Friday Afternoon Unwinding — Traders reduce risk before the weekend, creating temporary price dislocations as positions are closed. Friday 18:00+ UTC conviction boost: 1.10x.
- 4. Midweek Diplomatic Calendar — UN sessions, G7/G20 meetings, and diplomatic summits cluster Tuesday through Thursday. Markets tagged with diplomatic keywords are more actionable midweek. Tue-Thu diplomatic boost: 1.10x.
Edge Thesis
The weekly cycle effect in prediction markets is well-documented:
- - Weekend staleness: US retail dominance on Polymarket means weekday-heavy activity. Friday evening through Sunday sees reduced volume and slower price discovery. News that breaks outside US hours (Asian military operations, European diplomatic announcements) sits unpriced until Monday.
- - Institutional absence: Unlike equity markets with 24/5 institutional desks, Polymarket has no market makers obligated to maintain fair pricing over weekends. This creates systematic staleness that the Monday session corrects.
- - Geopolitical news cadence: Government press conferences, UN votes, and military briefings follow working-day schedules. The news cycle itself is cyclical, and markets that depend on government actions are most affected.
- - Position unwinding: Friday afternoon risk reduction is a cross-asset phenomenon. On Polymarket, it manifests as price drift away from fair value as traders close positions ahead of weekend uncertainty.
Signal Logic
Default Signal: Conviction-Based Sizing with Weekly Pattern Multiplier
- 1. Discover active geopolitical markets via keyword search
- Gate: must match geopolitics regex filter (war, ceasefire, military, sanctions, NATO, etc.)
- Gate: spread, days-to-resolution checks
- Compute base conviction from distance to YESTHRESHOLD / NOTHRESHOLD bands
- Apply
weekly_pattern_multiplier() based on current day/hour UTC and market type - Final conviction = INLINECODE2
- Size = INLINECODE3
Weekly Pattern Multiplier (built-in, no API required)
| Day / Time (UTC) | Multiplier | Why |
|---|
| Saturday-Sunday (all day) | 1.15x | Weekend staleness: US retail absent, news unpriced |
| Monday 00:00-14:00 UTC |
1.25x | Monday repricing: weekend events flow into market open |
| Monday 14:00+ UTC |
1.05x | Repricing fading, most adjustment done |
| Friday 18:00+ UTC |
1.10x | Position unwinding: pre-weekend risk reduction creates dislocations |
| Friday before 18:00 UTC |
1.00x | Normal trading session |
| Tue-Thu (diplomatic markets) |
1.10x | Diplomatic calendar: UN, G7/G20, summits cluster midweek |
| Tue-Thu (non-diplomatic) |
1.00x | Baseline — no weekly pattern edge |
How Sizing Works at Different Probability Levels
With defaults (YESTHRESHOLD=0.38, MINTRADE=$5, MAX_POSITION=$40, Monday AM multiplier=1.25x):
| Market price p | Base conviction | Weekly conviction | Size |
|---|
| 38% (at threshold) | 0% | 0% | $5 (floor) |
| 30% |
21% | 26% | $11 |
| 20% | 47% | 59% | $24 |
| 10% | 74% | 92% | $37 |
| 0% | 100% | 100% capped | $40 |
Weekend multiplier (1.15x) at same levels:
| Market price p | Base conviction | Weekly conviction | Size |
|---|
| 30% | 21% | 24% | $10 |
| 20% |
47% | 54% | $22 |
| 10% | 74% | 85% | $34 |
Keywords Monitored
CODEBLOCK0
Geopolitics Filter
Regex-based filter ensures only genuine geopolitical markets are traded. Prevents false positives from non-geopolitical uses of keywords (e.g., "labour strike", "lightning strike", "nuclear energy stock").
Remix Signal Ideas
- - News API velocity by day-of-week: Wire GDELT or MediaCloud event counts by day into
weekly_pattern_multiplier() — when actual Monday news volume exceeds the weekly baseline by >2 standard deviations, the repricing window is even sharper; dynamically scale the Monday multiplier up to 1.40x - Diplomatic calendar feeds: Pull UN General Assembly schedule, G7/G20 summit dates, and bilateral meeting announcements from official APIs — boost midweek diplomatic multiplier to 1.20x on days with confirmed high-level meetings; reduce to 1.00x on empty calendar days
- Weekend volume anomaly detection: Track Polymarket volume by hour-of-week for geopolitical markets — when weekend volume drops below the 20th percentile of its historical range, the staleness premium is highest; dynamically scale the weekend multiplier
- Cross-timezone news flow: Wire Reuters/AP breaking news timestamps — when a story breaks during Asian hours (00:00-08:00 UTC) about a European/ME conflict, the repricing lag is longest; boost to 1.30x for these cross-timezone mismatches
Safety & Execution Mode
The skill defaults to paper trading (venue="sim"). Real trades only with --live flag.
| Scenario | Mode | Financial risk |
|---|
| INLINECODE7 | Paper (sim) | None |
| Cron / automaton |
Paper (sim) | None |
|
python trader.py --live | Live (polymarket) | Real USDC |
INLINECODE9 and cron: null — nothing runs automatically until you configure it in Simmer UI.
Required Credentials
| Variable | Required | Notes |
|---|
| INLINECODE11 | Yes | Trading authority. Treat as high-value credential. |
Tunables (Risk Parameters)
All declared as tunables in clawhub.json and adjustable from the Simmer UI.
| Variable | Default | Purpose |
|---|
| INLINECODE14 | INLINECODE15 | Max USDC per trade (reached at 100% conviction) |
| INLINECODE16 |
15000 | Min market volume filter (USD) |
|
SIMMER_MAX_SPREAD |
0.08 | Max bid-ask spread (8%) |
|
SIMMER_MIN_DAYS |
3 | Min days until resolution |
|
SIMMER_MAX_POSITIONS |
8 | Max concurrent open positions |
|
SIMMER_YES_THRESHOLD |
0.38 | Buy YES if market price <= this value |
|
SIMMER_NO_THRESHOLD |
0.62 | Sell NO if market price >= this value |
|
SIMMER_MIN_TRADE |
5 | Floor for any trade (min USDC regardless of conviction) |
Dependency
INLINECODE30 by Simmer Markets (SpartanLabsXyz)
- - PyPI: https://pypi.org/project/simmer-sdk/
- GitHub: https://github.com/SpartanLabsXyz/simmer-sdk
地缘政治周度模式交易员
这是一个模板。
默认信号是基于关键词的地缘政治市场发现,结合基于信念的头寸规模和weeklypatternmultiplier()——四个周度周期因子,无需外部API。
该技能处理所有底层工作(市场发现、交易执行、安全保障)。您的智能体提供阿尔法收益。
策略概述
地缘政治新闻流遵循可预测的周度周期。军事行动和官方声明在周一至周四政府工作时间内达到高峰。外交公告——联合国会议、G7/G20峰会、双边会谈——集中在周二至周四。周末期间,西方和非西方政府的新闻流均减少,导致Polymarket价格停滞,为周一重新定价创造了条件。
Polymarket以美国为主的零售用户群体放大了这一模式:美国交易者在周六至周日最不活跃,这意味着周五晚间和周末的新闻在24-48小时内未被定价。周一上午,随着亚洲和欧洲的周末新闻流入美国市场开盘,将迎来一波重新定价。
该技能利用四个不同的周度窗口:
- 1. 周末停滞——周六/周日美国零售关注度降低意味着新闻未被充分吸收。中等概率的地缘政治市场(20-40%或60-80%)最有可能在周一重新定价。
- 2. 周一重新定价——最显著的窗口。随着亚洲、欧洲和美国市场依次开盘,周末事件在周一00:00-14:00 UTC期间被定价。周一早间信念加成:1.25倍。
- 3. 周五下午平仓——交易者在周末前降低风险,随着头寸平仓造成临时价格错位。周五18:00+ UTC信念加成:1.10倍。
- 4. 周中外交日历——联合国会议、G7/G20会议和外交峰会集中在周二至周四。标记有外交关键词的市场在周中更具可操作性。周二至周四外交加成:1.10倍。
优势理论
预测市场中的周度周期效应已有充分记录:
- - 周末停滞:Polymarket上美国零售主导意味着工作日活动密集。周五傍晚至周日交易量和价格发现速度均下降。在美国交易时间之外发生的新闻(亚洲军事行动、欧洲外交公告)直到周一才被定价。
- - 机构缺席:与拥有24/5机构交易台的股票市场不同,Polymarket没有做市商有义务在周末维持公平定价。这造成了系统性的停滞,由周一交易时段修正。
- - 地缘政治新闻节奏:政府新闻发布会、联合国投票和军事简报遵循工作日的日程安排。新闻周期本身具有周期性,依赖政府行动的市场受影响最大。
- - 头寸平仓:周五下午的风险降低是跨资产现象。在Polymarket上,表现为价格偏离公允价值,因为交易者在周末不确定性前平仓。
信号逻辑
默认信号:基于信念的头寸规模与周度模式乘数
- 1. 通过关键词搜索发现活跃的地缘政治市场
- 门控:必须匹配地缘政治正则表达式过滤器(战争、停火、军事、制裁、北约等)
- 门控:价差、到期天数检查
- 根据与YESTHRESHOLD/NOTHRESHOLD区间的距离计算基础信念
- 根据当前UTC日期/小时和市场类型应用weeklypatternmultiplier()
- 最终信念 = min(1.0, baseconviction weeklymultiplier)
- 头寸规模 = max(MINTRADE, round(conviction MAXPOSITION, 2))
周度模式乘数(内置,无需API)
| 日期/时间(UTC) | 乘数 | 原因 |
|---|
| 周六-周日(全天) | 1.15倍 | 周末停滞:美国零售缺席,新闻未定价 |
| 周一00:00-14:00 UTC |
1.25倍 | 周一重新定价:周末事件流入市场开盘 |
| 周一14:00+ UTC |
1.05倍 | 重新定价减弱,大部分调整已完成 |
| 周五18:00+ UTC |
1.10倍 | 头寸平仓:周末前风险降低造成错位 |
| 周五18:00 UTC前 |
1.00倍 | 正常交易时段 |
| 周二至周四(外交市场) |
1.10倍 | 外交日历:联合国、G7/G20、峰会集中在周中 |
| 周二至周四(非外交) |
1.00倍 | 基准——无周度模式优势 |
不同概率水平下的头寸规模计算
使用默认值(YESTHRESHOLD=0.38, MINTRADE=$5, MAX_POSITION=$40, 周一上午乘数=1.25倍):
| 市场价格p | 基础信念 | 周度信念 | 头寸规模 |
|---|
| 38%(阈值处) | 0% | 0% | $5(下限) |
| 30% |
21% | 26% | $11 |
| 20% | 47% | 59% | $24 |
| 10% | 74% | 92% | $37 |
| 0% | 100% | 100%上限 | $40 |
相同水平下的周末乘数(1.15倍):
| 市场价格p | 基础信念 | 周度信念 | 头寸规模 |
|---|
| 30% | 21% | 24% | $10 |
| 20% |
47% | 54% | $22 |
| 10% | 74% | 85% | $34 |
监控的关键词
战争, 停火, 军事, 打击, 伊朗, 以色列, 加沙, 黎巴嫩,
制裁, 核武器, 军队, 冲突, 外交, 北约, 乌克兰,
俄罗斯, 中国, 台湾, 会议, 峰会, 和平
地缘政治过滤器
基于正则表达式的过滤器确保只交易真正的地缘政治市场。防止关键词的非地缘政治使用造成的误报(例如劳工罢工、雷击、核能股票)。
混音信号思路
- - 按星期几的新闻API速度:将GDELT或MediaCloud按天的事件计数输入weeklypatternmultiplier()——当实际周一新闻量超过周度基线>2个标准差时,重新定价窗口更加显著;动态将周一乘数提升至1.40倍
- 外交日历数据源:从官方API拉取联合国大会日程、G7/G20峰会日期和双边会议公告——在确认有高级别会议的日期将周中外交乘数提升至1.20倍;在无会议日期降至1.00倍
- 周末成交量异常检测:追踪地缘政治市场按小时周度的Polymarket成交量——当周末成交量低于历史范围第20百分位时,停滞溢价最高;动态调整周末乘数
- 跨时区新闻流:接入路透/美联社突发新闻时间戳——当故事在亚洲时间(00:00-08:00 UTC)关于欧洲/中东冲突爆发时,重新定价滞后最长;对这些跨时区错位提升至1.30倍
安全与执行模式
该技能默认为模拟交易(venue=sim)。仅使用--live标志进行真实交易。
| 场景 | 模式 | 财务风险 |
|---|
| python trader.py | 模拟 | 无 |
| Cron/自动化 |
模拟 | 无 |
| python trader.py --live | 实盘 | 真实USDC |
autostart: false和cron: null——在Simmer UI中配置之前,没有任何内容自动运行。
所需凭证
| 变量 | 必需 | 备注 |
|---|
| SIMMERAPIKEY | 是 | 交易授权。视为高价值凭证。 |
可调参数(风险参数)
均在clawhub.json中声明为tunables,可从Simmer UI调整。
| 变量 | 默认值 | 用途 |
|---|
| SIMMERMAXPOSITION | 40 | 每笔交易最大USDC(100%信念时达到) |
| SIMMERMINVOLUME |
15000 | 最小市场成交量过滤器(USD) |
| SIMMER
MAXSPREAD | 0.08 | 最大买卖价差(8%) |
| SIMMER
MINDAYS | 3 | 最小到期天数 |
| SIMMER
MAXPOSITIONS | 8 | 最大同时持仓数 |
| SIMMER
YESTHRESHOLD | 0.38 | 当市场价格<=此值时买入YES |
| SIMMER
NOTHRESHOLD | 0.62 | 当市场价格>=此值时卖出NO |
| SIMMER
MINTRADE | 5 | 任何交易的下限(无论信念如何的最小USDC) |
依赖项
simmer-sdk by Sim