Poly Tradebot
Overview
Poly-tradebot automates the news-to-trading-analysis workflow: fetches CNBC world news, filters by relevant tags (us, iran, war, market, the fed), classifies each article as geopolitics or macroeconomics, invokes the appropriate specialized skill (geopolitics-expert or the-fed-agent), discovers related Polymarket markets, and produces a unified trading analysis table with market data and expert recommendations.
Workflow
1. Fetch CNBC World News
CODEBLOCK0
Fetches articles from https://www.cnbc.com/world/?region=world using web_fetch tool. Extracts at least 3 articles matching tags: us, iran, war, market, the fed.
Article Selection Criteria:
- - Headline or content contains at least one tag keyword
- Published within last 24-48 hours (freshness)
- Substantive content (not brief mentions)
2. Classify Article Topic
For each fetched article, classify as:
| Topic | Classification Triggers | Skill to Invoke |
|---|
| Geopolitics | Iran, war, military, conflict, sanctions, regime, IRGC, drone, missile, Strait of Hormuz, UAE, Middle East tensions | INLINECODE7 |
| Macroeconomics |
Fed, Treasury yields, interest rates, inflation, central bank, CPI, employment, GDP, monetary policy, oil price (economic impact) |
the-fed-agent |
3. Invoke Specialized Skill
For Geopolitics Articles:
CODEBLOCK1
Produces 5-section output:
- 1. Conclusion
- Economic/Commodity Impact
- Commodity Trading Odds
- War Duration Categorization
- Termination Scenarios
For Macroeconomics Articles:
CODEBLOCK2
Produces 4-section output:
- 1. Conclusion
- Economic/Commodity Impact
- Commodity Trading Odds
- What's Next Can Be Happened? (policy path scenarios)
4. Discover Polymarket Markets
For each analyzed article, search Polymarket for related prediction markets:
CODEBLOCK3
Extract market metadata:
- - Market Title
- Market URL
- Resolve Date
- Current Odds (Yes/No probabilities)
- Trading Volume (24h + total volume)
Search Strategy:
- - Use article keywords (e.g., "Iran war", "Fed rate hike", "Oil prices")
- Filter to active/open markets
- Volume Filter: Only include markets with total volume > $1,000,000
- Odds Filter: Only include markets with Yes% probability < 70% (contrarian edge)
- Minimum Markets: Discover at least 10 qualifying markets across all articles
- Prioritize high-liquidity markets for reliable odds
5. Output Per News Article
Each article produces a standalone analysis file saved to memory/:
- - Geopolitics: INLINECODE10
- Macroeconomics: INLINECODE11
Output Format: Follows exact skill output format (geopolitics: 5 sections, macro: 4 sections) PLUS a unified trading table.
6. Unified Trading Table Output
After all articles are analyzed and Polymarket markets discovered, produce a summary table:
| Market Title | Market URL | Resolve Date | Market Odds | Volume | Recommendation | Reason |
|---|
| <market name> | <polymarket URL> | <date> | <Yes%> | $<volume> | YES or NO | <expert reasoning> |
Column Definitions:
- 1. Market Title: Polymarket market name
- Market URL: Direct link to the Polymarket market
- Resolve Date: When the market resolves
- Market Odds: Current Polymarket probability (Yes%)
- Volume: Total trading volume (must be > $1,000,000)
- Recommendation: Bold YES or NO based on expert analysis
- Reason: Concise reasoning from geopolitics-expert or the-fed-agent (e.g., "75% forever war probability", "65% single 25bp cut only")
Output Requirements:
- - Minimum Markets: At least 10 markets in the table
- Volume Filter: All markets must have total trading volume > $1,000,000
- Odds Filter: All markets must have Yes% probability < 70% (contrarian opportunities)
Recommendation Logic:
- - YES: Expert analysis supports the market outcome (expert probability > 60%)
- NO: Expert analysis contradicts the market outcome (expert probability < 40%)
- Include the key probability and rationale from the expert skill output
Usage Examples
Example 1: Full Pipeline Run
CODEBLOCK4
Fetches 3+ CNBC articles, classifies each, invokes appropriate skills, discovers Polymarket markets, outputs unified trading table (Yes/No recommendations with expert reasoning).
Example 2: Re-run Workflow
CODEBLOCK5
Re-fetches fresh articles from CNBC world page, re-runs classification, analysis, and market discovery pipeline.
Example 3: Analyze Specific URL
CODEBLOCK6
Classifies and analyzes a single article URL, discovers related Polymarket markets, outputs Yes/No recommendation with expert reasoning.
Example 4: Output Table Only
CODEBLOCK7
Regenerates the unified trading table from existing memory analyses without re-fetching articles.
Output Summary
After pipeline completion, produces ONLY the Unified Trading Table:
| Market Title | Market URL | Resolve Date | Market Odds | Volume | Recommendation | Reason |
|---|
| <market name> | <polymarket URL> | <date> | <Yes%> | $<volume> | YES or NO | <concise expert rationale> |
Format Rules:
- - Table only — no headers, no commentary, no additional sections
- Minimum Markets: At least 10 markets in the table
- Volume Filter: All markets must have total trading volume > $1,000,000
- Odds Filter: All markets must have Yes% probability < 70% (contrarian opportunities)
- Recommendation: Bold YES or NO based on expert analysis probability
- Reason: Concise expert rationale (e.g., "75% forever war probability", "65% single 25bp cut only")
- Market Odds: Current Polymarket Yes% probability
- Volume: Display total trading volume (e.g., "$2.4M")
- Saved to INLINECODE12
Skill Dependencies
- -
geopolitics-expert — Required for geopolitics articles - INLINECODE14 — Required for macroeconomics articles
- INLINECODE15 — Built-in tool for article retrieval
- INLINECODE16 — Built-in tool for Polymarket market discovery (optional)
Resources
references/
- -
classification_rules.md — Topic classification heuristics - INLINECODE18 — Format templates per skill type (geopolitics: 5 sections, macro: 4 sections)
scripts/
- -
fetch_cnbc.py — Article fetching and parsing utility - INLINECODE20 — Geopolitics vs macroeconomics classifier
Skill Version: 3.1
Created: 2026-03-17
Updated: 2026-03-18 (v3.1: odds filter <70% for contrarian edge; v3.0: minimum 10 markets, volume filter >$1M, added Volume column)
Author: poly-tradebot skill creator
Poly Tradebot
概述
Poly-tradebot 自动化了从新闻到交易分析的工作流程:获取CNBC世界新闻,通过相关标签(美国、伊朗、战争、市场、美联储)进行筛选,将每篇文章分类为地缘政治或宏观经济,调用相应的专业技能(地缘政治专家或美联储代理),发现相关的Polymarket市场,并生成包含市场数据和专家建议的统一交易分析表。
工作流程
1. 获取CNBC世界新闻
poly-tradebot fetch
使用web_fetch工具从https://www.cnbc.com/world/?region=world获取文章。提取至少3篇匹配以下标签的文章:美国、伊朗、战争、市场、美联储。
文章选择标准:
- - 标题或内容包含至少一个标签关键词
- 发布时间在最近24-48小时内(时效性)
- 内容充实(非简短提及)
2. 分类文章主题
对于每篇获取的文章,分类如下:
| 主题 | 分类触发词 | 调用的技能 |
|---|
| 地缘政治 | 伊朗、战争、军事、冲突、制裁、政权、伊斯兰革命卫队、无人机、导弹、霍尔木兹海峡、阿联酋、中东紧张局势 | geopolitics-expert |
| 宏观经济 |
美联储、国债收益率、利率、通胀、中央银行、CPI、就业、GDP、货币政策、油价(经济影响) | the-fed-agent |
3. 调用专业技能
对于地缘政治文章:
geopolitics-expert
生成5部分输出:
- 1. 结论
- 经济/大宗商品影响
- 大宗商品交易概率
- 战争持续时间分类
- 终止情景
对于宏观经济文章:
the-fed-agent
生成4部分输出:
- 1. 结论
- 经济/大宗商品影响
- 大宗商品交易概率
- 接下来可能发生什么?(政策路径情景)
4. 发现Polymarket市场
对于每篇分析过的文章,在Polymarket上搜索相关的预测市场:
web_search query=<主题> Polymarket 市场 site:polymarket.com
webfetch url=market_url> extractMode=markdown
提取市场元数据:
- - 市场标题
- 市场URL
- 结算日期
- 当前概率(是/否概率)
- 交易量(24小时 + 总交易量)
搜索策略:
- - 使用文章关键词(例如:伊朗战争、美联储加息、油价)
- 筛选为活跃/开放市场
- 交易量筛选:仅包含总交易量 > 1,000,000美元的市场
- 概率筛选:仅包含是概率 < 70%的市场(逆向思维优势)
- 最低市场数量:在所有文章中至少发现10个合格市场
- 优先选择高流动性市场以获得可靠概率
5. 每篇新闻文章的输出
每篇文章生成一个独立的分析文件,保存到memory/:
- - 地缘政治:memory/geopolitics-YYYY-MM-DD-cnbc-<主题>.md
- 宏观经济:memory/macro-YYYY-MM-DD-cnbc-<主题>.md
输出格式: 遵循精确的技能输出格式(地缘政治:5部分,宏观经济:4部分)加上统一的交易表。
6. 统一交易表输出
在所有文章分析完毕且Polymarket市场发现完成后,生成一个汇总表:
| 市场标题 | 市场URL | 结算日期 | 市场概率 | 交易量 | 建议 | 理由 |
|---|
| <市场名称> | <Polymarket URL> | <日期> | <是%> | $<交易量> | 是或否 | <专家推理> |
列定义:
- 1. 市场标题:Polymarket市场名称
- 市场URL:Polymarket市场的直接链接
- 结算日期:市场结算日期
- 市场概率:当前Polymarket概率(是%)
- 交易量:总交易量(必须 > 1,000,000美元)
- 建议:基于专家分析的加粗是或否
- 理由:来自地缘政治专家或美联储代理的简洁推理(例如:75%永久战争概率、65%仅一次25个基点降息)
输出要求:
- - 最低市场数量:表中至少10个市场
- 交易量筛选:所有市场必须总交易量 > 1,000,000美元
- 概率筛选:所有市场必须是概率 < 70%(逆向机会)
建议逻辑:
- - 是:专家分析支持市场结果(专家概率 > 60%)
- 否:专家分析与市场结果相矛盾(专家概率 < 40%)
- 包含专家技能输出的关键概率和理由
使用示例
示例1:完整流水线运行
poly-tradebot
获取3篇以上CNBC文章,对每篇进行分类,调用相应技能,发现Polymarket市场,输出统一交易表(是/否建议及专家推理)。
示例2:重新运行工作流程
poly-tradebot fetch
重新从CNBC世界页面获取新文章,重新运行分类、分析和市场发现流水线。
示例3:分析特定URL
poly-tradebot analyze
对单篇文章URL进行分类和分析,发现相关Polymarket市场,输出是/否建议及专家推理。
示例4:仅输出表格
poly-tradebot table
从现有记忆分析中重新生成统一交易表,无需重新获取文章。
输出摘要
流水线完成后,仅生成统一交易表:
| 市场标题 | 市场URL | 结算日期 | 市场概率 | 交易量 | 建议 | 理由 |
|---|
| <市场名称> | <Polymarket URL> | <日期> | <是%> | $<交易量> | 是或否 | <简洁的专家理由> |
格式规则:
- - 仅表格 — 无标题、无评论、无额外部分
- 最低市场数量:表中至少10个市场
- 交易量筛选:所有市场必须总交易量 > 1,000,000美元
- 概率筛选:所有市场必须是概率 < 70%(逆向机会)
- 建议:基于专家分析概率的加粗是或否
- 理由:简洁的专家理由(例如:75%永久战争概率、65%仅一次25个基点降息)
- 市场概率:当前Polymarket是概率
- 交易量:显示总交易量(例如:$2.4M)
- 保存到memory/poly-tradebot-table-YYYY-MM-DD.md
技能依赖
- - geopolitics-expert — 地缘政治文章必需
- the-fed-agent — 宏观经济文章必需
- webfetch — 内置工具,用于文章检索
- websearch — 内置工具,用于Polymarket市场发现(可选)
资源
references/
- - classificationrules.md — 主题分类启发式规则
- outputtemplates.md — 每种技能类型的格式模板(地缘政治:5部分,宏观经济:4部分)
scripts/
- - fetchcnbc.py — 文章获取和解析工具
- classifytopic.py — 地缘政治与宏观经济分类器
技能版本: 3.1
创建日期: 2026-03-17
更新日期: 2026-03-18(v3.1:概率筛选<70%以获得逆向优势;v3.0:最低10个市场,交易量筛选>$1M,添加交易量列)
作者: poly-tradebot技能创建者