cyberosa commited on
Commit
352c1c7
·
1 Parent(s): b6e503a

notebooks improvements

Browse files
nbs/confidence_analysis.ipynb DELETED
The diff for this file is too large to render. See raw diff
 
nbs/weekly_analysis.ipynb CHANGED
@@ -50,6 +50,68 @@
50
  "all_trades = pd.read_parquet('../data/all_trades_profitability.parquet')"
51
  ]
52
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  {
54
  "cell_type": "code",
55
  "execution_count": 4,
@@ -128,7 +190,7 @@
128
  },
129
  {
130
  "cell_type": "code",
131
- "execution_count": 7,
132
  "metadata": {},
133
  "outputs": [
134
  {
@@ -175,6 +237,26 @@
175
  "cell_type": "code",
176
  "execution_count": 6,
177
  "metadata": {},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  "outputs": [],
179
  "source": [
180
  "inc_tools = [\n",
@@ -1594,9 +1676,21 @@
1594
  },
1595
  {
1596
  "cell_type": "code",
1597
- "execution_count": null,
1598
  "metadata": {},
1599
- "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
1600
  "source": [
1601
  "del tools\n",
1602
  "del tools_inc\n",
@@ -3981,10 +4075,24 @@
3981
  },
3982
  {
3983
  "cell_type": "code",
3984
- "execution_count": null,
3985
  "metadata": {},
3986
- "outputs": [],
3987
- "source": []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3988
  },
3989
  {
3990
  "cell_type": "code",
 
50
  "all_trades = pd.read_parquet('../data/all_trades_profitability.parquet')"
51
  ]
52
  },
53
+ {
54
+ "cell_type": "code",
55
+ "execution_count": 6,
56
+ "metadata": {},
57
+ "outputs": [
58
+ {
59
+ "name": "stdout",
60
+ "output_type": "stream",
61
+ "text": [
62
+ "<class 'pandas.core.frame.DataFrame'>\n",
63
+ "RangeIndex: 92662 entries, 0 to 92661\n",
64
+ "Data columns (total 19 columns):\n",
65
+ " # Column Non-Null Count Dtype \n",
66
+ "--- ------ -------------- ----- \n",
67
+ " 0 trader_address 92662 non-null object \n",
68
+ " 1 trade_id 92662 non-null object \n",
69
+ " 2 creation_timestamp 92662 non-null datetime64[ns, UTC]\n",
70
+ " 3 title 92662 non-null object \n",
71
+ " 4 market_status 92662 non-null object \n",
72
+ " 5 collateral_amount 92662 non-null float64 \n",
73
+ " 6 outcome_index 92662 non-null object \n",
74
+ " 7 trade_fee_amount 92662 non-null float64 \n",
75
+ " 8 outcomes_tokens_traded 92662 non-null float64 \n",
76
+ " 9 current_answer 92662 non-null int64 \n",
77
+ " 10 is_invalid 92662 non-null bool \n",
78
+ " 11 winning_trade 92662 non-null bool \n",
79
+ " 12 earnings 92662 non-null float64 \n",
80
+ " 13 redeemed 92662 non-null bool \n",
81
+ " 14 redeemed_amount 92662 non-null float64 \n",
82
+ " 15 num_mech_calls 92662 non-null int64 \n",
83
+ " 16 mech_fee_amount 92662 non-null float64 \n",
84
+ " 17 net_earnings 92662 non-null float64 \n",
85
+ " 18 roi 92662 non-null float64 \n",
86
+ "dtypes: bool(3), datetime64[ns, UTC](1), float64(8), int64(2), object(5)\n",
87
+ "memory usage: 11.6+ MB\n"
88
+ ]
89
+ }
90
+ ],
91
+ "source": [
92
+ "all_trades.info()"
93
+ ]
94
+ },
95
+ {
96
+ "cell_type": "code",
97
+ "execution_count": 7,
98
+ "metadata": {},
99
+ "outputs": [
100
+ {
101
+ "data": {
102
+ "text/plain": [
103
+ "Timestamp('2023-07-12 15:17:25+0000', tz='UTC')"
104
+ ]
105
+ },
106
+ "execution_count": 7,
107
+ "metadata": {},
108
+ "output_type": "execute_result"
109
+ }
110
+ ],
111
+ "source": [
112
+ "all_trades.creation_timestamp.min()"
113
+ ]
114
+ },
115
  {
116
  "cell_type": "code",
117
  "execution_count": 4,
 
190
  },
191
  {
192
  "cell_type": "code",
193
+ "execution_count": 5,
194
  "metadata": {},
195
  "outputs": [
196
  {
 
237
  "cell_type": "code",
238
  "execution_count": 6,
239
  "metadata": {},
240
+ "outputs": [
241
+ {
242
+ "data": {
243
+ "text/plain": [
244
+ "'2023-07-12 11:58:40'"
245
+ ]
246
+ },
247
+ "execution_count": 6,
248
+ "metadata": {},
249
+ "output_type": "execute_result"
250
+ }
251
+ ],
252
+ "source": [
253
+ "tools.request_time.min()"
254
+ ]
255
+ },
256
+ {
257
+ "cell_type": "code",
258
+ "execution_count": 4,
259
+ "metadata": {},
260
  "outputs": [],
261
  "source": [
262
  "inc_tools = [\n",
 
1676
  },
1677
  {
1678
  "cell_type": "code",
1679
+ "execution_count": 7,
1680
  "metadata": {},
1681
+ "outputs": [
1682
+ {
1683
+ "ename": "NameError",
1684
+ "evalue": "name 'tools_inc' is not defined",
1685
+ "output_type": "error",
1686
+ "traceback": [
1687
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
1688
+ "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
1689
+ "Cell \u001b[0;32mIn[7], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mdel\u001b[39;00m tools\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mdel\u001b[39;00m \u001b[43mtools_inc\u001b[49m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mdel\u001b[39;00m error\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mdel\u001b[39;00m error_total\n",
1690
+ "\u001b[0;31mNameError\u001b[0m: name 'tools_inc' is not defined"
1691
+ ]
1692
+ }
1693
+ ],
1694
  "source": [
1695
  "del tools\n",
1696
  "del tools_inc\n",
 
4075
  },
4076
  {
4077
  "cell_type": "code",
4078
+ "execution_count": 8,
4079
  "metadata": {},
4080
+ "outputs": [
4081
+ {
4082
+ "data": {
4083
+ "text/plain": [
4084
+ "31"
4085
+ ]
4086
+ },
4087
+ "execution_count": 8,
4088
+ "metadata": {},
4089
+ "output_type": "execute_result"
4090
+ }
4091
+ ],
4092
+ "source": [
4093
+ "del all_trades\n",
4094
+ "gc.collect()"
4095
+ ]
4096
  },
4097
  {
4098
  "cell_type": "code",
nbs/win_probability_analysis.ipynb DELETED
The diff for this file is too large to render. See raw diff