Coffee Seasonal Trader
This is a remixable template
The default signal requires no external API — it uses date-derived seasonal multipliers (frost calendar, harvest cycle, ENSO phase) applied on top of standard price-threshold conviction sizing.
The skill handles all the plumbing (market discovery, trade execution, safeguards). Your signal provides the alpha.
Strategy Overview
Coffee is one of the world's most weather-sensitive commodities — and one of the most predictably seasonal. Three structural patterns repeat every year, and Polymarket participants systematically misprice all three:
1. Brazil frost window — Commercially damaging frost in Brazil's coffee belt (Cerrado Mineiro, Sul de Minas, Mogiana) is only physically possible during June–August. Polar air masses (friagens) push north from Patagonia into Brazil's southern highlands exclusively in winter. Yet retail traders price frost optionality into coffee price markets year-round. A market asking "will arabica hit $5?" in January embeds a frost premium that cannot materialize for six more months. We fade it. In July, we back the same trade at higher conviction.
2. Brazil harvest cycle — The main arabica harvest runs April–September. Post-harvest (October–January), supply is at its seasonal peak and well-understood by the market — price spike markets are overpriced. Pre-harvest (February–March), inventory draws down and supply anxiety is legitimate.
3. ENSO phase (La Niña / El Niño) — La Niña brings drought stress to Brazil's coffee belt, tightening arabica supply. El Niño brings excess rainfall to Vietnam, disrupting Robusta logistics. Current ENSO phase is set via SIMMER_ENSO_PHASE env var (update quarterly from NOAA).
The Core Insight: Frost Optionality Has an Expiry Date
The single most important edge in this skill:
CODEBLOCK0
The historical record confirms: every major Brazilian coffee frost event (1975, 1994, 1997, 2000, 2021) occurred between June 15 and August 31. None have occurred outside this window in the modern record.
This gives us a clean seasonal on/off signal:
| Period | Frost possible? | Our adjustment |
|---|
| July | Yes — peak risk | 1.30x conviction |
| June / August |
Yes — shoulder | 1.15x conviction |
| May / September | No — but market transitioning | 1.05x |
| October – April | No — meteorologically impossible | 0.80x (fade frost premium) |
Signal Logic
Default Signal: Conviction-Based Sizing with Coffee Seasonal Bias
- 1. Discover active coffee markets via keyword sweep (prices, crop, weather, futures)
- Gate: must be a genuine coffee market (
_is_coffee_market) - Gate: spread ≤ MAXSPREAD, days to resolution ≥ MINDAYS
- Compute
coffee_seasonal_bias(question) = frostmult × harvestmult × enso_mult, capped 0.65–1.40x - Conviction =
(threshold - p) / threshold × bias (YES) or (p - threshold) / (1 - threshold) × bias (NO) - Size = INLINECODE5
The Three Multipliers
Frost window multiplier (date-derived, no API needed):
| Month | Label | Multiplier |
|---|
| July | JULY(peak-frost) | 1.30x |
| June, August |
FROST-SHOULDER | 1.15x |
| May, September | FROST-MARGINAL | 1.05x |
| October – April | NO-FROST | 0.80x |
Harvest cycle multiplier:
| Period | Label | Multiplier |
|---|
| February – March | PRE-HARVEST | 1.10x |
| April – June |
HARVEST-START | 1.05x |
| July – September | HARVEST-PEAK | 1.00x |
| October – January | POST-HARVEST | 0.90x |
ENSO multiplier (set via SIMMER_ENSO_PHASE):
| ENSO phase | Market type | Multiplier |
|---|
| INLINECODE7 | Arabica / Brazil | 1.15x (drought stress → bullish) |
| INLINECODE8 |
Robusta / Vietnam | 1.00x (neutral) |
|
el_nino | Robusta / Vietnam | 1.15x (logistics disruption → bullish) |
|
el_nino | Arabica / Brazil | 1.00x (mixed) |
|
neutral | Any | 1.00x |
Combined Examples (TODAY: March 22, 2026 — neutral ENSO assumed)
| Scenario | Frost | Harvest | ENSO | Final bias |
|---|
| Arabica price spike — March, neutral | 0.80x | 1.10x | 1.00x | 0.88x |
| Brazil frost event — July, La Niña |
1.30x | 1.00x | 1.15x |
1.40x cap |
| Robusta supply — October, El Niño | 0.80x | 0.90x | 1.15x |
0.83x |
| Arabica production — June, neutral | 1.15x | 1.05x | 1.00x |
1.21x |
How Sizing Works
With defaults (YESTHRESHOLD=38%, MINTRADE=$5, MAX_POSITION=$30):
| Price p | Conviction (no bias) | July + La Niña (1.40x) | Mar off-season (0.88x) |
|---|
| 38% (at threshold) | 0% | $5 floor | $5 floor |
| 30% |
21% | $8.8 | $5.5 |
| 20% | 47% | $19.7 | $12.4 |
| 5% | 87% | $30 (cap) | $23 |
Keywords Monitored
CODEBLOCK1
Remix Signal Ideas
- - ICE Arabica KC1 spot price: Wire real-time KC1 futures price into
compute_signal — compute % distance to question threshold and compare to Polymarket probability; when the market implies a different probability than what the options surface suggests, you have a precise edge - NOAA ENSO outlook: Automate
SIMMER_ENSO_PHASE updates from the monthly NOAA CPC ENSO forecast API (free, JSON) — current hardcoded value updates only when you redeploy; automated updates capture phase transitions earlier than retail - Brazil frost model: Pull the 10-day ECMWF or GFS 850hPa temperature forecast for Minas Gerais (lat -20, lon -45) — if anomalously cold air is forecast to reach the coffee belt within the frost window, spike conviction to 1.40x regardless of calendar month
- Vietnam rainfall index: Use CHIRPS precipitation anomaly data for Vietnam's Central Highlands during robusta flowering (Oct–Dec) — anomalous drought during flowering predicts 12–18 month forward supply shortage; fade robusta market prices that haven't incorporated this
- Brazil biennial cycle: Track whether current crop year is on-year (high) or off-year (low) in Brazil's biennial production cycle — on-years increase post-harvest supply surplus; off-years tighten; add a ±0.10x multiplier to harvestcyclemult accordingly
Safety & Execution Mode
The skill defaults to paper trading (venue="sim"). Real trades only with --live flag.
| Scenario | Mode | Financial risk |
|---|
| INLINECODE16 | Paper (sim) | None |
| Cron / automaton |
Paper (sim) | None |
|
python trader.py --live | Live (polymarket) | Real USDC |
INLINECODE18 and cron: null — nothing runs automatically until you configure it in Simmer UI.
Required Credentials
| Variable | Required | Notes |
|---|
| INLINECODE20 | 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 |
|---|
| INLINECODE23 | INLINECODE24 | Max USDC per trade (reached at 100% conviction) |
| INLINECODE25 |
5000 | 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 | Buy NO if market price ≥ this value |
|
SIMMER_MIN_TRADE |
5 | Floor for any trade (min USDC regardless of conviction) |
|
SIMMER_ENSO_PHASE |
neutral | ENSO climate phase:
la_nina,
el_nino, or
neutral. Update quarterly from NOAA CPC. |
Dependency
INLINECODE44 by Simmer Markets (SpartanLabsXyz)
- - PyPI: https://pypi.org/project/simmer-sdk/
- GitHub: https://github.com/SpartanLabsXyz/simmer-sdk
技能名称: polymarket-coffee-trader
详细描述:
咖啡季节性交易员
这是一个可复用的模板
默认信号无需外部API——它使用基于日期的季节性乘数(霜冻日历、收获周期、ENSO阶段),应用于标准价格阈值置信度仓位计算之上。
该技能处理所有底层工作(市场发现、交易执行、安全防护)。你的信号提供超额收益。
策略概述
咖啡是全球对天气最敏感的大宗商品之一——也是季节性最可预测的品种之一。每年重复出现三种结构性模式,而Polymarket参与者系统性地错误定价了所有三种:
1. 巴西霜冻窗口期 — 巴西咖啡带(塞拉多米内罗、南米纳斯、莫吉亚纳)的商业破坏性霜冻仅在6月至8月期间可能发生。极地气团(friagens)仅在冬季从巴塔哥尼亚向北推进至巴西南部高地。然而,零售交易者全年都在咖啡价格市场中为霜冻期权定价。一个在1月询问阿拉比卡是否会达到5美元?的市场,包含了未来六个月无法实现的霜冻溢价。我们反向操作。在7月,我们以更高置信度支持同一交易。
2. 巴西收获周期 — 主要阿拉比卡收获期为4月至9月。收获后(10月至次年1月),供应处于季节性峰值且市场充分了解——价格飙升市场被高估。收获前(2月至3月),库存减少,供应焦虑是合理的。
3. ENSO阶段(拉尼娜/厄尔尼诺) — 拉尼娜给巴西咖啡带带来干旱压力,收紧阿拉比卡供应。厄尔尼诺给越南带来过量降雨,扰乱罗布斯塔物流。当前ENSO阶段通过SIMMERENSOPHASE环境变量设置(每季度从NOAA更新)。
核心洞察:霜冻期权有到期日
该技能中最重要的单一优势:
巴西霜冻仅在6月、7月、8月可能发生。
10月至次年5月的咖啡价格飙升市场包含
零气象价值的霜冻期权。
零售交易者不知道这一点。他们将是否会有霜冻?定价为
全年背景风险。我们知道霜冻日历。
历史记录证实:每一次重大巴西咖啡霜冻事件(1975年、1994年、1997年、2000年、2021年)均发生在6月15日至8月31日之间。在现代记录中,没有一次发生在此窗口期之外。
这给了我们一个清晰的季节性开/关信号:
| 时期 | 霜冻可能? | 我们的调整 |
|---|
| 7月 | 是——风险峰值 | 1.30倍置信度 |
| 6月/8月 |
是——过渡期 | 1.15倍置信度 |
| 5月/9月 | 否——但市场在过渡 | 1.05倍 |
| 10月至4月 | 否——气象学上不可能 | 0.80倍(反向操作霜冻溢价) |
信号逻辑
默认信号:基于置信度的仓位计算,带咖啡季节性偏差
- 1. 通过关键词扫描发现活跃咖啡市场(价格、作物、天气、期货)
- 门控:必须是真正的咖啡市场(iscoffeemarket)
- 门控:价差 ≤ MAXSPREAD,距结算天数 ≥ MINDAYS
- 计算coffeeseasonalbias(question) = 霜冻乘数 × 收获乘数 × enso乘数,上限0.65–1.40倍
- 置信度 = (threshold - p) / threshold × bias(YES)或 (p - threshold) / (1 - threshold) × bias(NO)
- 仓位 = max(MINTRADE, conviction × MAX_POSITION)
三个乘数
霜冻窗口期乘数(基于日期,无需API):
| 月份 | 标签 | 乘数 |
|---|
| 7月 | JULY(peak-frost) | 1.30倍 |
| 6月、8月 |
FROST-SHOULDER | 1.15倍 |
| 5月、9月 | FROST-MARGINAL | 1.05倍 |
| 10月至4月 | NO-FROST | 0.80倍 |
收获周期乘数:
| 时期 | 标签 | 乘数 |
|---|
| 2月至3月 | PRE-HARVEST | 1.10倍 |
| 4月至6月 |
HARVEST-START | 1.05倍 |
| 7月至9月 | HARVEST-PEAK | 1.00倍 |
| 10月至次年1月 | POST-HARVEST | 0.90倍 |
ENSO乘数(通过SIMMERENSOPHASE设置):
| ENSO阶段 | 市场类型 | 乘数 |
|---|
| lanina | 阿拉比卡/巴西 | 1.15倍(干旱压力→看涨) |
| lanina |
罗布斯塔/越南 | 1.00倍(中性) |
| el_nino | 罗布斯塔/越南 | 1.15倍(物流中断→看涨) |
| el_nino | 阿拉比卡/巴西 | 1.00倍(混合) |
| neutral | 任何 | 1.00倍 |
组合示例(今日:2026年3月22日——假设中性ENSO)
| 场景 | 霜冻 | 收获 | ENSO | 最终偏差 |
|---|
| 阿拉比卡价格飙升——3月,中性 | 0.80倍 | 1.10倍 | 1.00倍 | 0.88倍 |
| 巴西霜冻事件——7月,拉尼娜 |
1.30倍 | 1.00倍 | 1.15倍 |
1.40倍上限 |
| 罗布斯塔供应——10月,厄尔尼诺 | 0.80倍 | 0.90倍 | 1.15倍 |
0.83倍 |
| 阿拉比卡产量——6月,中性 | 1.15倍 | 1.05倍 | 1.00倍 |
1.21倍 |
仓位计算方式
使用默认值(YESTHRESHOLD=38%,MINTRADE=$5,MAX_POSITION=$30):
| 价格p | 置信度(无偏差) | 7月+拉尼娜(1.40倍) | 3月淡季(0.88倍) |
|---|
| 38%(阈值处) | 0% | $5下限 | $5下限 |
| 30% |
21% | $8.8 | $5.5 |
| 20% | 47% | $19.7 | $12.4 |
| 5% | 87% | $30(上限) | $23 |
监控关键词
咖啡价格,阿拉比卡价格,罗布斯塔价格,咖啡期货,阿拉比卡期货,
KC期货,咖啡高于,咖啡低于,咖啡达到,咖啡超过,
咖啡产量,咖啡作物,咖啡收获,咖啡单产,
巴西咖啡,越南咖啡,哥伦比亚咖啡,埃塞俄比亚咖啡,
阿拉比卡产量,罗布斯塔产量,咖啡袋,百万袋,
咖啡霜冻,霜冻事件,霜冻损害,巴西霜冻,
咖啡干旱,咖啡降雨,塞拉多,南米纳斯,
咖啡带,咖啡冰冻,咖啡,阿拉比卡,罗布斯塔,咖啡市场
可复用信号创意
- - ICE阿拉比卡KC1现货价格:将实时KC1期货价格接入computesignal——计算与问题阈值的百分比距离,并与Polymarket概率比较;当市场暗示的概率与期权表面显示的不同时,你就有了精确优势
- NOAA ENSO展望:从每月NOAA CPC ENSO预报API(免费,JSON格式)自动更新SIMMERENSOPHASE——当前硬编码值仅在重新部署时更新;自动更新比零售交易者更早捕捉阶段转换
- 巴西霜冻模型:拉取米纳斯吉拉斯州(纬度-20,经度-45)的10天ECMWF或GFS 850hPa温度预报——如果在霜冻窗口期内预报异常冷空气到达咖啡带,无论日历月份如何,将置信度提升至1.40倍
- 越南降雨指数:在罗布斯塔开花期(10月至12月)使用越南中部高地的CHIRPS降水异常数据——开花期异常干旱预示12至18个月后的供应短缺;反向操作尚未纳入此因素的罗布斯塔市场价格
- 巴西两年周期:跟踪当前作物年度是巴西两年生产周期中的大年(高)还是小年(低)——大年增加收获后供应盈余;小年收紧供应;相应地在harvestcycle_mult上增加±0.10倍乘数
安全与执行模式