cyberosa commited on
Commit
cd58ecc
·
1 Parent(s): ab9253c

updating dialy data

Browse files
data/closed_markets_div.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8df376959d26e13d47dcbe3c25acc82f028e35f33ef7928a869eed102d8c7e34
3
- size 64570
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1358e72ea2c93185bb28f6660d238fd745d0d9a7a74bdd52daf14eca6bd65140
3
+ size 64772
data/daily_info.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:66f689a59cd158b095e78225ae6d85977771c2a7f9ad323a6692e33e34d16b05
3
- size 835096
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:195d5d8c5252f2c663eb5226e70074515124ac3dce174fbc153eb7dd85b2ba00
3
+ size 499139
notebooks/closed_markets.ipynb CHANGED
@@ -2,7 +2,7 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": 2,
6
  "metadata": {},
7
  "outputs": [],
8
  "source": [
@@ -11,24 +11,32 @@
11
  },
12
  {
13
  "cell_type": "code",
14
- "execution_count": 20,
15
  "metadata": {},
16
- "outputs": [],
 
 
 
 
 
 
 
 
17
  "source": [
18
  "try:\n",
19
  " markets = pd.read_parquet(\"../data/fpmms.parquet\")\n",
20
  "except Exception:\n",
21
  " print(\"Error reading the parquet file\")\n",
22
  "\n",
23
- "markets[\"currentAnswer\"] = markets[\"currentAnswer\"].apply(lambda x: x.lower())\n",
24
- "# filter only markets with yes, no answers\n",
25
- "valid_answers = [\"yes\", \"no\"]\n",
26
- "markets = markets.loc[markets[\"currentAnswer\"].isin(valid_answers)]"
27
  ]
28
  },
29
  {
30
  "cell_type": "code",
31
- "execution_count": 3,
32
  "metadata": {},
33
  "outputs": [],
34
  "source": [
@@ -40,7 +48,7 @@
40
  },
41
  {
42
  "cell_type": "code",
43
- "execution_count": 4,
44
  "metadata": {},
45
  "outputs": [
46
  {
@@ -48,36 +56,36 @@
48
  "output_type": "stream",
49
  "text": [
50
  "<class 'pandas.core.frame.DataFrame'>\n",
51
- "RangeIndex: 61442 entries, 0 to 61441\n",
52
  "Data columns (total 24 columns):\n",
53
  " # Column Non-Null Count Dtype \n",
54
  "--- ------ -------------- ----- \n",
55
- " 0 collateralAmount 61442 non-null object\n",
56
- " 1 collateralAmountUSD 61442 non-null object\n",
57
- " 2 collateralToken 61442 non-null object\n",
58
- " 3 creationTimestamp 61442 non-null object\n",
59
- " 4 trader_address 61442 non-null object\n",
60
- " 5 feeAmount 61442 non-null object\n",
61
- " 6 id 61442 non-null object\n",
62
- " 7 oldOutcomeTokenMarginalPrice 61442 non-null object\n",
63
- " 8 outcomeIndex 61442 non-null object\n",
64
- " 9 outcomeTokenMarginalPrice 61442 non-null object\n",
65
- " 10 outcomeTokensTraded 61442 non-null object\n",
66
- " 11 title 61442 non-null object\n",
67
- " 12 transactionHash 61442 non-null object\n",
68
- " 13 type 61442 non-null object\n",
69
- " 14 market_creator 61442 non-null object\n",
70
- " 15 fpmm.answerFinalizedTimestamp 47113 non-null object\n",
71
- " 16 fpmm.arbitrationOccurred 61442 non-null bool \n",
72
- " 17 fpmm.currentAnswer 47113 non-null object\n",
73
- " 18 fpmm.id 61442 non-null object\n",
74
- " 19 fpmm.isPendingArbitration 61442 non-null bool \n",
75
- " 20 fpmm.openingTimestamp 61442 non-null object\n",
76
- " 21 fpmm.outcomes 61442 non-null object\n",
77
- " 22 fpmm.title 61442 non-null object\n",
78
- " 23 fpmm.condition.id 61442 non-null object\n",
79
  "dtypes: bool(2), object(22)\n",
80
- "memory usage: 10.4+ MB\n"
81
  ]
82
  }
83
  ],
@@ -87,7 +95,7 @@
87
  },
88
  {
89
  "cell_type": "code",
90
- "execution_count": 5,
91
  "metadata": {},
92
  "outputs": [
93
  {
@@ -105,7 +113,7 @@
105
  " dtype='object')"
106
  ]
107
  },
108
- "execution_count": 5,
109
  "metadata": {},
110
  "output_type": "execute_result"
111
  }
@@ -116,20 +124,9 @@
116
  },
117
  {
118
  "cell_type": "code",
119
- "execution_count": 4,
120
  "metadata": {},
121
- "outputs": [
122
- {
123
- "data": {
124
- "text/plain": [
125
- "4686"
126
- ]
127
- },
128
- "execution_count": 4,
129
- "metadata": {},
130
- "output_type": "execute_result"
131
- }
132
- ],
133
  "source": [
134
  "len(markets.id.unique())"
135
  ]
@@ -240,7 +237,7 @@
240
  },
