Install
openclaw skills install yy-world-cupUse when predicting World Cup match results and generating China Sports Lottery betting strategies, including injury factor analysis, weather impact assessment, market price calibration with Polymarket, and dual strategy recommendations.
openclaw skills install yy-world-cup基于双模式评分模型和Elo评级系统的增强型世界杯赛事预测工具,v3.0 整合三大数据源:
输出精准比赛预测结果、市场校准报告、跨市场套利机会和中国体彩双模式购票策略。
v3.0 新增能力:
When NOT to use
| 数据源 | 优势 | 限制 |
|---|---|---|
| 真实FIFA Elo | 客观、可复现、覆盖全部球队 | 不反映伤停/天气等即时因素 |
| Polymarket市场 | $24.5亿真金白银投票,反映集体智慧 | 部分比赛可能未上架 |
| 中国体彩盘口 | 中国市场真实赔率、含庄家利润 | 仅比赛前1-2天公布 |
| 版本 | 修复点 | 验证 |
|---|---|---|
| v1.0 | 基础Elo模型(用编造数据) | 失败 |
| v2.0 | 修复upset_mode bug,补全因子 | 2024欧洲杯3/3 |
| v2.1 | 引入首轮谨慎因子 | 15场66.7%准确率 |
| v3.0 | 整合Polymarket + 体彩 | 25个测试通过 |
world-cup-predictor-enhanced/
├── SKILL.md # 本文件
├── predictor/
│ ├── __init__.py
│ ├── core.py # 双模式预测引擎(v2.1)
│ ├── factors.py # 10类预测因子
│ ├── calibration.py # 🆕 市场赔率校准器(v3.0)
│ ├── enhanced_demo.py # 🆕 综合演示脚本(v3.0)
│ ├── data/ # 数据接入层
│ │ ├── models.py
│ │ ├── api_client.py # balldontlie FIFA API
│ │ ├── polymarket_client.py # 🆕 Polymarket API(v3.0)
│ │ └── cache.py
│ ├── strategy/ # 策略引擎
│ │ ├── lottery.py
│ │ ├── conservative.py
│ │ └── aggressive.py
│ └── validator/ # 验证模块
│ └── backtest.py
├── tests/ # 🆕 25个测试全部通过
│ ├── test_factors.py
│ └── test_polymarket.py # 🆕 v3.0 测试
└── data/ # 运行时数据
Elo差 ≥ 15分 → 爆冷模式(爆冷因子+客胜加权)
Elo差 < 15分 → 平衡模式(泊松分布+动态平局)
小组赛首轮 → 谨慎因子 +6%(v2.1新增)
| 因子 | 权重 | 说明 |
|---|---|---|
| 基础Elo | 35% | 1600-1950区间 |
| 伤病上场概率 | 15% | 主力+位置差异化 |
| 近期状态 | 12% | 近5场加权 |
| 天气影响 | 8% | 温度/降水/风力 |
| 小组排名 | 7% | 出线形势对战意 |
| 攻防数据 | 7% | 进球/失球差值 |
| 主场优势 | 5% | 中立25/真实70 Elo |
| 平局率 | 5% | 同阶段校正 |
| 平局偏差 | 4% | 历史对战 |
| 战术克制 | 2% | 风格相克 |
真实FIFA Elo → 基础预测概率
↓
Polymarket市场 → 校验/调整(24.5亿市场智慧)
↓
中国体彩盘口 → 中国市场赔率 + 庄家利润评估
↓
最终预测 + 套利机会报告
from predictor.enhanced_demo import enhanced_predict_6_17
enhanced_predict_6_17() # 6/17 3场完整预测+EV分析
from predictor import WorldCupPredictor
from predictor.data import Team, MatchInfo, TeamStyle
home = Team(id=1, name="France", elo=1870, style=TeamStyle.BALANCED, ...)
away = Team(id=2, name="Senegal", elo=1684, style=TeamStyle.PHYSICAL, ...)
match = MatchInfo(home_team=home, away_team=away, ..., is_neutral=True)
pred = WorldCupPredictor().predict(match)
print(f"主胜 {pred.home_win_prob*100:.1f}%")
from predictor.data import PolymarketClient
poly = PolymarketClient()
wc = poly.get_world_cup_winner()
print(f"法国: {wc['teams']['France']*100:.2f}%") # 17.65%
from predictor.calibration import MarketCalibrator
cal = MarketCalibrator()
report = cal.generate_report(
model_winner_probs={'France': 0.20, 'Spain': 0.13, ...}
)
print(MarketCalibrator.format_report(report))
# 全部25个测试
python3 -m unittest tests.test_factors tests.test_polymarket -v
# 仅Polymarket相关
python3 -m unittest tests.test_polymarket -v