Simmer Weather Trader
An automated trading bot for Simmer weather prediction markets. Fetches active weather markets, cross-references temperature forecasts from 4 independent sources, and only trades when the consensus is strong.
How it works
- 1. Market Discovery — fetches active weather markets from Simmer via the SDK
- Multi-Source Forecast — gets high temperature predictions from:
-
NOAA (US government weather API)
-
Open-Meteo (free global weather API)
-
Wunderground (scraped via Playwright for broader coverage)
-
NVIDIA FourcastNet (physics-based atmospheric model)
- 3. Confidence Scoring — computes a 0–100 score based on:
- Source agreement (all within ±1°F)
- Market bucket fit
- Simmer edge recommendation
- Time to resolution
- 4. Execution — only trades when score reaches 100 (maximum confidence)
Default signal
The default strategy is conservative multi-source consensus:
- - All 3 weather sources must agree within ±1°F
- FourcastNet must confirm the bucket
- Simmer edge must recommend TRADE
- Only YES trades (betting the temp falls within the market bucket)
This is a template. The default signal uses 4 weather models. Remix it by:
- - Adding more weather sources (AccuWeather, Weather.com, etc.)
- Adjusting the agreement threshold (currently strict ±1°F)
- Adding NO trades (betting the temp falls outside the bucket)
- Using ML models trained on historical forecast accuracy per source
Setup
Environment variables
CODEBLOCK0
Dependencies
CODEBLOCK1
Supported cities
New York, Los Angeles, Chicago, Miami, Houston, Phoenix, Philadelphia, San Francisco, Seattle, Denver, Boston, Atlanta, Dallas, Minneapolis, Las Vegas, Detroit, Portland, San Antonio, San Diego, Milan, Madrid, Tel Aviv, London, Paris, Berlin, Tokyo.
Add more in city_map.py.
Remix guide
Swap in your own signals:
- - Different weather sources: Replace or add forecast functions in the
simmer_weather_bot/ folder - Different scoring: Modify
compute_confidence() in INLINECODE3 - Add NO trades: Extend the strategy to also bet against consensus
- ML-based: Train a model on historical forecast accuracy and replace the simple agreement check
The plumbing (market discovery, trade execution, Telegram UI, health checks) stays the same.
Hard rules
- - Always defaults to dry-run. Pass
--live for real trades. - Always tags trades with source and skill_slug for tracking.
- Always includes reasoning with the weather data used.
- Reads API keys from env — never hardcodes credentials.
Simmer 天气交易机器人
一个用于 Simmer 天气预测市场的自动化交易机器人。它会获取活跃的天气市场,交叉比对来自 4 个独立来源 的温度预报,并且仅在共识强烈时进行交易。
工作原理
- 1. 市场发现 — 通过 SDK 从 Simmer 获取活跃的天气市场
- 多源预报 — 从以下来源获取高温预测:
-
NOAA(美国政府天气 API)
-
Open-Meteo(免费全球天气 API)
-
Wunderground(通过 Playwright 爬取以扩大覆盖范围)
-
NVIDIA FourcastNet(基于物理的大气模型)
- 3. 置信度评分 — 基于以下因素计算 0–100 分:
- 来源一致性(全部在 ±1°F 范围内)
- 市场区间匹配度
- Simmer 边缘推荐
- 距离结算时间
- 4. 执行 — 仅在评分达到 100(最高置信度)时进行交易
默认信号
默认策略是保守的多源共识:
- - 所有 3 个天气来源必须在 ±1°F 范围内一致
- FourcastNet 必须确认该区间
- Simmer 边缘必须推荐交易
- 仅做 YES 交易(押注温度落在市场区间内)
这是一个模板。 默认信号使用 4 个天气模型。您可以通过以下方式重新组合:
- - 添加更多天气来源(AccuWeather、Weather.com 等)
- 调整一致性阈值(当前为严格的 ±1°F)
- 添加 NO 交易(押注温度落在区间外)
- 使用基于每个来源历史预报准确率训练的 ML 模型
设置
环境变量
bash
SIMMERAPIKEY=your_key # 必需 — 来自 simmer.markets
NVIDIAAPIKEY=your_key # 必需 — 用于 FourcastNet
TELEGRAMBOTTOKEN=your_token # 可选 — 用于 Telegram 界面
TRADE_AMOUNT=10.0 # 可选 — 默认 $10
CONFIDENCE_THRESHOLD=100 # 可选 — 默认仅最高置信度
SIMMERBASEURL=https://api.simmer.markets # 可选
SIMMER_VENUE=sim # 可选 — 默认 sim
依赖项
bash
pip install httpx python-telegram-bot python-dotenv numpy
pip install netCDF4 # 用于解析 FourcastNet 输出
pip install playwright # 用于爬取 Wunderground
playwright install chromium # Wunderground 所需
支持的城市
纽约、洛杉矶、芝加哥、迈阿密、休斯顿、凤凰城、费城、旧金山、西雅图、丹佛、波士顿、亚特兰大、达拉斯、明尼阿波利斯、拉斯维加斯、底特律、波特兰、圣安东尼奥、圣地亚哥、米兰、马德里、特拉维夫、伦敦、巴黎、柏林、东京。
更多城市可在 city_map.py 中添加。
重新组合指南
替换为您自己的信号:
- - 不同的天气来源:在 simmerweatherbot/ 文件夹中替换或添加预报函数
- 不同的评分方式:修改 strategy.py 中的 compute_confidence()
- 添加 NO 交易:扩展策略以同时押注与共识相反的方向
- 基于 ML:基于历史预报准确率训练模型,并替换简单的一致性检查
底层架构(市场发现、交易执行、Telegram 界面、健康检查)保持不变。
硬性规则
- - 默认始终为模拟运行。传递 --live 参数进行真实交易。
- 始终使用来源和技能标识符标记交易以便追踪。
- 始终包含所使用的天气数据的推理过程。
- 从环境变量读取 API 密钥 — 绝不硬编码凭据。