241
  {
242
  "cell_type": "code",
243
- "execution_count": 6,
244
  "metadata": {},
245
  "outputs": [],
246
  "source": [
@@ -249,7 +246,7 @@
249
  },
250
  {
251
  "cell_type": "code",
252
- "execution_count": 7,
253
  "metadata": {},
254
  "outputs": [
255
  {
@@ -299,123 +296,123 @@
299
  " <tbody>\n",
300
  " <tr>\n",
301
  " <th>0</th>\n",
302
- " <td>450426474650738688</td>\n",
303
- " <td>0.4504269694034145716308073094168006</td>\n",
304
  " <td>0xe91d153e0b41518a2ce8dd3d7944fa863463a97d</td>\n",
305
- " <td>1724553455</td>\n",
306
- " <td>0x022b36c50b85b8ae7addfb8a35d76c59d5814834</td>\n",
307
- " <td>9008529493014773</td>\n",
308
- " <td>0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f50x02...</td>\n",
309
- " <td>0.592785210609610270634125335572129</td>\n",
310
- " <td>1</td>\n",
311
- " <td>0.6171295391012242250994586583534301</td>\n",
312
  " <td>...</td>\n",
313
  " <td>quickstart</td>\n",
314
- " <td>1725071760</td>\n",
315
  " <td>False</td>\n",
316
  " <td>0x00000000000000000000000000000000000000000000...</td>\n",
317
- " <td>0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5</td>\n",
318
  " <td>False</td>\n",
319
- " <td>1724976000</td>\n",
320
  " <td>[Yes, No]</td>\n",
321
- " <td>Will the first floating offshore wind research...</td>\n",
322
- " <td>0x0e940f12f30e928e4879c52d065d9da739a3d3f020d1...</td>\n",
323
  " </tr>\n",
324
  " <tr>\n",
325
  " <th>1</th>\n",
326
- " <td>610163214546941400</td>\n",
327
- " <td>0.6101636232215150135654007337015298</td>\n",
328
  " <td>0xe91d153e0b41518a2ce8dd3d7944fa863463a97d</td>\n",
329
- " <td>1724811940</td>\n",
330
  " <td>0x034c4ad84f7ac6638bf19300d5bbe7d9b981e736</td>\n",
331
- " <td>12203264290938828</td>\n",
332
- " <td>0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f50x03...</td>\n",
333
- " <td>0.842992636523755061934822129394812</td>\n",
334
- " <td>1</td>\n",
335
- " <td>0.8523396372892128845826889719620915</td>\n",
336
  " <td>...</td>\n",
337
  " <td>quickstart</td>\n",
338
- " <td>1725071760</td>\n",
339
  " <td>False</td>\n",
340
  " <td>0x00000000000000000000000000000000000000000000...</td>\n",
341
- " <td>0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5</td>\n",
342
  " <td>False</td>\n",
343
- " <td>1724976000</td>\n",
344
  " <td>[Yes, No]</td>\n",
345
- " <td>Will the first floating offshore wind research...</td>\n",
346
- " <td>0x0e940f12f30e928e4879c52d065d9da739a3d3f020d1...</td>\n",
347
  " </tr>\n",
348
  " <tr>\n",
349
  " <th>2</th>\n",
350
- " <td>789065092332460672</td>\n",
351
- " <td>0.7890644120527324071908793822796086</td>\n",
352
  " <td>0xe91d153e0b41518a2ce8dd3d7944fa863463a97d</td>\n",
353
- " <td>1724815755</td>\n",
354
- " <td>0x09e9d42a029e8b0c2df3871709a762117a681d92</td>\n",
355
- " <td>15781301846649213</td>\n",
356
- " <td>0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f50x09...</td>\n",
357
- " <td>0.7983775743712442891104598770339028</td>\n",
358
  " <td>1</td>\n",
359
- " <td>0.8152123711444691659642000374025623</td>\n",
360
  " <td>...</td>\n",
361
  " <td>quickstart</td>\n",
362
- " <td>1725071760</td>\n",
363
  " <td>False</td>\n",
364
  " <td>0x00000000000000000000000000000000000000000000...</td>\n",
365
- " <td>0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5</td>\n",
366
  " <td>False</td>\n",
367
- " <td>1724976000</td>\n",
368
  " <td>[Yes, No]</td>\n",
369
- " <td>Will the first floating offshore wind research...</td>\n",
370
- " <td>0x0e940f12f30e928e4879c52d065d9da739a3d3f020d1...</td>\n",
371
  " </tr>\n",
372
  " <tr>\n",
373
  " <th>3</th>\n",
374
- " <td>1000000000000000000</td>\n",
375
- " <td>1.000000605383660329048491794939126</td>\n",
376
  " <td>0xe91d153e0b41518a2ce8dd3d7944fa863463a97d</td>\n",
377
- " <td>1724546620</td>\n",
378
- " <td>0x09e9d42a029e8b0c2df3871709a762117a681d92</td>\n",
379
- " <td>20000000000000000</td>\n",
380
- " <td>0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f50x09...</td>\n",
381
- " <td>0.5110745907733438805447072252622708</td>\n",
382
- " <td>1</td>\n",
383
- " <td>0.5746805204222762335911904727318937</td>\n",
384
  " <td>...</td>\n",
385
  " <td>quickstart</td>\n",
386
- " <td>1725071760</td>\n",
387
  " <td>False</td>\n",
388
  " <td>0x00000000000000000000000000000000000000000000...</td>\n",
389
- " <td>0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5</td>\n",
390
  " <td>False</td>\n",
391
- " <td>1724976000</td>\n",
392
  " <td>[Yes, No]</td>\n",
393
- " <td>Will the first floating offshore wind research...</td>\n",
394
- " <td>0x0e940f12f30e928e4879c52d065d9da739a3d3f020d1...</td>\n",
395
  " </tr>\n",
396
  " <tr>\n",
397
  " <th>4</th>\n",
398
- " <td>100000000000000000</td>\n",
399
- " <td>0.1000004271262862419547394646567906</td>\n",
400
  " <td>0xe91d153e0b41518a2ce8dd3d7944fa863463a97d</td>\n",
401
- " <td>1724771260</td>\n",
402
- " <td>0x0d049dcaece0ecb6fc81a460da7bcc2a4785d6e5</td>\n",
403
- " <td>2000000000000000</td>\n",
404
- " <td>0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f50x0d...</td>\n",
405
- " <td>0.2713968218662319388988681987389408</td>\n",
406
  " <td>0</td>\n",
407
- " <td>0.2804586217805511523845593360379658</td>\n",
408
  " <td>...</td>\n",
409
  " <td>quickstart</td>\n",
410
- " <td>1725071760</td>\n",
411
  " <td>False</td>\n",
412
  " <td>0x00000000000000000000000000000000000000000000...</td>\n",
413
- " <td>0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5</td>\n",
414
  " <td>False</td>\n",
415
- " <td>1724976000</td>\n",
416
  " <td>[Yes, No]</td>\n",
417
- " <td>Will the first floating offshore wind research...</td>\n",
418
- " <td>0x0e940f12f30e928e4879c52d065d9da739a3d3f020d1...</td>\n",
419
  " </tr>\n",
420
  " </tbody>\n",
421
  "</table>\n",
@@ -424,53 +421,53 @@
424
  ],
425
  "text/plain": [
426
  " collateralAmount collateralAmountUSD \\\n",
427
- "0 450426474650738688 0.4504269694034145716308073094168006 \n",
428
- "1 610163214546941400 0.6101636232215150135654007337015298 \n",
429
- "2 789065092332460672 0.7890644120527324071908793822796086 \n",
430
- "3 1000000000000000000 1.000000605383660329048491794939126 \n",
431
- "4 100000000000000000 0.1000004271262862419547394646567906 \n",
432
  "\n",
433
  " collateralToken creationTimestamp \\\n",
434
- "0 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d 1724553455 \n",
435
- "1 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d 1724811940 \n",
436
- "2 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d 1724815755 \n",
437
- "3 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d 1724546620 \n",
438
- "4 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d 1724771260 \n",
439
  "\n",
440
  " trader_address feeAmount \\\n",
441
- "0 0x022b36c50b85b8ae7addfb8a35d76c59d5814834 9008529493014773 \n",
442
- "1 0x034c4ad84f7ac6638bf19300d5bbe7d9b981e736 12203264290938828 \n",
443
- "2 0x09e9d42a029e8b0c2df3871709a762117a681d92 15781301846649213 \n",
444
- "3 0x09e9d42a029e8b0c2df3871709a762117a681d92 20000000000000000 \n",
445
- "4 0x0d049dcaece0ecb6fc81a460da7bcc2a4785d6e5 2000000000000000 \n",
446
  "\n",
447
  " id \\\n",
448
- "0 0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f50x02... \n",
449
- "1 0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f50x03... \n",
450
- "2 0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f50x09... \n",
451
- "3 0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f50x09... \n",
452
- "4 0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f50x0d... \n",
453
  "\n",
454
  " oldOutcomeTokenMarginalPrice outcomeIndex \\\n",
455
- "0 0.592785210609610270634125335572129 1 \n",
456
- "1 0.842992636523755061934822129394812 1 \n",
457
- "2 0.7983775743712442891104598770339028 1 \n",
458
- "3 0.5110745907733438805447072252622708 1 \n",
459
- "4 0.2713968218662319388988681987389408 0 \n",
460
  "\n",
461
  " outcomeTokenMarginalPrice ... market_creator \\\n",
462
- "0 0.6171295391012242250994586583534301 ... quickstart \n",
463
- "1 0.8523396372892128845826889719620915 ... quickstart \n",
464
- "2 0.8152123711444691659642000374025623 ... quickstart \n",
465
- "3 0.5746805204222762335911904727318937 ... quickstart \n",
466
- "4 0.2804586217805511523845593360379658 ... quickstart \n",
467
  "\n",
468
  " fpmm.answerFinalizedTimestamp fpmm.arbitrationOccurred \\\n",
469
- "0 1725071760 False \n",
470
- "1 1725071760 False \n",
471
- "2 1725071760 False \n",
472
- "3 1725071760 False \n",
473
- "4 1725071760 False \n",
474
  "\n",
475
  " fpmm.currentAnswer \\\n",
476
  "0 0x00000000000000000000000000000000000000000000... \n",
@@ -480,37 +477,37 @@
480
  "4 0x00000000000000000000000000000000000000000000... \n",
481
  "\n",
482
  " fpmm.id fpmm.isPendingArbitration \\\n",
483
- "0 0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5 False \n",
484
- "1 0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5 False \n",
485
- "2 0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5 False \n",
486
- "3 0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5 False \n",
487
- "4 0x0017cd58d6a7ee1451388c7d5b1051b4c0a041f5 False \n",
488
  "\n",
489
  " fpmm.openingTimestamp fpmm.outcomes \\\n",
490
- "0 1724976000 [Yes, No] \n",
491
- "1 1724976000 [Yes, No] \n",
492
- "2 1724976000 [Yes, No] \n",
493
- "3 1724976000 [Yes, No] \n",
494
- "4 1724976000 [Yes, No] \n",
495
  "\n",
496
  " fpmm.title \\\n",
497
- "0 Will the first floating offshore wind research... \n",
498
- "1 Will the first floating offshore wind research... \n",
499
- "2 Will the first floating offshore wind research... \n",
500
- "3 Will the first floating offshore wind research... \n",
501
- "4 Will the first floating offshore wind research... \n",
502
  "\n",
503
  " fpmm.condition.id \n",
504
- "0 0x0e940f12f30e928e4879c52d065d9da739a3d3f020d1... \n",
505
- "1 0x0e940f12f30e928e4879c52d065d9da739a3d3f020d1... \n",
506
- "2 0x0e940f12f30e928e4879c52d065d9da739a3d3f020d1... \n",
507
- "3 0x0e940f12f30e928e4879c52d065d9da739a3d3f020d1... \n",
508
- "4 0x0e940f12f30e928e4879c52d065d9da739a3d3f020d1... \n",
509
  "\n",
510
  "[5 rows x 24 columns]"
511
  ]
512
  },
513
- "execution_count": 7,
514
  "metadata": {},
515
  "output_type": "execute_result"
516
  }
@@ -1107,7 +1104,7 @@
1107
  },
