polymarket-eventconnector-compatible-v1
收藏资源简介:
Polymarket EventConnector-compatible v1 是一个面向事件预测市场的价格序列数据集,专为复现和迁移 EventConnector 论文中的 price-only 预测任务而构建。该数据集从 Polymarket 平台约 7.63 亿笔可信成交记录出发,通过聚合每个市场在每个 UTC 日的最后一个真实成交小时价格,形成固定日历的日频价格轨迹。数据集采用 10→7 时间窗口格式:给定过去 10 个连续 UTC 日的市场概率,预测未来 7 个 UTC 日的概率路径。数据集包含 365,015 条完整的 17 日窗口记录,其中训练集 227,161 条,测试集 137,854 条。训练集和测试集在 market_id 和 event_id 上完全无交集,并通过 cold-family 机制确保同一父事件下的 sibling markets 不会跨集合泄漏。每条记录由 sample_id、market_id、event_id、question 等身份字段,以及固定 17 个时间点的价格历史(window_history)组成,前 10 点为输入,后 7 点为预测目标。数据集还提供了基于 500 条训练样本的默认图审计结果,包括共波动边(62,272 条)和 DTW 边(920 条),用于检索增强预测。该数据集适用于时间序列预测、事件概率预测、预测市场分析等任务,尤其适合研究检索增强的时间序列模型在预测市场数据上的迁移效果。请注意,该数据集不包含新闻或新闻归因字段,且仅输出 dense 窗口(连续无缺失的 17 日),因此高流动性市场权重较高。
Polymarket EventConnector-compatible v1 is a price series dataset for event prediction markets, specifically built to reproduce and transfer the price-only prediction task in the EventConnector paper. It is derived from approximately 763 million verified transaction records on the Polymarket platform, aggregating the last real hourly price of each market on each UTC day to form a fixed-calendar daily frequency price trajectory. The dataset adopts a 10→7 time window format: given the market probabilities of the past 10 consecutive UTC days, predict the probability path for the next 7 UTC days. It contains 365,015 complete 17-day window records, with 227,161 in the training set and 137,854 in the test set. The training and test sets have no overlap in market_id or event_id, and a cold-family mechanism ensures that sibling markets under the same parent event do not leak across sets. Each record consists of identity fields such as sample_id, market_id, event_id, question, and a fixed 17-point price history (window_history), with the first 10 points as input and the last 7 as prediction targets. The dataset also provides default graph audit results based on 500 training samples, including co-movement edges (62,272) and DTW edges (920), for retrieval-augmented prediction. It is suitable for tasks such as time series forecasting, event probability prediction, and prediction market analysis, especially for studying the transfer effect of retrieval-augmented time series models on prediction market data. Note that the dataset does not include news or news attribution fields, and only outputs dense windows (continuous 17 days without missing values), so highly liquid markets have higher weight.
Polymarket EventConnector-compatible v1 数据集概览
数据集基本信息
| 属性 | 值 |
|---|---|
| 名称 | Polymarket EventConnector-compatible v1 |
| 语言 | 英语 (en)、中文 (zh) |
| 任务类型 | 时间序列预测 (time-series-forecasting) |
| 数据规模 | 100K < n < 1M |
| 标签 | polymarket、prediction-markets、time-series、eventconnector |
| 构建日期 | 2026-08-29 |
核心目标
将 Polymarket 日频价格轨迹整理为 EventConnector 可直接读取的 price-only 10→7 JSONL 格式:给定过去 10 个 UTC 日的市场概率,预测未来 7 个 UTC 日的概率路径。数据不含新闻与新闻归因字段,相关图输出仅为轨迹相关候选,不构成预测增量证据或因果关系标签。
数据规模
| 输出 split | 窗口数 | markets | events |
|---|---|---|---|
| train | 227,161(约 22.72 万) | 7,575 | 3,116 |
| test | 137,854(约 13.79 万) | 6,654 | 2,005 |
| 合计 | 365,015(约 36.50 万) | — | — |
- train 与 test 的
market_id、event_id交集均为 0。 - 每个窗口包含连续 17 个 UTC 日价格,前 10 点为模型输入,后 7 点为预测目标。
数据构建方法
从成交到日价格
数据源为可信实际成交(约 7.63 亿笔),构建链路:
text 原始 trades + quant 对账 → 可信逻辑成交 → market × UTC hour observed bars → market × UTC day 的最后一个真实成交小时 → 当日 p_answer1_close
规则:
- 当天至少一笔可信成交才生成日价格状态。
- 无成交日保持缺失,不跨日延续。
- 价格方向统一为
answer1,但不一定是 Yes。
A-D 10→7 窗口构造
对每个有效日价格的预测时点 as_of_time:
- 历史输入:
as_of_time - 9d至as_of_time,共 10 个日历日。 - 预测目标:
as_of_time + 1d至as_of_time + 7d,共 7 个日历日。 - 位置为连续日历日,非“下一个有成交日”。
时间切分
| 项目 split | as_of_time 范围 |
用途 |
|---|---|---|
| train | 2022-11-21 至 2025-07-31 | 模型拟合与图构造 |
| validation | 2025-08-01 至 2025-10-31 | 超参数与停止点选择 |
| test | 2025-11-01 至 2026-05-04 | 冻结后的时间外评估 |
窗口要求:as_of_time 位于该 split 且最远目标 as_of_time + 7d 仍位于同一 split,跨边界窗口被删除。
cold-family 防泄漏机制
同一父 event_id 下的 markets 视为一个 family,按最早可信成交时间确定首次出现 split。窗口仅当 窗口所在 split == 该 family 首次出现的 split 时标记为 cold_family_eligible=true。
dense 窗口筛选
| 项目 split | 全部 A-D 窗口 | dense 窗口 | dense + cold-family |
|---|---|---|---|
| train | 720,505 | 212,892 | 212,892 |
| validation | 281,734 | 60,668 | 14,269 |
| test | 1,677,926 | 271,081 | 137,854 |
dense_window=true:10 个历史日和 7 个目标日全部具有有效价格,共 17 个连续 UTC 日无缺失。- 最终导出:
train = 212,892 + 14,269 = 227,161,test = 137,854。
JSONL 单条记录结构
json { "sample_id": "A_D-100-20250610T0000Z", "market_id": "100", "event_id": "10", "question": "Will ...?", "categories": [], "sample_type": "natural_dense_window", "before": {"t": 1750032000, "p": 0.41}, "after": {"t": 1750118400, "p": 0.46}, "change": 0.05, "z_score": 1.2, "window_start": 1748736000, "window_end": 1750118400, "window_history": [{"t": 1748736000, "p": 0.31}, ...], "answer1": "Outcome A", "answer2": "Outcome B", "price_orientation": "answer1" }
字段说明:
window_history固定 17 个{t,p}点,前 10 点为输入,后 7 点为目标。- 相邻时间戳严格相差 86,400 秒。
before/after:第 16 和第 17 点(未来第 6/7 日)。change:abs(after.p - before.p)。z_score:用前 15 个绝对相邻价格变化的 median/MAD 标准化最后一个绝对变化。- 不含
news、attributions,categories=[]。
相关图构造
算法参数
- 抽样:500 条训练记录,seed=42。
- 近重复合并:全 17 点
|r| > 0.95,union-find 合并。 - 局部相关:7 点滑动 Pearson,任一窗口
|r| ≥ 0.70连边。 - lead-lag:相对位置
±3。 - DTW:最多检查 2,000 个未连接 pair,Sakoe–Chiba band 宽度 3,距离 < 1.5 加边。
首轮图审计结果
| 对象 | 数量 |
|---|---|
| 抽样记录 | 500 |
| canonical nodes / 被合并节点 | 460 / 40 |
| co-fluctuation edges | 62,272 |
| DTW edges | 920 |
| 跨 event co-fluctuation edges | 62,020 |
| 日期完全一致的跨 event edges | 109 |
| 日历完全不重叠的跨 event edges | 57,727(93.1%) |
| co-fluctuation graph density | 59.0% |
图边表核心字段
| 字段 | 含义 |
|---|---|
source/target_sample_id |
两端窗口身份 |
source/target_market_id、source/target_event_id |
两端市场与事件身份 |
source/target_as_of_time |
两端预测时点 |
weight |
最大局部绝对相关,或 DTW 换算权重 |
peak_local_signed_corr |
局部峰值相关及其正负号 |
direction、lag、corr_sign |
lead-lag 方向、步数和 lag 相关符号 |
edge_type |
cofluctuation 或 dtw |
calendar_overlap_days |
两个 17 日窗口实际重叠的 UTC 日数 |
same_market、same_event |
是否属于相同 market 或父 event |
数据文件清单
| 文件 | 内容 |
|---|---|
polymarket_data_processed_price_only_train_2025-11-01.jsonl |
227,161 条训练窗口 |
polymarket_data_processed_price_only_test_2025-11-01.jsonl |
137,854 条测试窗口 |
graph_sample_records.parquet |
固定抽中的 500 条训练记录及身份信息 |
graph_merge_membership.parquet |
近重复轨迹与 canonical node 映射 |
graph_edges.parquet |
co-fluctuation 与 DTW 原始图边 |
cross_event_correlations.parquet |
排除同 event 后的 co-fluctuation 边 |
calendar_aligned_cross_event_correlations.parquet |
日期完全一致的审计子集(109 条) |
calendar_aligned_cross_event_correlations.csv |
上述 109 条候选的 CSV 版 |
top_cross_event_correlations.csv |
原始跨事件边前 1,000 条 |
summary.json |
数据规模、算法参数、图密度和限制 |
另有 edge_snapshots_v1/ 目录存放 277 个日频 Parquet snapshots、5,162 条可计算 edge observations(其中 3,463 条 active),可由 DuckDB 按日期查询。
当前状态与限制
已完成:
- 数据适配与 train/test 导出。
- 默认 500-record 图审计与 19 项针对性测试。
- 与 EventConnector 公开图函数在合成轨迹上逐边核对一致。
- 本地图实现与公开实现的 canonical nodes、边集合、权重、direction、lag 完全一致。
未完成:
- 固定预测器下的 EventConnector 检索增量。
- P3 跨事件预测增量。
- 关系模型训练。
- 正式预测器比较、完整 Granger/EC-Fusion。
- 尚未证明任何图边具有时间外预测增量。
数据边界:
- 不包含新闻或新闻归因,也不把相关图边视为关系标签。
categories=[],无正式 category 契约。- 数据适合做 price-only 方法迁移,不等同于完整复刻论文数据内容。
加载方式
python from datasets import load_dataset
repo = "Levi2ok/polymarket-eventconnector-compatible-v1" files = { "train": "polymarket_data_processed_price_only_train_2025-11-01.jsonl", "test": "polymarket_data_processed_price_only_test_2025-11-01.jsonl", } dataset = load_dataset("json", data_files={ split: f"hf://datasets/{repo}/{path}" for split, path in files.items() })
上游与参照
- 上游数据:SII-WANGZJ/Polymarket_data。
- 方法对照:EventConnector 论文与官方实现。
- 该数据集为任务化派生数据,不替代上游原始数据。




