Samfisheryu commited on
Commit
563d943
·
verified ·
1 Parent(s): 3db0f6b

Upload 2 files

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +179 -0
  3. full.jsonl +3 -0
.gitattributes CHANGED
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ full.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - time-series-forecasting
5
+ - tabular-classification
6
+ language:
7
+ - en
8
+ tags:
9
+ - forecasting
10
+ - prediction-markets
11
+ - polymarket
12
+ - probability-calibration
13
+ - crowd-belief
14
+ pretty_name: Polymarket Resolved Events — Crowd-Belief & Volume Trajectories
15
+ size_categories:
16
+ - 10K<n<100K
17
+ configs:
18
+ - config_name: default
19
+ data_files: full.jsonl
20
+ ---
21
+
22
+ # Polymarket Resolved Events — Crowd-Belief & Volume Trajectories
23
+
24
+ **~29,600 fully-resolved Polymarket events, each with its complete daily crowd-belief
25
+ probability trajectory, daily trading volume, and ground-truth outcome — crawled directly
26
+ from the Polymarket APIs.**
27
+
28
+ The data is provided as-is from the crawl: every event whose full tradeable lifetime falls
29
+ inside the collection window is included, with no quality/liquidity/signal selection
30
+ applied. You can apply your own filtering downstream.
31
+
32
+ ## What the dataset contains
33
+
34
+ - **One file, `full.jsonl`** — JSON Lines, one event per line (~29,600 lines).
35
+ - Every event is **resolved** (`ground_truth_status == "resolved"`): the outcome is known,
36
+ so it can be used for supervised forecasting and backtesting.
37
+ - Each record bundles four things for one event:
38
+ 1. **Event metadata** — title, description, dates, tags, volume.
39
+ 2. **Per-option markets** — the underlying binary YES/NO books (1 for a binary event,
40
+ K for a multi-outcome event).
41
+ 3. **Daily crowd-belief trajectory** — the market-implied probability for each day of
42
+ the event's tradeable life.
43
+ 4. **Daily trading volume** — trades, share volume, and notional per day, aligned to
44
+ the same daily grid.
45
+
46
+ ### Coverage
47
+ - **Time window:** events whose entire tradeable lifetime — market open (`start_date`)
48
+ through on-chain resolution (`closed_time`) — falls inside `[2025-06-01, 2026-06-01)` (UTC).
49
+ - **Event types:**
50
+ - `binary` — a single YES/NO market.
51
+ - `multi_neg_risk` — a multi-outcome event modeled as K mutually-exclusive, linked
52
+ binary YES/NO books ("neg-risk").
53
+ - **Domains:** primarily sports, games, and weather (soccer, cricket, daily temperature),
54
+ plus politics, finance, and others. See each record's `tags`. The domain mix reflects
55
+ Polymarket's activity and is not balanced.
56
+
57
+ ## How it was collected
58
+
59
+ Crawled from the public Polymarket APIs in four stages:
60
+
61
+ 1. **Metadata** — `GET gamma-api.polymarket.com/events` (`closed=true`). Enumerate resolved
62
+ events; derive ground truth from each market's final `outcomePrices` (YES wins if the
63
+ final price ≥ 0.99).
64
+ 2. **Window-fit** — keep only events whose full lifetime (`start_date` → `closed_time`)
65
+ lies inside the collection window.
66
+ 3. **Crowd belief** — `GET clob.polymarket.com/prices-history` (`fidelity=60`),
67
+ re-aggregated to UTC days, to build each option's daily probability series.
68
+ 4. **Daily volume** — Goldsky Polymarket "orderbook-subgraph" GraphQL (fallback:
69
+ `data-api.polymarket.com/trades`), aggregated per day and aligned to the belief grid.
70
+
71
+ ## Record schema
72
+
73
+ Each line is one event. Fields:
74
+
75
+ ### Event metadata
76
+ | Field | Type | Meaning |
77
+ |---|---|---|
78
+ | `event_id` | str | Polymarket event id |
79
+ | `slug`, `title`, `body` | str | Identifiers / description |
80
+ | `creation_date` | str (ISO) | DB-insert moment (before publish; *not* trading open) |
81
+ | `start_date` | str (ISO) | Order book open — **left edge of the trajectory** |
82
+ | `end_date` | str (ISO) | Resolution *deadline* (often much later than actual resolution) |
83
+ | `close_date` / `closed_time` | str (ISO) | Actual on-chain resolution — **right edge of the trajectory** |
84
+ | `resolution_date` | str (ISO) | Gamma `endDate` |
85
+ | `active`, `closed`, `archived` | bool | Lifecycle flags |
86
+ | `neg_risk` | bool | `true` ⇒ multi-outcome (K linked binary books) |
87
+ | `total_volume` | float | Total traded volume (USDC), from Gamma metadata |
88
+ | `tags` | list | Domain/category tags |
89
+ | `category` | str | Category |
90
+ | `num_markets` | int | Number of option markets (1 = binary) |
91
+
92
+ > **Date note:** markets often settle well before `end_date`, so use `closed_time` — not
93
+ > `end_date` — as the true right edge of a trajectory to avoid look-ahead leakage.
94
+
95
+ ### Ground truth
96
+ | Field | Type | Meaning |
97
+ |---|---|---|
98
+ | `ground_truth_status` | str | `"resolved"` for every record here |
99
+ | `resolved_label` | str | Winning outcome label (or `"yes"`/`"no"` for binary) |
100
+ | `winner_market_index` | int | Index into `markets[]` of the winning option |
101
+
102
+ ### Per-option markets — `markets` (list)
103
+ One entry for a binary event; one per option for a multi-outcome event. Each object:
104
+ `market_id`, `question`, `label`, `condition_id`, `outcomes` (`["Yes","No"]`),
105
+ `outcome_prices_final`, `clob_token_ids`, `yes_token_id`, `yes_outcome_index`,
106
+ `yes_resolved` (1/0/None), `closed`, `active`, `archived`, `umaResolutionStatus`,
107
+ `volume`, `end_date`, `created_at`, `start_date`, `closed_time`.
108
+
109
+ ### Daily crowd-belief trajectory
110
+ | Field | Type | Meaning |
111
+ |---|---|---|
112
+ | `belief_kind` | str | `"binary"` or `"multi_neg_risk"` |
113
+ | `daily_index` | list[str] | ISO UTC day midnights — the time axis all series align to |
114
+ | `probability_start_date`, `probability_end_date` | str | Span of the series |
115
+ | `raw_yes_history` | dict | `{label: [p_yes per day]}` — daily-avg YES price ∈ [0,1] |
116
+ | `raw_no_history` | dict | `{label: [1 - p_yes per day]}` (binary only) |
117
+ | `normalized_history` | dict | `{label: [p per day]}` — per-day normalized K-way distribution (multi only) |
118
+ | `daily_probability_sum` | list | `Σ_k YES_k(t)` per day (multi only; the normalizer) |
119
+ | `missingness` | dict | Per-option `{days_total, days_with_value, days_missing}` |
120
+
121
+ > **Multi-outcome note:** per-option YES prices do **not** sum to 1 (each YES book has
122
+ > one-sided liquidity). The implied distribution per day is `p_i / Σ_k p_k` — that's what
123
+ > `normalized_history` already stores.
124
+ >
125
+ > Days inside the active lifetime with no trade tick are explicit `null` in the belief
126
+ > series (the grid spans the true tradeable lifetime, not just observed ticks).
127
+
128
+ ### Daily trading volume
129
+ | Field | Type | Meaning |
130
+ |---|---|---|
131
+ | `daily_volume_by_market` | dict | `{market_id: [{date, trades, share_volume, notional}]}` |
132
+ | `daily_volume` | list | Event-level daily volume (sum across markets) |
133
+ | `winner_daily_volume` | list | The winning market's own daily volume series |
134
+ | `total_volume_metadata` | float | Gamma's reported `market.volume` (USDC) |
135
+ | `daily_volume_meta` | dict | Method used, per-market stats, truncation flags, window |
136
+ | `diagnostics` | dict | Coverage ratios (`ratio_notional_to_metadata ≈ 1.0` ⇒ complete) |
137
+
138
+ Per-day volume metrics: `trades` (fill count), `share_volume` (conditional tokens
139
+ transacted), `notional` (USDC that changed hands). All are densified onto `daily_index`
140
+ (days with no trades → `0`). Note the asymmetry: **missing belief days are `null`; missing
141
+ volume days are `0`.**
142
+
143
+ ## Quick start
144
+
145
+ ```python
146
+ import json
147
+
148
+ records = [json.loads(line) for line in open("full.jsonl")]
149
+ print(len(records), "events")
150
+
151
+ ev = records[0]
152
+ print(ev["title"], "->", ev["resolved_label"])
153
+
154
+ # Reconstruct the winner's probability trajectory
155
+ days = ev["daily_index"]
156
+ if ev["belief_kind"] == "binary":
157
+ label = next(iter(ev["raw_yes_history"]))
158
+ p_yes = ev["raw_yes_history"][label]
159
+ p_winner = p_yes if ev["resolved_label"] == "yes" else [
160
+ 1 - p if p is not None else None for p in p_yes
161
+ ]
162
+ else: # multi_neg_risk
163
+ p_winner = ev["normalized_history"][ev["resolved_label"]]
164
+
165
+ for d, p in zip(days, p_winner):
166
+ print(d, p)
167
+ ```
168
+
169
+ With the `datasets` library:
170
+
171
+ ```python
172
+ from datasets import load_dataset
173
+ ds = load_dataset("<your-username>/<dataset-name>", data_files="full.jsonl", split="train")
174
+ ```
175
+
176
+ ## License & attribution
177
+
178
+ Data derived from the public Polymarket Gamma / CLOB APIs and the Goldsky-hosted
179
+ Polymarket subgraph. Please respect Polymarket's terms of service.
full.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7260b5393cb3b8077c8c65548b5fa11b8d260594fc5787034abcc69e624eb888
3
+ size 458489856