1108
  {
1109
  "cell_type": "code",
1110
- "execution_count": 75,
1111
  "metadata": {},
1112
  "outputs": [
1113
  {
@@ -1139,92 +1136,21 @@
1139
  " <th>first_outcome_prob</th>\n",
1140
  " <th>second_outcome_prob</th>\n",
1141
  " <th>kl_divergence</th>\n",
 
1142
  " </tr>\n",
1143
  " </thead>\n",
1144
  " <tbody>\n",
1145
- " <tr>\n",
1146
- " <th>0</th>\n",
1147
- " <td>yes</td>\n",
1148
- " <td>0x67490193504b49a247d6a3ba7d441e9894d9615f</td>\n",
1149
- " <td>1722470400</td>\n",
1150
- " <td>quickstart</td>\n",
1151
- " <td>2024-08-01 02:00:00</td>\n",
1152
- " <td>0.8145</td>\n",
1153
- " <td>0.1855</td>\n",
1154
- " <td>3.791664</td>\n",
1155
- " </tr>\n",
1156
- " <tr>\n",
1157
- " <th>1</th>\n",
1158
- " <td>no</td>\n",
1159
- " <td>0x17f2c97bf52a79671878201bf2995a3b6daba041</td>\n",
1160
- " <td>1722470400</td>\n",
1161
- " <td>quickstart</td>\n",
1162
- " <td>2024-08-01 02:00:00</td>\n",
1163
- " <td>0.1975</td>\n",
1164
- " <td>0.8025</td>\n",
1165
- " <td>4.050688</td>\n",
1166
- " </tr>\n",
1167
- " <tr>\n",
1168
- " <th>2</th>\n",
1169
- " <td>no</td>\n",
1170
- " <td>0xbca6aa704a02a5c5a766ff829dacc81aee5547cf</td>\n",
1171
- " <td>1722470400</td>\n",
1172
- " <td>quickstart</td>\n",
1173
- " <td>2024-08-01 02:00:00</td>\n",
1174
- " <td>0.6969</td>\n",
1175
- " <td>0.3031</td>\n",
1176
- " <td>15.433247</td>\n",
1177
- " </tr>\n",
1178
- " <tr>\n",
1179
- " <th>3</th>\n",
1180
- " <td>no</td>\n",
1181
- " <td>0x221c71bab604691b0b8805c1c433fc8e22123a67</td>\n",
1182
- " <td>1722470400</td>\n",
1183
- " <td>pearl</td>\n",
1184
- " <td>2024-08-01 02:00:00</td>\n",
1185
- " <td>0.4757</td>\n",
1186
- " <td>0.5243</td>\n",
1187
- " <td>10.261432</td>\n",
1188
- " </tr>\n",
1189
- " <tr>\n",
1190
- " <th>4</th>\n",
1191
- " <td>no</td>\n",
1192
- " <td>0xe4d078b9be12319c0063f58dc10f19604a5df163</td>\n",
1193
- " <td>1722470400</td>\n",
1194
- " <td>quickstart</td>\n",
1195
- " <td>2024-08-01 02:00:00</td>\n",
1196
- " <td>0.3473</td>\n",
1197
- " <td>0.6527</td>\n",
1198
- " <td>7.351119</td>\n",
1199
- " </tr>\n",
1200
  " </tbody>\n",
1201
  "</table>\n",
1202
  "</div>"
1203
  ],
1204
  "text/plain": [
1205
- " currentAnswer id openingTimestamp \\\n",
1206
- "0 yes 0x67490193504b49a247d6a3ba7d441e9894d9615f 1722470400 \n",
1207
- "1 no 0x17f2c97bf52a79671878201bf2995a3b6daba041 1722470400 \n",
1208
- "2 no 0xbca6aa704a02a5c5a766ff829dacc81aee5547cf 1722470400 \n",
1209
- "3 no 0x221c71bab604691b0b8805c1c433fc8e22123a67 1722470400 \n",
1210
- "4 no 0xe4d078b9be12319c0063f58dc10f19604a5df163 1722470400 \n",
1211
- "\n",
1212
- " market_creator opening_datetime first_outcome_prob second_outcome_prob \\\n",
1213
- "0 quickstart 2024-08-01 02:00:00 0.8145 0.1855 \n",
1214
- "1 quickstart 2024-08-01 02:00:00 0.1975 0.8025 \n",
1215
- "2 quickstart 2024-08-01 02:00:00 0.6969 0.3031 \n",
1216
- "3 pearl 2024-08-01 02:00:00 0.4757 0.5243 \n",
1217
- "4 quickstart 2024-08-01 02:00:00 0.3473 0.6527 \n",
1218
- "\n",
1219
- " kl_divergence \n",
1220
- "0 3.791664 \n",
1221
- "1 4.050688 \n",
1222
- "2 15.433247 \n",
1223
- "3 10.261432 \n",
1224
- "4 7.351119 "
1225
  ]
1226
  },
1227
- "execution_count": 75,
1228
  "metadata": {},
1229
  "output_type": "execute_result"
1230
  }
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 1,
6
  "metadata": {},
