# 48小时降水量区间交易者 > 这是一个模板。 > 默认信号是检测降水量区间市场之间的分布和与单调性违规 —— 可通过天气 API、历史降水数据或气候模型集合进行再创作。 > 该技能负责所有底层工作(市场发现、分布构建、交易执行、风控)。你的 agent 提供 alpha。 ## 策略概述 Polymarket 针对同一城市同一时期列出多个降水量区间: - “西雅图 4 月降水量会超过 5 英寸吗?” = 18.8% - “西雅图 4 月降水量会在 4.5–5 英寸之间吗?” = 17.5% - “西雅图 4 月降水量会在 4–4.5 英寸之间吗?” = 29% - “西雅图 4 月降水量会在 3.5–4 英寸之间吗?” = 19% - “西雅图 4 月降水量会在 3–3.5 英寸之间吗?” = 19% - “西雅图 4 月降水量会在 2.5–3 英寸之间吗?” = 20% 这些区间构成一个概率分布,其总和必须≈100%。当总和不符时,个别区间被误定价。此外,累计市场(“超过 X 英寸”)必须随 X 增大而单调递减。 ## 优势:降水市场的分布套利 在传统市场,离散结果概率之和必须为 1.0——这是基本公理。在 Polymarket,每个降水区间独立交易,拥有各自的订单簿和流动性。散户把每个区间当作孤立押注,不校验整体分布。 ### 违规类型 1:总和偏离 同一(城市、时期)的所有区间之和必须≈100%: `` P(2.5-3in) + P(3-3.5in) + P(3.5-4in) + P(4-4.5in) + P(4.5-5in) + P(>5in) = 100% ` 若总和为 108%,则至少一个区间被高估;若总和为 92%,则至少一个区间被低估。 ### 违规类型 2:累计单调性破坏 累计市场必须单调: ` P(>3in) >= P(>3.5in) >= P(>4in) >= P(>4.5in) >= P(>5in) [more_than: 递减] P(<3in) <= P(<3.5in) <= P(<4in) <= P(<4.5in) <= P(<5in) [less_than: 递增] ` 若更高阈值的“超过”概率反而高于更低阈值,则曲线被破坏。 ## 为何有效 1. 散户孤立交易——多数用户把每个降水区间当独立注码,不交叉验证整体分布 2. 无做市商强制一致——与需平衡账簿的传统博彩公司不同,Polymarket 没有机制确保区间总和为 100% 3. 数学而非观点——违规是概率公理的可证明不一致 4. 多城市、月度粒度——众多城市的月度降水市场形成巨大机会面 ## 信号逻辑 1. 通过关键词搜索(“precipitation”、“inches”、“rainfall”、“Seattle”)发现所有降水区间市场 2. 解析每个问题:提取城市、降水区间(between X and Y / more than X / less than X)及时期(月份) 3. 按(城市、时期)分组为分布 4. 对每个含 2+ 区间的分布: - 检查所有区间总和是否≈100%(容差通过 SIMMER_SUM_TOLERANCE 配置) - 若总和 > 105%:找出并卖出最被高估的区间(相对邻居最高) - 若总和 < 95%:找出并买入最被低估的区间(相对邻居最低) - 检查累计区间单调性(“more than X”递减,“less than X”递增) 5. 按违规幅度排序 6. 仅交易同时通过阈值门控(YES_THRESHOLD / NO_THRESHOLD)的违规 7. 按确信度(违规幅度 + 阈值距离)而非固定金额确定仓位大小 ## 安全与执行模式 技能默认纸面交易(venue="sim")。仅在使用 --live 标志时进行真实交易。 | 场景 | 模式 | 资金风险 | |---|---|---| | python trader.py | 纸面 (sim) | 无 | | Cron / 自动机 | 纸面 (sim) | 无 | | python trader.py --live | 实盘 (polymarket) | 真实 USDC | autostart: false 与 cron: null 表示在 Simmer UI 配置前不会自动运行。 ## 所需凭证 | 变量 | 必需 | 说明 | |---|---|---| | SIMMER_API_KEY | 是 | 交易权限。视为高价值凭证。 | ## 可调参数(风险参数) 所有参数在 clawhub.json 中声明为 tunables,并可在 Simmer UI 调整。 | 变量 | 默认值 | 用途 | |---|---|---| | SIMMER_MAX_POSITION | 35 | 全确信度下每笔交易最大 USDC | | SIMMER_MIN_TRADE | 5 | 任何交易的最小金额 | | SIMMER_MIN_VOLUME | 5000 | 市场最小成交量过滤(美元) | | SIMMER_MAX_SPREAD | 0.08 | 最大买卖价差 | | SIMMER_MIN_DAYS | 0 | 距离结算最小天数(0 = 允许当日) | | SIMMER_MAX_POSITIONS | 8 | 最大并发持仓数 | | SIMMER_YES_THRESHOLD | 0.38 | 仅当市场概率 ≤ 此值时买入 YES | | SIMMER_NO_THRESHOLD | 0.62 | 仅当市场概率 ≥ 此值时卖出 NO | | SIMMER_SUM_TOLERANCE | 0.05 | 偏离 100% 总和的允许容差,之后才交易 | ## 优势论点 Polymarket 的降水区间市场被结构化为离散概率分布。每个区间独立交易,但数学上被约束总和为 100%。当散户订单流推动个别区间而未在整个分布中传导时,总和偏离——产生纯粹数学套利。本技能重建分布,找出公理破裂处,并交易修复过程。 ## 依赖 simmer-sdk` by Simmer Markets (SpartanLabsXyz) - PyPI: https://pypi.org/project/simmer-sdk/ - GitHub: https://github.com/SpartanLabsXyz/simmer-sdk
This is a template.
The default signal is distribution-sum and monotonicity violation detection across precipitation-range bin markets — remix it with weather API feeds, historical precipitation data, or climate model ensembles.
The skill handles all the plumbing (market discovery, distribution construction, trade execution, safeguards). Your agent provides the alpha.
Strategy Overview
Polymarket lists multiple precipitation range bins for the same city and period:
- "Will Seattle have more than 5 inches of precipitation in April?" = 18.8%
- "Will Seattle have between 4.5 and 5 inches in April?" = 17.5%
- "Will Seattle have between 4 and 4.5 inches in April?" = 29%
- "Will Seattle have between 3.5 and 4 inches in April?" = 19%
- "Will Seattle have between 3 and 3.5 inches in April?" = 19%
- "Will Seattle have between 2.5 and 3 inches in April?" = 20%
These range bins form a probability distribution that must sum to ~100%. When they don't, individual bins are mispriced. Additionally, cumulative markets ("more than X inches") must be monotonically decreasing as X increases.
The Edge: Distribution Arbitrage for Precipitation Markets
In traditional markets, discrete outcome probabilities must sum to 1.0 — this is a fundamental axiom. On Polymarket, each precipitation range bin trades independently with its own order book and liquidity. Retail treats each bin as an isolated bet without checking the full distribution.
Violation Type 1: Sum Deviation
All range bins for a (city, period) must sum to ~100%:
P(2.5-3in) + P(3-3.5in) + P(3.5-4in) + P(4-4.5in) + P(4.5-5in) + P(>5in) = 100%
If the sum is 108%, at least one bin is overpriced. If the sum is 92%, at least one bin is underpriced.
Violation Type 2: Cumulative Monotonicity Break
Cumulative markets must be monotonic:
P(>3in) >= P(>3.5in) >= P(>4in) >= P(>4.5in) >= P(>5in) [more_than: decreasing]
P(<3in) <= P(<3.5in) <= P(<4in) <= P(<4.5in) <= P(<5in) [less_than: increasing]
If a higher threshold has a higher "more than" probability than a lower threshold, the curve is broken.
Why This Works
- Retail trades in silos — most users view each precipitation bin independently and don't cross-reference the full distribution
- No market maker enforcing consistency — unlike bookmakers who balance their book, Polymarket has no mechanism to keep bins summing to 100%
- Mathematical, not opinion — the violations are provable inconsistencies in the probability axioms
- Multiple cities, monthly resolution — many cities with monthly precipitation markets create a large opportunity surface
Signal Logic
- Discover all precipitation range markets via keyword search ("precipitation", "inches", "rainfall", "Seattle")
- Parse each question: extract city, precipitation range (between X and Y / more than X / less than X), and period (month)
- Group into distributions by (city, period)
- For each distribution with 2+ bins:
- Check if all range bins sum to ~100% (tolerance configurable via
SIMMER_SUM_TOLERANCE)
- If sum > 105%: identify and sell the most overpriced bin (highest relative to neighbors)
- If sum < 95%: identify and buy the most underpriced bin (lowest relative to neighbors)
- Check monotonicity on cumulative bins ("more than X" decreasing, "less than X" increasing)
- Rank violations by magnitude
- Trade only violations that also 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_SUM_TOLERANCE | 0.05 | Allowed deviation from 100% sum before trading |
Edge Thesis
Precipitation range markets on Polymarket are structured as discrete probability distributions. Each bin trades independently, but they are mathematically constrained to sum to 100%. When retail order flow pushes individual bins without propagating to the full distribution, the sum deviates — creating pure mathematical arbitrage. This skill reconstructs the distribution, finds where the axioms break, and trades the repair.
Dependency
simmer-sdk by Simmer Markets (SpartanLabsXyz)
- PyPI: https://pypi.org/project/simmer-sdk/
- GitHub: https://github.com/SpartanLabsXyz/simmer-sdk