7
  "outputs": [],
8
  "source": [
 
11
  },
12
  {
13
  "cell_type": "code",
14
+ "execution_count": 3,
15
  "metadata": {},
16
+ "outputs": [
17
+ {
18
+ "name": "stdout",
19
+ "output_type": "stream",
20
+ "text": [
21
+ "Error reading the parquet file\n"
22
+ ]
23
+ }
24
+ ],
25
  "source": [
26
  "try:\n",
27
  " markets = pd.read_parquet(\"../data/fpmms.parquet\")\n",
28
  "except Exception:\n",
29
  " print(\"Error reading the parquet file\")\n",
30
  "\n",
31
+ "# markets[\"currentAnswer\"] = markets[\"currentAnswer\"].apply(lambda x: x.lower())\n",
32
+ "# # filter only markets with yes, no answers\n",
33
+ "# valid_answers = [\"yes\", \"no\"]\n",
34
+ "# markets = markets.loc[markets[\"currentAnswer\"].isin(valid_answers)]"
35
  ]
36
  },
37
  {
38
  "cell_type": "code",
39
+ "execution_count": 4,
40
  "metadata": {},
41
  "outputs": [],
42
  "source": [
 
48
  },
49
  {
50
  "cell_type": "code",
51
+ "execution_count": 5,
52
  "metadata": {},
53
  "outputs": [
54
  {
 
56
  "output_type": "stream",
57
  "text": [
58
  "<class 'pandas.core.frame.DataFrame'>\n",
59
+ "RangeIndex: 85876 entries, 0 to 85875\n",
60
  "Data columns (total 24 columns):\n",
61
  " # Column Non-Null Count Dtype \n",
62
  "--- ------ -------------- ----- \n",
63
+ " 0 collateralAmount 85876 non-null object\n",
64
+ " 1 collateralAmountUSD 85876 non-null object\n",
65
+ " 2 collateralToken 85876 non-null object\n",
66
+ " 3 creationTimestamp 85876 non-null object\n",
67
+ " 4 trader_address 85876 non-null object\n",
68
+ " 5 feeAmount 85876 non-null object\n",
69
+ " 6 id 85876 non-null object\n",
70
+ " 7 oldOutcomeTokenMarginalPrice 85876 non-null object\n",
71
+ " 8 outcomeIndex 85876 non-null object\n",
72
+ " 9 outcomeTokenMarginalPrice 85876 non-null object\n",
73
+ " 10 outcomeTokensTraded 85876 non-null object\n",
74
+ " 11 title 85876 non-null object\n",
75
+ " 12 transactionHash 85876 non-null object\n",
76
+ " 13 type 85876 non-null object\n",
77
+ " 14 market_creator 85876 non-null object\n",
78
+ " 15 fpmm.answerFinalizedTimestamp 54399 non-null object\n",
79
+ " 16 fpmm.arbitrationOccurred 85876 non-null bool \n",
80
+ " 17 fpmm.currentAnswer 54399 non-null object\n",
81
+ " 18 fpmm.id 85876 non-null object\n",
82
+ " 19 fpmm.isPendingArbitration 85876 non-null bool \n",
83
+ " 20 fpmm.openingTimestamp 85876 non-null object\n",
84
+ " 21 fpmm.outcomes 85876 non-null object\n",
85
+ " 22 fpmm.title 85876 non-null object\n",
86
+ " 23 fpmm.condition.id 85876 non-null object\n",
87
  "dtypes: bool(2), object(22)\n",
88
+ "memory usage: 14.6+ MB\n"
89
  ]
90
  }
91
  ],
 
95
  },
96
  {
97
  "cell_type": "code",
98
+ "execution_count": 6,
99
  "metadata": {},
100
  "outputs": [
101
  {
 
113
  " dtype='object')"
114
  ]
115
  },
116
+ "execution_count": 6,
117
  "metadata": {},
118
  "output_type": "execute_result"
119
  }
 
124
  },
125
  {
126
  "cell_type": "code",
127
+ "execution_count": null,
128
  "metadata": {},
129
+ "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
130
  "source": [
131
  "len(markets.id.unique())"
132
  ]
 
237
  },
238
  {
239
  "cell_type": "code",
240
+ "execution_count": 8,
241
  "metadata": {},
242
  "outputs": [],
243
  "source": [
 
246
  },
247
  {
248
  "cell_type": "code",
249
+ "execution_count": 9,
250
  "metadata": {},
251
  "outputs": [
252
  {
 
296
  " <tbody>\n",
297
  " <tr>\n",
298
  " <th>0</th>\n",
299
+ " <td>930596765045617408</td>\n",
300
+ " <td>0.9305977993411753386434828033666473</td>\n",
301
  " <td>0xe91d153e0b41518a2ce8dd3d7944fa863463a97d</td>\n",
302
+ " <td>1728596605</td>\n",
303
+ " <td>0x01274796ce41aa8e8312e05a427ffb4b0d2148f6</td>\n",
304
+ " <td>9305967650456174</td>\n",
305
+ " <td>0x007068173910cf8719b6f2e66a18b6825c9dde820x01...</td>\n",
306
+ " <td>0.5581119797629801968338361802418564</td>\n",
307
+ " <td>0</td>\n",
308
+ " <td>0.611825749650855211231211687533889</td>\n",
309
  " <td>...</td>\n",
310
  " <td>quickstart</td>\n",
311
+ " <td>1728822710</td>\n",
312
  " <td>False</td>\n",
313
  " <td>0x00000000000000000000000000000000000000000000...</td>\n",
314
+ " <td>0x007068173910cf8719b6f2e66a18b6825c9dde82</td>\n",
315
  " <td>False</td>\n",
316
+ " <td>1728691200</td>\n",
317
  " <td>[Yes, No]</td>\n",
318
+ " <td>Will the emergency public warning tests planne...</td>\n",
319
+ " <td>0xa610166e379c42404bd27bf12a16119fdb5171990c3e...</td>\n",
320
  " </tr>\n",
321
  " <tr>\n",
322
  " <th>1</th>\n",
323
+ " <td>1033247234796193800</td>\n",
324
+ " <td>1.033250126003339493791032993674525</td>\n",
325
  " <td>0xe91d153e0b41518a2ce8dd3d7944fa863463a97d</td>\n",
326
+ " <td>1728505575</td>\n",
327
  " <td>0x034c4ad84f7ac6638bf19300d5bbe7d9b981e736</td>\n",
328
+ " <td>10332472347961938</td>\n",
329
+ " <td>0x007068173910cf8719b6f2e66a18b6825c9dde820x03...</td>\n",
330
+ " <td>0.6602089902983034451244461308090707</td>\n",
331
+ " <td>0</td>\n",
332
+ " <td>0.7034159692833852946883644485233207</td>\n",
333
  " <td>...</td>\n",
334
  " <td>quickstart</td>\n",
335
+ " <td>1728822710</td>\n",
336
  " <td>False</td>\n",
337
  " <td>0x00000000000000000000000000000000000000000000...</td>\n",
338
+ " <td>0x007068173910cf8719b6f2e66a18b6825c9dde82</td>\n",
339
  " <td>False</td>\n",
340
+ " <td>1728691200</td>\n",
341
  " <td>[Yes, No]</td>\n",
342
+ " <td>Will the emergency public warning tests planne...</td>\n",
343
+ " <td>0xa610166e379c42404bd27bf12a16119fdb5171990c3e...</td>\n",
344
  " </tr>\n",
345
  " <tr>\n",
346
  " <th>2</th>\n",
347
+ " <td>1206692368842898300</td>\n",
348
+ " <td>1.206691596248187968367063717078884</td>\n",
349
  " <td>0xe91d153e0b41518a2ce8dd3d7944fa863463a97d</td>\n",
350
+ " <td>1728562895</td>\n",
351
+ " <td>0x05e8bbdb89c84a14d05194bbbae81caf2340db72</td>\n",
352
+ " <td>12066923688428983</td>\n",
353
+ " <td>0x007068173910cf8719b6f2e66a18b6825c9dde820x05...</td>\n",
354
+ " <td>0.1931459183043721864309864210684546</td>\n",
355
  " <td>1</td>\n",
356
+ " <td>0.3033804066591317111055858533563476</td>\n",
357
  " <td>...</td>\n",
358
  " <td>quickstart</td>\n",
359
+ " <td>1728822710</td>\n",
360
  " <td>False</td>\n",
361
  " <td>0x00000000000000000000000000000000000000000000...</td>\n",
362
+ " <td>0x007068173910cf8719b6f2e66a18b6825c9dde82</td>\n",
363
  " <td>False</td>\n",
364
+ " <td>1728691200</td>\n",
365
  " <td>[Yes, No]</td>\n",
366
+ " <td>Will the emergency public warning tests planne...</td>\n",
367
+ " <td>0xa610166e379c42404bd27bf12a16119fdb5171990c3e...</td>\n",
368
  " </tr>\n",
369
  " <tr>\n",
370
  " <th>3</th>\n",
371
+ " <td>930598203274544384</td>\n",
372
+ " <td>0.9305992375717008091217928729793422</td>\n",
373
  " <td>0xe91d153e0b41518a2ce8dd3d7944fa863463a97d</td>\n",
374
+ " <td>1728596645</td>\n",
375
+ " <td>0x17c17ca981b7e244d0bad80b632a082dc1db36e5</td>\n",
376
+ " <td>9305982032745443</td>\n",
377
+ " <td>0x007068173910cf8719b6f2e66a18b6825c9dde820x17...</td>\n",
378
+ " <td>0.611825749650855211231211687533889</td>\n",
379
+ " <td>0</td>\n",
380
+ " <td>0.6579972404391247884756597316198778</td>\n",
381
  " <td>...</td>\n",
382
  " <td>quickstart</td>\n",
383
+ " <td>1728822710</td>\n",
384
  " <td>False</td>\n",
385
  " <td>0x00000000000000000000000000000000000000000000...</td>\n",
386
+ " <td>0x007068173910cf8719b6f2e66a18b6825c9dde82</td>\n",
387
  " <td>False</td>\n",
388
+ " <td>1728691200</td>\n",
389
  " <td>[Yes, No]</td>\n",
390
+ " <td>Will the emergency public warning tests planne...</td>\n",
391
+ " <td>0xa610166e379c42404bd27bf12a16119fdb5171990c3e...</td>\n",
392
  " </tr>\n",
393
  " <tr>\n",
394
  " <th>4</th>\n",
395
+ " <td>1798695965102918400</td>\n",
396
+ " <td>1.798696795931342313936125782275225</td>\n",
397
  " <td>0xe91d153e0b41518a2ce8dd3d7944fa863463a97d</td>\n",
398
+ " <td>1728337780</td>\n",
399
+ " <td>0x1d942103400c1f1657dcbffd5e08904787ea936b</td>\n",
400
+ " <td>17986959651029184</td>\n",
401
+ " <td>0x007068173910cf8719b6f2e66a18b6825c9dde820x1d...</td>\n",
402
+ " <td>0.7636157369419787681755577286755703</td>\n",
403
  " <td>0</td>\n",
404
+ " <td>0.8080447772492735383356100969932859</td>\n",
405
  " <td>...</td>\n",
406
  " <td>quickstart</td>\n",
407
+ " <td>1728822710</td>\n",
408
  " <td>False</td>\n",
409
  " <td>0x00000000000000000000000000000000000000000000...</td>\n",
410
+ " <td>0x007068173910cf8719b6f2e66a18b6825c9dde82</td>\n",
411
  " <td>False</td>\n",
412
+ " <td>1728691200</td>\n",
413
  " <td>[Yes, No]</td>\n",
414
+ " <td>Will the emergency public warning tests planne...</td>\n",
415
+ " <td>0xa610166e379c42404bd27bf12a16119fdb5171990c3e...</td>\n",
416
  " </tr>\n",
417
  " </tbody>\n",
418
  "</table>\n",
 
421
  ],
422
  "text/plain": [
423
  " collateralAmount collateralAmountUSD \\\n",
424
+ "0 930596765045617408 0.9305977993411753386434828033666473 \n",
425
+ "1 1033247234796193800 1.033250126003339493791032993674525 \n",
426
+ "2 1206692368842898300 1.206691596248187968367063717078884 \n",
427
+ "3 930598203274544384 0.9305992375717008091217928729793422 \n",
428
+ "4 1798695965102918400 1.798696795931342313936125782275225 \n",
429
  "\n",
430
  " collateralToken creationTimestamp \\\n",
431
+ "0 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d 1728596605 \n",
432
+ "1 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d 1728505575 \n",
433
+ "2 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d 1728562895 \n",
434
+ "3 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d 1728596645 \n",
435
+ "4 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d 1728337780 \n",
436
  "\n",
437
  " trader_address feeAmount \\\n",
438
+ "0 0x01274796ce41aa8e8312e05a427ffb4b0d2148f6 9305967650456174 \n",
439
+ "1 0x034c4ad84f7ac6638bf19300d5bbe7d9b981e736 10332472347961938 \n",
440
+ "2 0x05e8bbdb89c84a14d05194bbbae81caf2340db72 12066923688428983 \n",
441
+ "3 0x17c17ca981b7e244d0bad80b632a082dc1db36e5 9305982032745443 \n",
442
+ "4 0x1d942103400c1f1657dcbffd5e08904787ea936b 17986959651029184 \n",
443
  "\n",
444
  " id \\\n",
445
+ "0 0x007068173910cf8719b6f2e66a18b6825c9dde820x01... \n",
446
+ "1 0x007068173910cf8719b6f2e66a18b6825c9dde820x03... \n",
447
+ "2 0x007068173910cf8719b6f2e66a18b6825c9dde820x05... \n",
448
+ "3 0x007068173910cf8719b6f2e66a18b6825c9dde820x17... \n",
449
+ "4 0x007068173910cf8719b6f2e66a18b6825c9dde820x1d... \n",
450
  "\n",
451
  " oldOutcomeTokenMarginalPrice outcomeIndex \\\n",
452
+ "0 0.5581119797629801968338361802418564 0 \n",
453
+ "1 0.6602089902983034451244461308090707 0 \n",
454
+ "2 0.1931459183043721864309864210684546 1 \n",
455
+ "3 0.611825749650855211231211687533889 0 \n",
456
+ "4 0.7636157369419787681755577286755703 0 \n",
457
  "\n",
458
  " outcomeTokenMarginalPrice ... market_creator \\\n",
459
+ "0 0.611825749650855211231211687533889 ... quickstart \n",
460
+ "1 0.7034159692833852946883644485233207 ... quickstart \n",
461
+ "2 0.3033804066591317111055858533563476 ... quickstart \n",
462
+ "3 0.6579972404391247884756597316198778 ... quickstart \n",
463
+ "4 0.8080447772492735383356100969932859 ... quickstart \n",
464
  "\n",
465
  " fpmm.answerFinalizedTimestamp fpmm.arbitrationOccurred \\\n",
466
+ "0 1728822710 False \n",
467
+ "1 1728822710 False \n",
468
+ "2 1728822710 False \n",
469
+ "3 1728822710 False \n",
470
+ "4 1728822710 False \n",
471
  "\n",
472
  " fpmm.currentAnswer \\\n",
473
  "0 0x00000000000000000000000000000000000000000000... \n",
 
477
  "4 0x00000000000000000000000000000000000000000000... \n",
478
  "\n",
479
  " fpmm.id fpmm.isPendingArbitration \\\n",
480
+ "0 0x007068173910cf8719b6f2e66a18b6825c9dde82 False \n",
481
+ "1 0x007068173910cf8719b6f2e66a18b6825c9dde82 False \n",
482
+ "2 0x007068173910cf8719b6f2e66a18b6825c9dde82 False \n",
483
+ "3 0x007068173910cf8719b6f2e66a18b6825c9dde82 False \n",
484
+ "4 0x007068173910cf8719b6f2e66a18b6825c9dde82 False \n",
485
  "\n",
486
  " fpmm.openingTimestamp fpmm.outcomes \\\n",
487
+ "0 1728691200 [Yes, No] \n",
488
+ "1 1728691200 [Yes, No] \n",
489
+ "2 1728691200 [Yes, No] \n",
490
+ "3 1728691200 [Yes, No] \n",
491
+ "4 1728691200 [Yes, No] \n",
492
  "\n",
493
  " fpmm.title \\\n",
494
+ "0 Will the emergency public warning tests planne... \n",
495
+ "1 Will the emergency public warning tests planne... \n",
496
+ "2 Will the emergency public warning tests planne... \n",
497
+ "3 Will the emergency public warning tests planne... \n",
498
+ "4 Will the emergency public warning tests planne... \n",
499
  "\n",
500
  " fpmm.condition.id \n",
501
+ "0 0xa610166e379c42404bd27bf12a16119fdb5171990c3e... \n",
502
+ "1 0xa610166e379c42404bd27bf12a16119fdb5171990c3e... \n",
503
+ "2 0xa610166e379c42404bd27bf12a16119fdb5171990c3e... \n",
504
+ "3 0xa610166e379c42404bd27bf12a16119fdb5171990c3e... \n",
505
+ "4 0xa610166e379c42404bd27bf12a16119fdb5171990c3e... \n",
506
  "\n",
507
  "[5 rows x 24 columns]"
508
  ]
509
  },
510
+ "execution_count": 9,
511
  "metadata": {},
512
  "output_type": "execute_result"
513
  }
 
1104
  },
1105
  {
1106
  "cell_type": "code",
1107
+ "execution_count": 10,
1108
  "metadata": {},
1109
  "outputs": [
1110
  {
 
1136
  " <th>first_outcome_prob</th>\n",
1137
  " <th>second_outcome_prob</th>\n",
1138
  " <th>kl_divergence</th>\n",
1139
+ " <th>off_by_perc</th>\n",
1140
  " </tr>\n",
1141
  " </thead>\n",
1142
  " <tbody>\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1143
  " </tbody>\n",
1144
  "</table>\n",
1145
  "</div>"
1146
  ],
1147
  "text/plain": [
1148
+ "Empty DataFrame\n",
1149
+ "Columns: [currentAnswer, id, openingTimestamp, market_creator, opening_datetime, first_outcome_prob, second_outcome_prob, kl_divergence, off_by_perc]\n",
1150
+ "Index: []"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1151
  ]
1152
  },
1153
+ "execution_count": 10,
1154
  "metadata": {},
1155
  "output_type": "execute_result"
1156
  }
notebooks/daily_data.ipynb CHANGED
@@ -231,33 +231,33 @@
231
  "output_type": "stream",
232
  "text": [
233
  "<class 'pandas.core.frame.DataFrame'>\n",
234
- "RangeIndex: 3882 entries, 0 to 3881\n",
235
  "Data columns (total 21 columns):\n",
236
  " # Column Non-Null Count Dtype \n",
237
  "--- ------ -------------- ----- \n",
238
- " 0 trader_address 3882 non-null object \n",
239
- " 1 market_creator 3882 non-null object \n",
240
- " 2 trade_id 3882 non-null object \n",
241
- " 3 creation_timestamp 3882 non-null datetime64[ns, UTC]\n",
242
- " 4 title 3882 non-null object \n",
243
- " 5 market_status 3882 non-null object \n",
244
- " 6 collateral_amount 3882 non-null float64 \n",
245
- " 7 outcome_index 3882 non-null object \n",
246
- " 8 trade_fee_amount 3882 non-null float64 \n",
247
- " 9 outcomes_tokens_traded 3882 non-null float64 \n",
248
- " 10 current_answer 0 non-null object \n",
249
- " 11 is_invalid 3882 non-null bool \n",
250
- " 12 winning_trade 0 non-null object \n",
251
- " 13 earnings 3882 non-null float64 \n",
252
- " 14 redeemed 3882 non-null bool \n",
253
- " 15 redeemed_amount 3882 non-null int64 \n",
254
- " 16 num_mech_calls 3882 non-null int64 \n",
255
- " 17 mech_fee_amount 3882 non-null float64 \n",
256
- " 18 net_earnings 3882 non-null float64 \n",
257
- " 19 roi 3882 non-null float64 \n",
258
- " 20 staking 3882 non-null object \n",
259
- "dtypes: bool(2), datetime64[ns, UTC](1), float64(7), int64(2), object(9)\n",
260
- "memory usage: 583.9+ KB\n"
261
  ]
262
  }
263
  ],
@@ -293,16 +293,16 @@
293
  },
294
  {
295
  "cell_type": "code",
296
- "execution_count": 23,
297
  "metadata": {},
298
  "outputs": [
299
  {
300
  "data": {
301
  "text/plain": [
302
- "Timestamp('2024-11-26 10:19:30+0000', tz='UTC')"
303
  ]
304
  },
305
- "execution_count": 23,
306
  "metadata": {},
307
  "output_type": "execute_result"
308
  }
 
231
  "output_type": "stream",
232
  "text": [
233
  "<class 'pandas.core.frame.DataFrame'>\n",
234
+ "RangeIndex: 9841 entries, 0 to 9840\n",
235
  "Data columns (total 21 columns):\n",
236
  " # Column Non-Null Count Dtype \n",
237
  "--- ------ -------------- ----- \n",
238
+ " 0 trader_address 9841 non-null object \n",
239
+ " 1 market_creator 9841 non-null object \n",
240
+ " 2 trade_id 9841 non-null object \n",
241
+ " 3 creation_timestamp 9841 non-null datetime64[ns, UTC]\n",
242
+ " 4 title 9841 non-null object \n",
243
+ " 5 market_status 9841 non-null object \n",
244
+ " 6 collateral_amount 9841 non-null float64 \n",
245
+ " 7 outcome_index 9841 non-null object \n",
246
+ " 8 trade_fee_amount 9841 non-null float64 \n",
247
+ " 9 outcomes_tokens_traded 9841 non-null float64 \n",
248
+ " 10 current_answer 1080 non-null float64 \n",
249
+ " 11 is_invalid 9841 non-null bool \n",
250
+ " 12 winning_trade 1080 non-null object \n",
251
+ " 13 earnings 9841 non-null float64 \n",
252
+ " 14 redeemed 9841 non-null bool \n",
253
+ " 15 redeemed_amount 9841 non-null int64 \n",
254
+ " 16 num_mech_calls 9841 non-null int64 \n",
255
+ " 17 mech_fee_amount 9841 non-null float64 \n",
256
+ " 18 net_earnings 9841 non-null float64 \n",
257
+ " 19 roi 9841 non-null float64 \n",
258
+ " 20 staking 9841 non-null object \n",
259
+ "dtypes: bool(2), datetime64[ns, UTC](1), float64(8), int64(2), object(8)\n",
260
+ "memory usage: 1.4+ MB\n"
261
  ]
262
  }
263
  ],
 
293
  },
294
  {
295
  "cell_type": "code",
296
+ "execution_count": 5,
297
  "metadata": {},
298
  "outputs": [
299
  {
300
  "data": {
301
  "text/plain": [
302
+ "Timestamp('2024-11-28 13:48:40+0000', tz='UTC')"
303
  ]
304
  },
305
+ "execution_count": 5,
306
  "metadata": {},
307
  "output_type": "execute_result"
308
  }