Spaces:
Runtime error
Runtime error
cyberosa
commited on
Commit
Β·
18ab870
1
Parent(s):
f62548d
new daily graphs
Browse files- app.py +95 -46
- data/daily_info.parquet +3 -0
- notebooks/closed_markets.ipynb +75 -115
- notebooks/daily_data.ipynb +430 -0
- notebooks/trader_agent_metrics.ipynb +2 -856
- notebooks/winning_perc.ipynb +9 -215
- scripts/metrics.py +34 -22
- tabs/daily_graphs.py +217 -0
- tabs/trader_plots.py +6 -0
app.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
from datetime import datetime, timedelta
|
| 2 |
import gradio as gr
|
| 3 |
import pandas as pd
|
| 4 |
import duckdb
|
|
@@ -15,11 +14,13 @@ from tabs.trader_plots import (
|
|
| 15 |
plot_trader_daily_metrics_by_market_creator,
|
| 16 |
default_trader_metric,
|
| 17 |
trader_metric_choices,
|
|
|
|
|
|
|
| 18 |
get_metrics_text,
|
| 19 |
plot_winning_metric_per_trader,
|
| 20 |
get_interpretation_text,
|
| 21 |
)
|
| 22 |
-
|
| 23 |
from scripts.utils import get_traders_family
|
| 24 |
from scripts.trades_volume_per_market import plot_weekly_trades_volume_by_trader_family
|
| 25 |
from tabs.market_plots import (
|
|
@@ -66,14 +67,20 @@ def get_all_data():
|
|
| 66 |
df2 = con.execute(query2).fetchdf()
|
| 67 |
logger.info("Got all data from closed_markets_div.parquet")
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
con.close()
|
| 70 |
|
| 71 |
-
return df1, df2
|
| 72 |
|
| 73 |
|
| 74 |
def prepare_data():
|
| 75 |
|
| 76 |
-
all_trades, closed_markets = get_all_data()
|
| 77 |
|
| 78 |
all_trades["creation_date"] = all_trades["creation_timestamp"].dt.date
|
| 79 |
|
|
@@ -88,7 +95,7 @@ def prepare_data():
|
|
| 88 |
trader_agents_data = pd.merge(
|
| 89 |
all_trades, volume_trades_per_trader_and_market, on=["trader_address", "title"]
|
| 90 |
)
|
| 91 |
-
|
| 92 |
# adding the trader family column
|
| 93 |
trader_agents_data["trader_family"] = trader_agents_data.apply(
|
| 94 |
lambda x: get_traders_family(x), axis=1
|
|
@@ -106,28 +113,23 @@ def prepare_data():
|
|
| 106 |
closed_markets["month_year_week"] = (
|
| 107 |
closed_markets["opening_datetime"].dt.to_period("W").dt.strftime("%b-%d")
|
| 108 |
)
|
| 109 |
-
return trader_agents_data, closed_markets
|
| 110 |
|
| 111 |
|
| 112 |
-
trader_agents_data, closed_markets = prepare_data()
|
| 113 |
-
|
| 114 |
-
# print(trader_agents_data.head())
|
| 115 |
demo = gr.Blocks()
|
| 116 |
# get weekly metrics by market creator: qs, pearl or all.
|
| 117 |
weekly_metrics_by_market_creator = compute_weekly_metrics_by_market_creator(
|
| 118 |
trader_agents_data
|
| 119 |
)
|
| 120 |
-
|
| 121 |
-
trader_agents_data
|
| 122 |
-
)
|
| 123 |
weekly_agent_metrics_by_market_creator = compute_weekly_metrics_by_market_creator(
|
| 124 |
trader_agents_data, trader_filter="agent"
|
| 125 |
)
|
| 126 |
weekly_non_agent_metrics_by_market_creator = compute_weekly_metrics_by_market_creator(
|
| 127 |
trader_agents_data, trader_filter="non_agent"
|
| 128 |
)
|
| 129 |
-
# print("weekly metrics by market creator")
|
| 130 |
-
# print(weekly_metrics_by_market_creator.head())
|
| 131 |
|
| 132 |
weekly_winning_metrics = compute_winning_metrics_by_trader(
|
| 133 |
trader_agents_data=trader_agents_data
|
|
@@ -237,38 +239,85 @@ with demo:
|
|
| 237 |
inputs=trader_na_details_selector,
|
| 238 |
outputs=na_trader_markets_plot,
|
| 239 |
)
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
|
| 273 |
with gr.TabItem("πClosed Markets KullbackβLeibler divergence"):
|
| 274 |
with gr.Row():
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import pandas as pd
|
| 3 |
import duckdb
|
|
|
|
| 14 |
plot_trader_daily_metrics_by_market_creator,
|
| 15 |
default_trader_metric,
|
| 16 |
trader_metric_choices,
|
| 17 |
+
trade_daily_metric_choices,
|
| 18 |
+
default_daily_metric,
|
| 19 |
get_metrics_text,
|
| 20 |
plot_winning_metric_per_trader,
|
| 21 |
get_interpretation_text,
|
| 22 |
)
|
| 23 |
+
from tabs.daily_graphs import get_current_week_data, plot_daily_metrics
|
| 24 |
from scripts.utils import get_traders_family
|
| 25 |
from scripts.trades_volume_per_market import plot_weekly_trades_volume_by_trader_family
|
| 26 |
from tabs.market_plots import (
|
|
|
|
| 67 |
df2 = con.execute(query2).fetchdf()
|
| 68 |
logger.info("Got all data from closed_markets_div.parquet")
|
| 69 |
|
| 70 |
+
# Query to fetch daily live data
|
| 71 |
+
query3 = f"""
|
| 72 |
+
SELECT *
|
| 73 |
+
FROM read_parquet('./data/daily_info.parquet')
|
| 74 |
+
"""
|
| 75 |
+
df3 = con.execute(query3).fetchdf()
|
| 76 |
con.close()
|
| 77 |
|
| 78 |
+
return df1, df2, df3
|
| 79 |
|
| 80 |
|
| 81 |
def prepare_data():
|
| 82 |
|
| 83 |
+
all_trades, closed_markets, daily_info = get_all_data()
|
| 84 |
|
| 85 |
all_trades["creation_date"] = all_trades["creation_timestamp"].dt.date
|
| 86 |
|
|
|
|
| 95 |
trader_agents_data = pd.merge(
|
| 96 |
all_trades, volume_trades_per_trader_and_market, on=["trader_address", "title"]
|
| 97 |
)
|
| 98 |
+
daily_info["creation_date"] = daily_info["creation_timestamp"].dt.date
|
| 99 |
# adding the trader family column
|
| 100 |
trader_agents_data["trader_family"] = trader_agents_data.apply(
|
| 101 |
lambda x: get_traders_family(x), axis=1
|
|
|
|
| 113 |
closed_markets["month_year_week"] = (
|
| 114 |
closed_markets["opening_datetime"].dt.to_period("W").dt.strftime("%b-%d")
|
| 115 |
)
|
| 116 |
+
return trader_agents_data, closed_markets, daily_info
|
| 117 |
|
| 118 |
|
| 119 |
+
trader_agents_data, closed_markets, daily_info = prepare_data()
|
| 120 |
+
|
|
|
|
| 121 |
demo = gr.Blocks()
|
| 122 |
# get weekly metrics by market creator: qs, pearl or all.
|
| 123 |
weekly_metrics_by_market_creator = compute_weekly_metrics_by_market_creator(
|
| 124 |
trader_agents_data
|
| 125 |
)
|
| 126 |
+
|
|
|
|
|
|
|
| 127 |
weekly_agent_metrics_by_market_creator = compute_weekly_metrics_by_market_creator(
|
| 128 |
trader_agents_data, trader_filter="agent"
|
| 129 |
)
|
| 130 |
weekly_non_agent_metrics_by_market_creator = compute_weekly_metrics_by_market_creator(
|
| 131 |
trader_agents_data, trader_filter="non_agent"
|
| 132 |
)
|
|
|
|
|
|
|
| 133 |
|
| 134 |
weekly_winning_metrics = compute_winning_metrics_by_trader(
|
| 135 |
trader_agents_data=trader_agents_data
|
|
|
|
| 239 |
inputs=trader_na_details_selector,
|
| 240 |
outputs=na_trader_markets_plot,
|
| 241 |
)
|
| 242 |
+
with gr.TabItem("π
Daily trades dashboard (WIP)"):
|
| 243 |
+
current_week_trades = get_current_week_data(trades_df=trader_agents_data)
|
| 244 |
+
live_trades_current_week = get_current_week_data(trades_df=daily_info)
|
| 245 |
+
if len(current_week_trades) > 0:
|
| 246 |
+
daily_prof_metrics_by_market_creator = (
|
| 247 |
+
compute_daily_metrics_by_market_creator(current_week_trades)
|
| 248 |
+
)
|
| 249 |
+
else:
|
| 250 |
+
daily_prof_metrics_by_market_creator = pd.DataFrame()
|
| 251 |
+
live_metrics_by_market_creator = compute_daily_metrics_by_market_creator(
|
| 252 |
+
live_trades_current_week, trader_filter=None, live_metrics=True
|
| 253 |
+
)
|
| 254 |
+
print("live metrics dataframe")
|
| 255 |
+
print(live_metrics_by_market_creator.head())
|
| 256 |
+
with gr.Row():
|
| 257 |
+
gr.Markdown("# Daily live metrics for all trades")
|
| 258 |
+
with gr.Row():
|
| 259 |
+
trade_live_details_selector = gr.Dropdown(
|
| 260 |
+
label="Select a daily live metric",
|
| 261 |
+
choices=trade_daily_metric_choices,
|
| 262 |
+
value=default_daily_metric,
|
| 263 |
+
)
|
| 264 |
+
|
| 265 |
+
with gr.Row():
|
| 266 |
+
with gr.Column(scale=3):
|
| 267 |
+
trade_live_details_plot = plot_daily_metrics(
|
| 268 |
+
metric_name=default_daily_metric,
|
| 269 |
+
trades_df=live_metrics_by_market_creator,
|
| 270 |
+
)
|
| 271 |
+
with gr.Column(scale=1):
|
| 272 |
+
trade_details_text = get_metrics_text()
|
| 273 |
+
|
| 274 |
+
def update_trade_live_details(trade_detail, trade_live_details_plot):
|
| 275 |
+
new_a_plot = plot_daily_metrics(
|
| 276 |
+
metric_name=trade_detail, trades_df=live_metrics_by_market_creator
|
| 277 |
+
)
|
| 278 |
+
return new_a_plot
|
| 279 |
+
|
| 280 |
+
trade_live_details_selector.change(
|
| 281 |
+
update_trade_live_details,
|
| 282 |
+
inputs=[trade_live_details_selector, trade_live_details_plot],
|
| 283 |
+
outputs=[trade_live_details_plot],
|
| 284 |
+
)
|
| 285 |
+
|
| 286 |
+
with gr.Row():
|
| 287 |
+
gr.Markdown("# Daily profitability metrics available for all trades")
|
| 288 |
+
if len(current_week_trades) > 0:
|
| 289 |
+
with gr.Row():
|
| 290 |
+
trader_daily_details_selector = gr.Dropdown(
|
| 291 |
+
label="Select a daily trade metric",
|
| 292 |
+
choices=trader_metric_choices,
|
| 293 |
+
value=default_trader_metric,
|
| 294 |
+
)
|
| 295 |
+
|
| 296 |
+
with gr.Row():
|
| 297 |
+
with gr.Column(scale=3):
|
| 298 |
+
trader_daily_details_plot = plot_daily_metrics(
|
| 299 |
+
metric_name=default_trader_metric,
|
| 300 |
+
trades_df=daily_prof_metrics_by_market_creator,
|
| 301 |
+
)
|
| 302 |
+
with gr.Column(scale=1):
|
| 303 |
+
trader_details_text = get_metrics_text()
|
| 304 |
+
|
| 305 |
+
def update_trader_daily_details(
|
| 306 |
+
trade_detail, trader_daily_details_plot
|
| 307 |
+
):
|
| 308 |
+
new_a_plot = plot_daily_metrics(
|
| 309 |
+
metric_name=trade_detail,
|
| 310 |
+
trades_df=daily_prof_metrics_by_market_creator,
|
| 311 |
+
)
|
| 312 |
+
return new_a_plot
|
| 313 |
+
|
| 314 |
+
trader_daily_details_selector.change(
|
| 315 |
+
update_trader_daily_details,
|
| 316 |
+
inputs=[trader_daily_details_selector, trader_daily_details_plot],
|
| 317 |
+
outputs=[trader_daily_details_plot],
|
| 318 |
+
)
|
| 319 |
+
else:
|
| 320 |
+
gr.Markdown("Data not available yet")
|
| 321 |
|
| 322 |
with gr.TabItem("πClosed Markets KullbackβLeibler divergence"):
|
| 323 |
with gr.Row():
|
data/daily_info.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f41fdb6fc36cf8cb28980bca049de6b4fa986a9800176e269a5259a7e744c514
|
| 3 |
+
size 251792
|
notebooks/closed_markets.ipynb
CHANGED
|
@@ -30,20 +30,88 @@
|
|
| 30 |
"cell_type": "code",
|
| 31 |
"execution_count": 3,
|
| 32 |
"metadata": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
"outputs": [
|
| 34 |
{
|
| 35 |
"data": {
|
| 36 |
"text/plain": [
|
| 37 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
]
|
| 39 |
},
|
| 40 |
-
"execution_count":
|
| 41 |
"metadata": {},
|
| 42 |
"output_type": "execute_result"
|
| 43 |
}
|
| 44 |
],
|
| 45 |
"source": [
|
| 46 |
-
"
|
| 47 |
]
|
| 48 |
},
|
| 49 |
{
|
|
@@ -648,103 +716,9 @@
|
|
| 648 |
},
|
| 649 |
{
|
| 650 |
"cell_type": "code",
|
| 651 |
-
"execution_count":
|
| 652 |
"metadata": {},
|
| 653 |
-
"outputs": [
|
| 654 |
-
{
|
| 655 |
-
"data": {
|
| 656 |
-
"text/html": [
|
| 657 |
-
"<div>\n",
|
| 658 |
-
"<style scoped>\n",
|
| 659 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 660 |
-
" vertical-align: middle;\n",
|
| 661 |
-
" }\n",
|
| 662 |
-
"\n",
|
| 663 |
-
" .dataframe tbody tr th {\n",
|
| 664 |
-
" vertical-align: top;\n",
|
| 665 |
-
" }\n",
|
| 666 |
-
"\n",
|
| 667 |
-
" .dataframe thead th {\n",
|
| 668 |
-
" text-align: right;\n",
|
| 669 |
-
" }\n",
|
| 670 |
-
"</style>\n",
|
| 671 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 672 |
-
" <thead>\n",
|
| 673 |
-
" <tr style=\"text-align: right;\">\n",
|
| 674 |
-
" <th></th>\n",
|
| 675 |
-
" <th>currentAnswer</th>\n",
|
| 676 |
-
" <th>id</th>\n",
|
| 677 |
-
" <th>openingTimestamp</th>\n",
|
| 678 |
-
" <th>market_creator</th>\n",
|
| 679 |
-
" <th>opening_datetime</th>\n",
|
| 680 |
-
" </tr>\n",
|
| 681 |
-
" </thead>\n",
|
| 682 |
-
" <tbody>\n",
|
| 683 |
-
" <tr>\n",
|
| 684 |
-
" <th>15736</th>\n",
|
| 685 |
-
" <td>NaN</td>\n",
|
| 686 |
-
" <td>0x92ed80e541f642b564f992245abe640282dd273c</td>\n",
|
| 687 |
-
" <td>1727568000</td>\n",
|
| 688 |
-
" <td>quickstart</td>\n",
|
| 689 |
-
" <td>2024-09-29 02:00:00</td>\n",
|
| 690 |
-
" </tr>\n",
|
| 691 |
-
" <tr>\n",
|
| 692 |
-
" <th>6272</th>\n",
|
| 693 |
-
" <td>NaN</td>\n",
|
| 694 |
-
" <td>0x4002481fe7bc39c1baa4b5988c038da13ed05832</td>\n",
|
| 695 |
-
" <td>1727568000</td>\n",
|
| 696 |
-
" <td>quickstart</td>\n",
|
| 697 |
-
" <td>2024-09-29 02:00:00</td>\n",
|
| 698 |
-
" </tr>\n",
|
| 699 |
-
" <tr>\n",
|
| 700 |
-
" <th>24383</th>\n",
|
| 701 |
-
" <td>NaN</td>\n",
|
| 702 |
-
" <td>0xf820d06509027c309b00cd386055982d9bea0c10</td>\n",
|
| 703 |
-
" <td>1727568000</td>\n",
|
| 704 |
-
" <td>quickstart</td>\n",
|
| 705 |
-
" <td>2024-09-29 02:00:00</td>\n",
|
| 706 |
-
" </tr>\n",
|
| 707 |
-
" <tr>\n",
|
| 708 |
-
" <th>12418</th>\n",
|
| 709 |
-
" <td>NaN</td>\n",
|
| 710 |
-
" <td>0x74e0fa941341ebe980fbdcfa8b40244cb448eb56</td>\n",
|
| 711 |
-
" <td>1727568000</td>\n",
|
| 712 |
-
" <td>quickstart</td>\n",
|
| 713 |
-
" <td>2024-09-29 02:00:00</td>\n",
|
| 714 |
-
" </tr>\n",
|
| 715 |
-
" <tr>\n",
|
| 716 |
-
" <th>4754</th>\n",
|
| 717 |
-
" <td>NaN</td>\n",
|
| 718 |
-
" <td>0x2f44e179b5cc964e504046bac31d6945a0652af2</td>\n",
|
| 719 |
-
" <td>1727568000</td>\n",
|
| 720 |
-
" <td>quickstart</td>\n",
|
| 721 |
-
" <td>2024-09-29 02:00:00</td>\n",
|
| 722 |
-
" </tr>\n",
|
| 723 |
-
" </tbody>\n",
|
| 724 |
-
"</table>\n",
|
| 725 |
-
"</div>"
|
| 726 |
-
],
|
| 727 |
-
"text/plain": [
|
| 728 |
-
" currentAnswer id \\\n",
|
| 729 |
-
"15736 NaN 0x92ed80e541f642b564f992245abe640282dd273c \n",
|
| 730 |
-
"6272 NaN 0x4002481fe7bc39c1baa4b5988c038da13ed05832 \n",
|
| 731 |
-
"24383 NaN 0xf820d06509027c309b00cd386055982d9bea0c10 \n",
|
| 732 |
-
"12418 NaN 0x74e0fa941341ebe980fbdcfa8b40244cb448eb56 \n",
|
| 733 |
-
"4754 NaN 0x2f44e179b5cc964e504046bac31d6945a0652af2 \n",
|
| 734 |
-
"\n",
|
| 735 |
-
" openingTimestamp market_creator opening_datetime \n",
|
| 736 |
-
"15736 1727568000 quickstart 2024-09-29 02:00:00 \n",
|
| 737 |
-
"6272 1727568000 quickstart 2024-09-29 02:00:00 \n",
|
| 738 |
-
"24383 1727568000 quickstart 2024-09-29 02:00:00 \n",
|
| 739 |
-
"12418 1727568000 quickstart 2024-09-29 02:00:00 \n",
|
| 740 |
-
"4754 1727568000 quickstart 2024-09-29 02:00:00 "
|
| 741 |
-
]
|
| 742 |
-
},
|
| 743 |
-
"execution_count": 52,
|
| 744 |
-
"metadata": {},
|
| 745 |
-
"output_type": "execute_result"
|
| 746 |
-
}
|
| 747 |
-
],
|
| 748 |
"source": [
|
| 749 |
"trade_markets.tail()"
|
| 750 |
]
|
|
@@ -945,23 +919,9 @@
|
|
| 945 |
},
|
| 946 |
{
|
| 947 |
"cell_type": "code",
|
| 948 |
-
"execution_count":
|
| 949 |
"metadata": {},
|
| 950 |
-
"outputs": [
|
| 951 |
-
{
|
| 952 |
-
"data": {
|
| 953 |
-
"text/plain": [
|
| 954 |
-
"currentAnswer\n",
|
| 955 |
-
"0x0000000000000000000000000000000000000000000000000000000000000001 407\n",
|
| 956 |
-
"0x0000000000000000000000000000000000000000000000000000000000000000 241\n",
|
| 957 |
-
"Name: count, dtype: int64"
|
| 958 |
-
]
|
| 959 |
-
},
|
| 960 |
-
"execution_count": 38,
|
| 961 |
-
"metadata": {},
|
| 962 |
-
"output_type": "execute_result"
|
| 963 |
-
}
|
| 964 |
-
],
|
| 965 |
"source": [
|
| 966 |
"trade_markets.currentAnswer.value_counts()"
|
| 967 |
]
|
|
|
|
| 30 |
"cell_type": "code",
|
| 31 |
"execution_count": 3,
|
| 32 |
"metadata": {},
|
| 33 |
+
"outputs": [],
|
| 34 |
+
"source": [
|
| 35 |
+
"try:\n",
|
| 36 |
+
" markets_df = pd.read_parquet(\"../data/fpmmTrades.parquet\")\n",
|
| 37 |
+
"except Exception:\n",
|
| 38 |
+
" print(\"Error reading the parquet file\")"
|
| 39 |
+
]
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"cell_type": "code",
|
| 43 |
+
"execution_count": 4,
|
| 44 |
+
"metadata": {},
|
| 45 |
+
"outputs": [
|
| 46 |
+
{
|
| 47 |
+
"name": "stdout",
|
| 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 |
+
],
|
| 84 |
+
"source": [
|
| 85 |
+
"markets_df.info()"
|
| 86 |
+
]
|
| 87 |
+
},
|
| 88 |
+
{
|
| 89 |
+
"cell_type": "code",
|
| 90 |
+
"execution_count": 5,
|
| 91 |
+
"metadata": {},
|
| 92 |
"outputs": [
|
| 93 |
{
|
| 94 |
"data": {
|
| 95 |
"text/plain": [
|
| 96 |
+
"Index(['collateralAmount', 'collateralAmountUSD', 'collateralToken',\n",
|
| 97 |
+
" 'creationTimestamp', 'trader_address', 'feeAmount', 'id',\n",
|
| 98 |
+
" 'oldOutcomeTokenMarginalPrice', 'outcomeIndex',\n",
|
| 99 |
+
" 'outcomeTokenMarginalPrice', 'outcomeTokensTraded', 'title',\n",
|
| 100 |
+
" 'transactionHash', 'type', 'market_creator',\n",
|
| 101 |
+
" 'fpmm.answerFinalizedTimestamp', 'fpmm.arbitrationOccurred',\n",
|
| 102 |
+
" 'fpmm.currentAnswer', 'fpmm.id', 'fpmm.isPendingArbitration',\n",
|
| 103 |
+
" 'fpmm.openingTimestamp', 'fpmm.outcomes', 'fpmm.title',\n",
|
| 104 |
+
" 'fpmm.condition.id'],\n",
|
| 105 |
+
" dtype='object')"
|
| 106 |
]
|
| 107 |
},
|
| 108 |
+
"execution_count": 5,
|
| 109 |
"metadata": {},
|
| 110 |
"output_type": "execute_result"
|
| 111 |
}
|
| 112 |
],
|
| 113 |
"source": [
|
| 114 |
+
"markets_df.columns"
|
| 115 |
]
|
| 116 |
},
|
| 117 |
{
|
|
|
|
| 716 |
},
|
| 717 |
{
|
| 718 |
"cell_type": "code",
|
| 719 |
+
"execution_count": null,
|
| 720 |
"metadata": {},
|
| 721 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 722 |
"source": [
|
| 723 |
"trade_markets.tail()"
|
| 724 |
]
|
|
|
|
| 919 |
},
|
| 920 |
{
|
| 921 |
"cell_type": "code",
|
| 922 |
+
"execution_count": null,
|
| 923 |
"metadata": {},
|
| 924 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 925 |
"source": [
|
| 926 |
"trade_markets.currentAnswer.value_counts()"
|
| 927 |
]
|
notebooks/daily_data.ipynb
ADDED
|
@@ -0,0 +1,430 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "code",
|
| 5 |
+
"execution_count": 2,
|
| 6 |
+
"metadata": {},
|
| 7 |
+
"outputs": [],
|
| 8 |
+
"source": [
|
| 9 |
+
"import pandas as pd"
|
| 10 |
+
]
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"cell_type": "code",
|
| 14 |
+
"execution_count": 2,
|
| 15 |
+
"metadata": {},
|
| 16 |
+
"outputs": [],
|
| 17 |
+
"source": [
|
| 18 |
+
"all_trades = pd.read_parquet('../data/all_trades_profitability.parquet')"
|
| 19 |
+
]
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"cell_type": "code",
|
| 23 |
+
"execution_count": 3,
|
| 24 |
+
"metadata": {},
|
| 25 |
+
"outputs": [
|
| 26 |
+
{
|
| 27 |
+
"data": {
|
| 28 |
+
"text/plain": [
|
| 29 |
+
"Timestamp('2024-11-23 01:38:25+0000', tz='UTC')"
|
| 30 |
+
]
|
| 31 |
+
},
|
| 32 |
+
"execution_count": 3,
|
| 33 |
+
"metadata": {},
|
| 34 |
+
"output_type": "execute_result"
|
| 35 |
+
}
|
| 36 |
+
],
|
| 37 |
+
"source": [
|
| 38 |
+
"max(all_trades.creation_timestamp)"
|
| 39 |
+
]
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"cell_type": "code",
|
| 43 |
+
"execution_count": 4,
|
| 44 |
+
"metadata": {},
|
| 45 |
+
"outputs": [
|
| 46 |
+
{
|
| 47 |
+
"data": {
|
| 48 |
+
"text/plain": [
|
| 49 |
+
"Timestamp('2024-09-22 00:02:05+0000', tz='UTC')"
|
| 50 |
+
]
|
| 51 |
+
},
|
| 52 |
+
"execution_count": 4,
|
| 53 |
+
"metadata": {},
|
| 54 |
+
"output_type": "execute_result"
|
| 55 |
+
}
|
| 56 |
+
],
|
| 57 |
+
"source": [
|
| 58 |
+
"min(all_trades.creation_timestamp)"
|
| 59 |
+
]
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"cell_type": "code",
|
| 63 |
+
"execution_count": 3,
|
| 64 |
+
"metadata": {},
|
| 65 |
+
"outputs": [],
|
| 66 |
+
"source": [
|
| 67 |
+
"new_trades = pd.read_parquet('../data/new_fpmmTrades.parquet')"
|
| 68 |
+
]
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"cell_type": "code",
|
| 72 |
+
"execution_count": 11,
|
| 73 |
+
"metadata": {},
|
| 74 |
+
"outputs": [
|
| 75 |
+
{
|
| 76 |
+
"name": "stdout",
|
| 77 |
+
"output_type": "stream",
|
| 78 |
+
"text": [
|
| 79 |
+
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 80 |
+
"RangeIndex: 3798 entries, 0 to 3797\n",
|
| 81 |
+
"Data columns (total 24 columns):\n",
|
| 82 |
+
" # Column Non-Null Count Dtype \n",
|
| 83 |
+
"--- ------ -------------- ----- \n",
|
| 84 |
+
" 0 collateralAmount 3798 non-null object\n",
|
| 85 |
+
" 1 collateralAmountUSD 3798 non-null object\n",
|
| 86 |
+
" 2 collateralToken 3798 non-null object\n",
|
| 87 |
+
" 3 creationTimestamp 3798 non-null object\n",
|
| 88 |
+
" 4 trader_address 3798 non-null object\n",
|
| 89 |
+
" 5 feeAmount 3798 non-null object\n",
|
| 90 |
+
" 6 id 3798 non-null object\n",
|
| 91 |
+
" 7 oldOutcomeTokenMarginalPrice 3798 non-null object\n",
|
| 92 |
+
" 8 outcomeIndex 3798 non-null object\n",
|
| 93 |
+
" 9 outcomeTokenMarginalPrice 3798 non-null object\n",
|
| 94 |
+
" 10 outcomeTokensTraded 3798 non-null object\n",
|
| 95 |
+
" 11 title 3798 non-null object\n",
|
| 96 |
+
" 12 transactionHash 3798 non-null object\n",
|
| 97 |
+
" 13 type 3798 non-null object\n",
|
| 98 |
+
" 14 market_creator 3798 non-null object\n",
|
| 99 |
+
" 15 fpmm.answerFinalizedTimestamp 0 non-null object\n",
|
| 100 |
+
" 16 fpmm.arbitrationOccurred 3798 non-null bool \n",
|
| 101 |
+
" 17 fpmm.currentAnswer 0 non-null object\n",
|
| 102 |
+
" 18 fpmm.id 3798 non-null object\n",
|
| 103 |
+
" 19 fpmm.isPendingArbitration 3798 non-null bool \n",
|
| 104 |
+
" 20 fpmm.openingTimestamp 3798 non-null object\n",
|
| 105 |
+
" 21 fpmm.outcomes 3798 non-null object\n",
|
| 106 |
+
" 22 fpmm.title 3798 non-null object\n",
|
| 107 |
+
" 23 fpmm.condition.id 3798 non-null object\n",
|
| 108 |
+
"dtypes: bool(2), object(22)\n",
|
| 109 |
+
"memory usage: 660.3+ KB\n"
|
| 110 |
+
]
|
| 111 |
+
}
|
| 112 |
+
],
|
| 113 |
+
"source": [
|
| 114 |
+
"new_trades.info()"
|
| 115 |
+
]
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"cell_type": "code",
|
| 119 |
+
"execution_count": 12,
|
| 120 |
+
"metadata": {},
|
| 121 |
+
"outputs": [
|
| 122 |
+
{
|
| 123 |
+
"data": {
|
| 124 |
+
"text/plain": [
|
| 125 |
+
"3798"
|
| 126 |
+
]
|
| 127 |
+
},
|
| 128 |
+
"execution_count": 12,
|
| 129 |
+
"metadata": {},
|
| 130 |
+
"output_type": "execute_result"
|
| 131 |
+
}
|
| 132 |
+
],
|
| 133 |
+
"source": [
|
| 134 |
+
"len(new_trades.id.unique())"
|
| 135 |
+
]
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"cell_type": "code",
|
| 139 |
+
"execution_count": 4,
|
| 140 |
+
"metadata": {},
|
| 141 |
+
"outputs": [
|
| 142 |
+
{
|
| 143 |
+
"data": {
|
| 144 |
+
"text/plain": [
|
| 145 |
+
"Index(['collateralAmount', 'collateralAmountUSD', 'collateralToken',\n",
|
| 146 |
+
" 'creationTimestamp', 'trader_address', 'feeAmount', 'id',\n",
|
| 147 |
+
" 'oldOutcomeTokenMarginalPrice', 'outcomeIndex',\n",
|
| 148 |
+
" 'outcomeTokenMarginalPrice', 'outcomeTokensTraded', 'title',\n",
|
| 149 |
+
" 'transactionHash', 'type', 'market_creator',\n",
|
| 150 |
+
" 'fpmm.answerFinalizedTimestamp', 'fpmm.arbitrationOccurred',\n",
|
| 151 |
+
" 'fpmm.currentAnswer', 'fpmm.id', 'fpmm.isPendingArbitration',\n",
|
| 152 |
+
" 'fpmm.openingTimestamp', 'fpmm.outcomes', 'fpmm.title',\n",
|
| 153 |
+
" 'fpmm.condition.id'],\n",
|
| 154 |
+
" dtype='object')"
|
| 155 |
+
]
|
| 156 |
+
},
|
| 157 |
+
"execution_count": 4,
|
| 158 |
+
"metadata": {},
|
| 159 |
+
"output_type": "execute_result"
|
| 160 |
+
}
|
| 161 |
+
],
|
| 162 |
+
"source": [
|
| 163 |
+
"new_trades.columns"
|
| 164 |
+
]
|
| 165 |
+
},
|
| 166 |
+
{
|
| 167 |
+
"cell_type": "code",
|
| 168 |
+
"execution_count": 6,
|
| 169 |
+
"metadata": {},
|
| 170 |
+
"outputs": [
|
| 171 |
+
{
|
| 172 |
+
"data": {
|
| 173 |
+
"text/plain": [
|
| 174 |
+
"'1732609530'"
|
| 175 |
+
]
|
| 176 |
+
},
|
| 177 |
+
"execution_count": 6,
|
| 178 |
+
"metadata": {},
|
| 179 |
+
"output_type": "execute_result"
|
| 180 |
+
}
|
| 181 |
+
],
|
| 182 |
+
"source": [
|
| 183 |
+
"max(new_trades.creationTimestamp)"
|
| 184 |
+
]
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"cell_type": "code",
|
| 188 |
+
"execution_count": 13,
|
| 189 |
+
"metadata": {},
|
| 190 |
+
"outputs": [],
|
| 191 |
+
"source": [
|
| 192 |
+
"old_trades = pd.read_parquet('../data/fpmmTrades.parquet')"
|
| 193 |
+
]
|
| 194 |
+
},
|
| 195 |
+
{
|
| 196 |
+
"cell_type": "code",
|
| 197 |
+
"execution_count": 14,
|
| 198 |
+
"metadata": {},
|
| 199 |
+
"outputs": [
|
| 200 |
+
{
|
| 201 |
+
"data": {
|
| 202 |
+
"text/plain": [
|
| 203 |
+
"'1732609530'"
|
| 204 |
+
]
|
| 205 |
+
},
|
| 206 |
+
"execution_count": 14,
|
| 207 |
+
"metadata": {},
|
| 208 |
+
"output_type": "execute_result"
|
| 209 |
+
}
|
| 210 |
+
],
|
| 211 |
+
"source": [
|
| 212 |
+
"max(old_trades.creationTimestamp)"
|
| 213 |
+
]
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"cell_type": "code",
|
| 217 |
+
"execution_count": 3,
|
| 218 |
+
"metadata": {},
|
| 219 |
+
"outputs": [],
|
| 220 |
+
"source": [
|
| 221 |
+
"all_trades_before = pd.read_parquet('../data/daily_info.parquet')"
|
| 222 |
+
]
|
| 223 |
+
},
|
| 224 |
+
{
|
| 225 |
+
"cell_type": "code",
|
| 226 |
+
"execution_count": 4,
|
| 227 |
+
"metadata": {},
|
| 228 |
+
"outputs": [
|
| 229 |
+
{
|
| 230 |
+
"name": "stdout",
|
| 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 |
+
],
|
| 264 |
+
"source": [
|
| 265 |
+
"all_trades_before.info()"
|
| 266 |
+
]
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
"cell_type": "code",
|
| 270 |
+
"execution_count": 27,
|
| 271 |
+
"metadata": {},
|
| 272 |
+
"outputs": [
|
| 273 |
+
{
|
| 274 |
+
"data": {
|
| 275 |
+
"text/plain": [
|
| 276 |
+
"Index(['trader_address', 'market_creator', 'trade_id', 'creation_timestamp',\n",
|
| 277 |
+
" 'title', 'market_status', 'collateral_amount', 'outcome_index',\n",
|
| 278 |
+
" 'trade_fee_amount', 'outcomes_tokens_traded', 'current_answer',\n",
|
| 279 |
+
" 'is_invalid', 'winning_trade', 'earnings', 'redeemed',\n",
|
| 280 |
+
" 'redeemed_amount', 'num_mech_calls', 'mech_fee_amount', 'net_earnings',\n",
|
| 281 |
+
" 'roi', 'staking'],\n",
|
| 282 |
+
" dtype='object')"
|
| 283 |
+
]
|
| 284 |
+
},
|
| 285 |
+
"execution_count": 27,
|
| 286 |
+
"metadata": {},
|
| 287 |
+
"output_type": "execute_result"
|
| 288 |
+
}
|
| 289 |
+
],
|
| 290 |
+
"source": [
|
| 291 |
+
"all_trades_before.columns"
|
| 292 |
+
]
|
| 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 |
+
}
|
| 309 |
+
],
|
| 310 |
+
"source": [
|
| 311 |
+
"max(all_trades_before.creation_timestamp)"
|
| 312 |
+
]
|
| 313 |
+
},
|
| 314 |
+
{
|
| 315 |
+
"cell_type": "code",
|
| 316 |
+
"execution_count": 5,
|
| 317 |
+
"metadata": {},
|
| 318 |
+
"outputs": [
|
| 319 |
+
{
|
| 320 |
+
"data": {
|
| 321 |
+
"text/plain": [
|
| 322 |
+
"staking\n",
|
| 323 |
+
"non_agent 2376\n",
|
| 324 |
+
"quickstart 672\n",
|
| 325 |
+
"pearl 502\n",
|
| 326 |
+
"non_staking 332\n",
|
| 327 |
+
"Name: count, dtype: int64"
|
| 328 |
+
]
|
| 329 |
+
},
|
| 330 |
+
"execution_count": 5,
|
| 331 |
+
"metadata": {},
|
| 332 |
+
"output_type": "execute_result"
|
| 333 |
+
}
|
| 334 |
+
],
|
| 335 |
+
"source": [
|
| 336 |
+
"all_trades_before.staking.value_counts()"
|
| 337 |
+
]
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"cell_type": "code",
|
| 341 |
+
"execution_count": 7,
|
| 342 |
+
"metadata": {},
|
| 343 |
+
"outputs": [],
|
| 344 |
+
"source": [
|
| 345 |
+
"all_trades_df = pd.read_parquet('../json_data/all_trades_df.parquet')"
|
| 346 |
+
]
|
| 347 |
+
},
|
| 348 |
+
{
|
| 349 |
+
"cell_type": "code",
|
| 350 |
+
"execution_count": 8,
|
| 351 |
+
"metadata": {},
|
| 352 |
+
"outputs": [
|
| 353 |
+
{
|
| 354 |
+
"data": {
|
| 355 |
+
"text/plain": [
|
| 356 |
+
"Index(['trader_address', 'market_creator', 'trade_id', 'creation_timestamp',\n",
|
| 357 |
+
" 'title', 'market_status', 'collateral_amount', 'outcome_index',\n",
|
| 358 |
+
" 'trade_fee_amount', 'outcomes_tokens_traded', 'current_answer',\n",
|
| 359 |
+
" 'is_invalid', 'winning_trade', 'earnings', 'redeemed',\n",
|
| 360 |
+
" 'redeemed_amount', 'num_mech_calls', 'mech_fee_amount', 'net_earnings',\n",
|
| 361 |
+
" 'roi', 'staking', 'nr_mech_calls'],\n",
|
| 362 |
+
" dtype='object')"
|
| 363 |
+
]
|
| 364 |
+
},
|
| 365 |
+
"execution_count": 8,
|
| 366 |
+
"metadata": {},
|
| 367 |
+
"output_type": "execute_result"
|
| 368 |
+
}
|
| 369 |
+
],
|
| 370 |
+
"source": [
|
| 371 |
+
"all_trades_df.columns"
|
| 372 |
+
]
|
| 373 |
+
},
|
| 374 |
+
{
|
| 375 |
+
"cell_type": "code",
|
| 376 |
+
"execution_count": 9,
|
| 377 |
+
"metadata": {},
|
| 378 |
+
"outputs": [
|
| 379 |
+
{
|
| 380 |
+
"data": {
|
| 381 |
+
"text/plain": [
|
| 382 |
+
"Timestamp('2024-11-23 01:38:25+0000', tz='UTC')"
|
| 383 |
+
]
|
| 384 |
+
},
|
| 385 |
+
"execution_count": 9,
|
| 386 |
+
"metadata": {},
|
| 387 |
+
"output_type": "execute_result"
|
| 388 |
+
}
|
| 389 |
+
],
|
| 390 |
+
"source": [
|
| 391 |
+
"max(all_trades_df.creation_timestamp)"
|
| 392 |
+
]
|
| 393 |
+
},
|
| 394 |
+
{
|
| 395 |
+
"cell_type": "code",
|
| 396 |
+
"execution_count": null,
|
| 397 |
+
"metadata": {},
|
| 398 |
+
"outputs": [],
|
| 399 |
+
"source": []
|
| 400 |
+
},
|
| 401 |
+
{
|
| 402 |
+
"cell_type": "code",
|
| 403 |
+
"execution_count": null,
|
| 404 |
+
"metadata": {},
|
| 405 |
+
"outputs": [],
|
| 406 |
+
"source": []
|
| 407 |
+
}
|
| 408 |
+
],
|
| 409 |
+
"metadata": {
|
| 410 |
+
"kernelspec": {
|
| 411 |
+
"display_name": "hf_dashboards",
|
| 412 |
+
"language": "python",
|
| 413 |
+
"name": "python3"
|
| 414 |
+
},
|
| 415 |
+
"language_info": {
|
| 416 |
+
"codemirror_mode": {
|
| 417 |
+
"name": "ipython",
|
| 418 |
+
"version": 3
|
| 419 |
+
},
|
| 420 |
+
"file_extension": ".py",
|
| 421 |
+
"mimetype": "text/x-python",
|
| 422 |
+
"name": "python",
|
| 423 |
+
"nbconvert_exporter": "python",
|
| 424 |
+
"pygments_lexer": "ipython3",
|
| 425 |
+
"version": "3.12.2"
|
| 426 |
+
}
|
| 427 |
+
},
|
| 428 |
+
"nbformat": 4,
|
| 429 |
+
"nbformat_minor": 2
|
| 430 |
+
}
|
notebooks/trader_agent_metrics.ipynb
CHANGED
|
@@ -1353,863 +1353,9 @@
|
|
| 1353 |
},
|
| 1354 |
{
|
| 1355 |
"cell_type": "code",
|
| 1356 |
-
"execution_count":
|
| 1357 |
"metadata": {},
|
| 1358 |
-
"outputs": [
|
| 1359 |
-
{
|
| 1360 |
-
"name": "stdout",
|
| 1361 |
-
"output_type": "stream",
|
| 1362 |
-
"text": [
|
| 1363 |
-
"Computing weekly metrics for week =Jul-21 by market creator\n"
|
| 1364 |
-
]
|
| 1365 |
-
},
|
| 1366 |
-
{
|
| 1367 |
-
"name": "stderr",
|
| 1368 |
-
"output_type": "stream",
|
| 1369 |
-
"text": [
|
| 1370 |
-
"Trader' metrics: 100%|ββββββββββ| 19/19 [00:00<00:00, 528.86metrics/s]"
|
| 1371 |
-
]
|
| 1372 |
-
},
|
| 1373 |
-
{
|
| 1374 |
-
"name": "stdout",
|
| 1375 |
-
"output_type": "stream",
|
| 1376 |
-
"text": [
|
| 1377 |
-
"Volume of data for trader 0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57 and market creator all = 3\n",
|
| 1378 |
-
"{'trader_address': '0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57', 'net_earnings': -0.7234109591878646, 'earnings': 1.7851345317122906, 'bet_amount': 2.380926951862897, 'nr_mech_calls': 8, 'roi': -0.2847035640507064}\n",
|
| 1379 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1380 |
-
"Volume of data for trader 0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57 and market creator quickstart = 3\n",
|
| 1381 |
-
"{'trader_address': '0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57', 'net_earnings': -0.7234109591878646, 'earnings': 1.7851345317122906, 'bet_amount': 2.380926951862897, 'nr_mech_calls': 8, 'roi': -0.2847035640507064}\n",
|
| 1382 |
-
"Filtering only specific market creators = pearl\n",
|
| 1383 |
-
"No data. Skipping market creator pearl\n",
|
| 1384 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1385 |
-
" trader_address net_earnings earnings \\\n",
|
| 1386 |
-
"0 0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57 -0.723411 1.785135 \n",
|
| 1387 |
-
"1 0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57 -0.723411 1.785135 \n",
|
| 1388 |
-
"\n",
|
| 1389 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1390 |
-
"0 2.380927 8 -0.284704 Jul-21 all \n",
|
| 1391 |
-
"1 2.380927 8 -0.284704 Jul-21 quickstart \n",
|
| 1392 |
-
"Volume of data for trader 0xf089874165be0377680683fd5187a058dea82683 and market creator all = 1\n",
|
| 1393 |
-
"{'trader_address': '0xf089874165be0377680683fd5187a058dea82683', 'net_earnings': 0.7996491228070175, 'earnings': 1.8396491228070175, 'bet_amount': 1.0, 'nr_mech_calls': 2, 'roi': 0.7688933873144399}\n",
|
| 1394 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1395 |
-
"Volume of data for trader 0xf089874165be0377680683fd5187a058dea82683 and market creator quickstart = 1\n",
|
| 1396 |
-
"{'trader_address': '0xf089874165be0377680683fd5187a058dea82683', 'net_earnings': 0.7996491228070175, 'earnings': 1.8396491228070175, 'bet_amount': 1.0, 'nr_mech_calls': 2, 'roi': 0.7688933873144399}\n",
|
| 1397 |
-
"Filtering only specific market creators = pearl\n",
|
| 1398 |
-
"No data. Skipping market creator pearl\n",
|
| 1399 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1400 |
-
" trader_address net_earnings earnings \\\n",
|
| 1401 |
-
"0 0xf089874165be0377680683fd5187a058dea82683 0.799649 1.839649 \n",
|
| 1402 |
-
"1 0xf089874165be0377680683fd5187a058dea82683 0.799649 1.839649 \n",
|
| 1403 |
-
"\n",
|
| 1404 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1405 |
-
"0 1.0 2 0.768893 Jul-21 all \n",
|
| 1406 |
-
"1 1.0 2 0.768893 Jul-21 quickstart \n",
|
| 1407 |
-
"Volume of data for trader 0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2 and market creator all = 4\n",
|
| 1408 |
-
"{'trader_address': '0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2', 'net_earnings': -1.0071645410215222, 'earnings': 3.350264102099237, 'bet_amount': 4.154341806981137, 'nr_mech_calls': 12, 'roi': -0.22919576702510377}\n",
|
| 1409 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1410 |
-
"Volume of data for trader 0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2 and market creator quickstart = 4\n",
|
| 1411 |
-
"{'trader_address': '0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2', 'net_earnings': -1.0071645410215222, 'earnings': 3.350264102099237, 'bet_amount': 4.154341806981137, 'nr_mech_calls': 12, 'roi': -0.22919576702510377}\n",
|
| 1412 |
-
"Filtering only specific market creators = pearl\n",
|
| 1413 |
-
"No data. Skipping market creator pearl\n",
|
| 1414 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1415 |
-
" trader_address net_earnings earnings \\\n",
|
| 1416 |
-
"0 0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2 -1.007165 3.350264 \n",
|
| 1417 |
-
"1 0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2 -1.007165 3.350264 \n",
|
| 1418 |
-
"\n",
|
| 1419 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1420 |
-
"0 4.154342 12 -0.229196 Jul-21 all \n",
|
| 1421 |
-
"1 4.154342 12 -0.229196 Jul-21 quickstart \n",
|
| 1422 |
-
"Volume of data for trader 0xe283e408c6017447da9fe092d52c386753699680 and market creator all = 1\n",
|
| 1423 |
-
"{'trader_address': '0xe283e408c6017447da9fe092d52c386753699680', 'net_earnings': -1.04, 'earnings': 0.0, 'bet_amount': 1.0, 'nr_mech_calls': 2, 'roi': -1.0}\n",
|
| 1424 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1425 |
-
"No data. Skipping market creator quickstart\n",
|
| 1426 |
-
"Filtering only specific market creators = pearl\n",
|
| 1427 |
-
"Volume of data for trader 0xe283e408c6017447da9fe092d52c386753699680 and market creator pearl = 1\n",
|
| 1428 |
-
"{'trader_address': '0xe283e408c6017447da9fe092d52c386753699680', 'net_earnings': -1.04, 'earnings': 0.0, 'bet_amount': 1.0, 'nr_mech_calls': 2, 'roi': -1.0}\n",
|
| 1429 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1430 |
-
" trader_address net_earnings earnings \\\n",
|
| 1431 |
-
"0 0xe283e408c6017447da9fe092d52c386753699680 -1.04 0.0 \n",
|
| 1432 |
-
"1 0xe283e408c6017447da9fe092d52c386753699680 -1.04 0.0 \n",
|
| 1433 |
-
"\n",
|
| 1434 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1435 |
-
"0 1.0 2 -1.0 Jul-21 all \n",
|
| 1436 |
-
"1 1.0 2 -1.0 Jul-21 pearl \n",
|
| 1437 |
-
"Volume of data for trader 0x480e5b5abd27cd754745871116e79caf90468dd4 and market creator all = 2\n",
|
| 1438 |
-
"{'trader_address': '0x480e5b5abd27cd754745871116e79caf90468dd4', 'net_earnings': -0.36794781695584966, 'earnings': 1.9646689200064404, 'bet_amount': 2.2476634676100886, 'nr_mech_calls': 4, 'roi': -0.1580760372261362}\n",
|
| 1439 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1440 |
-
"Volume of data for trader 0x480e5b5abd27cd754745871116e79caf90468dd4 and market creator quickstart = 2\n",
|
| 1441 |
-
"{'trader_address': '0x480e5b5abd27cd754745871116e79caf90468dd4', 'net_earnings': -0.36794781695584966, 'earnings': 1.9646689200064404, 'bet_amount': 2.2476634676100886, 'nr_mech_calls': 4, 'roi': -0.1580760372261362}\n",
|
| 1442 |
-
"Filtering only specific market creators = pearl\n",
|
| 1443 |
-
"No data. Skipping market creator pearl\n",
|
| 1444 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1445 |
-
" trader_address net_earnings earnings \\\n",
|
| 1446 |
-
"0 0x480e5b5abd27cd754745871116e79caf90468dd4 -0.367948 1.964669 \n",
|
| 1447 |
-
"1 0x480e5b5abd27cd754745871116e79caf90468dd4 -0.367948 1.964669 \n",
|
| 1448 |
-
"\n",
|
| 1449 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1450 |
-
"0 2.247663 4 -0.158076 Jul-21 all \n",
|
| 1451 |
-
"1 2.247663 4 -0.158076 Jul-21 quickstart \n",
|
| 1452 |
-
"Volume of data for trader 0x3c01b79bad670a37c8784bdf47b973b341064f10 and market creator all = 4\n",
|
| 1453 |
-
"{'trader_address': '0x3c01b79bad670a37c8784bdf47b973b341064f10', 'net_earnings': 0.5130050997258764, 'earnings': 5.0788528986176456, 'bet_amount': 4.3978899989135, 'nr_mech_calls': 8, 'roi': 0.11255319892497745}\n",
|
| 1454 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1455 |
-
"Volume of data for trader 0x3c01b79bad670a37c8784bdf47b973b341064f10 and market creator quickstart = 4\n",
|
| 1456 |
-
"{'trader_address': '0x3c01b79bad670a37c8784bdf47b973b341064f10', 'net_earnings': 0.5130050997258764, 'earnings': 5.0788528986176456, 'bet_amount': 4.3978899989135, 'nr_mech_calls': 8, 'roi': 0.11255319892497745}\n",
|
| 1457 |
-
"Filtering only specific market creators = pearl\n",
|
| 1458 |
-
"No data. Skipping market creator pearl\n",
|
| 1459 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1460 |
-
" trader_address net_earnings earnings \\\n",
|
| 1461 |
-
"0 0x3c01b79bad670a37c8784bdf47b973b341064f10 0.513005 5.078853 \n",
|
| 1462 |
-
"1 0x3c01b79bad670a37c8784bdf47b973b341064f10 0.513005 5.078853 \n",
|
| 1463 |
-
"\n",
|
| 1464 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1465 |
-
"0 4.39789 8 0.112553 Jul-21 all \n",
|
| 1466 |
-
"1 4.39789 8 0.112553 Jul-21 quickstart \n",
|
| 1467 |
-
"Volume of data for trader 0x8cd3e072c8341cfe1a03dbe1d6c32b5177b06164 and market creator all = 6\n",
|
| 1468 |
-
"{'trader_address': '0x8cd3e072c8341cfe1a03dbe1d6c32b5177b06164', 'net_earnings': -0.7499826129605537, 'earnings': 5.962404072727221, 'bet_amount': 6.345477142831152, 'nr_mech_calls': 24, 'roi': -0.10987988052209152}\n",
|
| 1469 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1470 |
-
"Volume of data for trader 0x8cd3e072c8341cfe1a03dbe1d6c32b5177b06164 and market creator quickstart = 6\n",
|
| 1471 |
-
"{'trader_address': '0x8cd3e072c8341cfe1a03dbe1d6c32b5177b06164', 'net_earnings': -0.7499826129605537, 'earnings': 5.962404072727221, 'bet_amount': 6.345477142831152, 'nr_mech_calls': 24, 'roi': -0.10987988052209152}\n",
|
| 1472 |
-
"Filtering only specific market creators = pearl\n",
|
| 1473 |
-
"No data. Skipping market creator pearl\n",
|
| 1474 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1475 |
-
" trader_address net_earnings earnings \\\n",
|
| 1476 |
-
"0 0x8cd3e072c8341cfe1a03dbe1d6c32b5177b06164 -0.749983 5.962404 \n",
|
| 1477 |
-
"1 0x8cd3e072c8341cfe1a03dbe1d6c32b5177b06164 -0.749983 5.962404 \n",
|
| 1478 |
-
"\n",
|
| 1479 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1480 |
-
"0 6.345477 24 -0.10988 Jul-21 all \n",
|
| 1481 |
-
"1 6.345477 24 -0.10988 Jul-21 quickstart \n",
|
| 1482 |
-
"Volume of data for trader 0x8dd0f0f64e575a356545d9ed096122a1887e64bf and market creator all = 4\n",
|
| 1483 |
-
"{'trader_address': '0x8dd0f0f64e575a356545d9ed096122a1887e64bf', 'net_earnings': -0.11720618783292708, 'earnings': 3.8719908166532613, 'bet_amount': 3.7639186318492035, 'nr_mech_calls': 15, 'roi': -0.028840682713077548}\n",
|
| 1484 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1485 |
-
"Volume of data for trader 0x8dd0f0f64e575a356545d9ed096122a1887e64bf and market creator quickstart = 4\n",
|
| 1486 |
-
"{'trader_address': '0x8dd0f0f64e575a356545d9ed096122a1887e64bf', 'net_earnings': -0.11720618783292708, 'earnings': 3.8719908166532613, 'bet_amount': 3.7639186318492035, 'nr_mech_calls': 15, 'roi': -0.028840682713077548}\n",
|
| 1487 |
-
"Filtering only specific market creators = pearl\n",
|
| 1488 |
-
"No data. Skipping market creator pearl\n",
|
| 1489 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1490 |
-
" trader_address net_earnings earnings \\\n",
|
| 1491 |
-
"0 0x8dd0f0f64e575a356545d9ed096122a1887e64bf -0.117206 3.871991 \n",
|
| 1492 |
-
"1 0x8dd0f0f64e575a356545d9ed096122a1887e64bf -0.117206 3.871991 \n",
|
| 1493 |
-
"\n",
|
| 1494 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1495 |
-
"0 3.763919 15 -0.028841 Jul-21 all \n",
|
| 1496 |
-
"1 3.763919 15 -0.028841 Jul-21 quickstart \n",
|
| 1497 |
-
"Volume of data for trader 0xec97bdf61fcb901033a3b8fcbcde77a372927b61 and market creator all = 4\n",
|
| 1498 |
-
"{'trader_address': '0xec97bdf61fcb901033a3b8fcbcde77a372927b61', 'net_earnings': -0.826361612049082, 'earnings': 1.876615508201772, 'bet_amount': 2.551938353187112, 'nr_mech_calls': 10, 'roi': -0.3002834751338252}\n",
|
| 1499 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1500 |
-
"Volume of data for trader 0xec97bdf61fcb901033a3b8fcbcde77a372927b61 and market creator quickstart = 4\n",
|
| 1501 |
-
"{'trader_address': '0xec97bdf61fcb901033a3b8fcbcde77a372927b61', 'net_earnings': -0.826361612049082, 'earnings': 1.876615508201772, 'bet_amount': 2.551938353187112, 'nr_mech_calls': 10, 'roi': -0.3002834751338252}\n",
|
| 1502 |
-
"Filtering only specific market creators = pearl\n",
|
| 1503 |
-
"No data. Skipping market creator pearl\n",
|
| 1504 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1505 |
-
" trader_address net_earnings earnings \\\n",
|
| 1506 |
-
"0 0xec97bdf61fcb901033a3b8fcbcde77a372927b61 -0.826362 1.876616 \n",
|
| 1507 |
-
"1 0xec97bdf61fcb901033a3b8fcbcde77a372927b61 -0.826362 1.876616 \n",
|
| 1508 |
-
"\n",
|
| 1509 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1510 |
-
"0 2.551938 10 -0.300283 Jul-21 all \n",
|
| 1511 |
-
"1 2.551938 10 -0.300283 Jul-21 quickstart \n",
|
| 1512 |
-
"Volume of data for trader 0x74d2b585a46279b4fa9feeae001efc972726c709 and market creator all = 1\n",
|
| 1513 |
-
"{'trader_address': '0x74d2b585a46279b4fa9feeae001efc972726c709', 'net_earnings': 0.3248132469295979, 'earnings': 1.5588132469295979, 'bet_amount': 1.2, 'nr_mech_calls': 1, 'roi': 0.266240366335736}\n",
|
| 1514 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1515 |
-
"Volume of data for trader 0x74d2b585a46279b4fa9feeae001efc972726c709 and market creator quickstart = 1\n",
|
| 1516 |
-
"{'trader_address': '0x74d2b585a46279b4fa9feeae001efc972726c709', 'net_earnings': 0.3248132469295979, 'earnings': 1.5588132469295979, 'bet_amount': 1.2, 'nr_mech_calls': 1, 'roi': 0.266240366335736}\n",
|
| 1517 |
-
"Filtering only specific market creators = pearl\n",
|
| 1518 |
-
"No data. Skipping market creator pearl\n",
|
| 1519 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1520 |
-
" trader_address net_earnings earnings \\\n",
|
| 1521 |
-
"0 0x74d2b585a46279b4fa9feeae001efc972726c709 0.324813 1.558813 \n",
|
| 1522 |
-
"1 0x74d2b585a46279b4fa9feeae001efc972726c709 0.324813 1.558813 \n",
|
| 1523 |
-
"\n",
|
| 1524 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1525 |
-
"0 1.2 1 0.26624 Jul-21 all \n",
|
| 1526 |
-
"1 1.2 1 0.26624 Jul-21 quickstart \n",
|
| 1527 |
-
"Volume of data for trader 0x22335c348afa4eae4cc6d2158c1ac259aaaecdfe and market creator all = 2\n",
|
| 1528 |
-
"{'trader_address': '0x22335c348afa4eae4cc6d2158c1ac259aaaecdfe', 'net_earnings': -0.06246427000467561, 'earnings': 0.46153572999532444, 'bet_amount': 0.2, 'nr_mech_calls': 32, 'roi': -0.07436222619604238}\n",
|
| 1529 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1530 |
-
"Volume of data for trader 0x22335c348afa4eae4cc6d2158c1ac259aaaecdfe and market creator quickstart = 2\n",
|
| 1531 |
-
"{'trader_address': '0x22335c348afa4eae4cc6d2158c1ac259aaaecdfe', 'net_earnings': -0.06246427000467561, 'earnings': 0.46153572999532444, 'bet_amount': 0.2, 'nr_mech_calls': 32, 'roi': -0.07436222619604238}\n",
|
| 1532 |
-
"Filtering only specific market creators = pearl\n",
|
| 1533 |
-
"No data. Skipping market creator pearl\n",
|
| 1534 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1535 |
-
" trader_address net_earnings earnings \\\n",
|
| 1536 |
-
"0 0x22335c348afa4eae4cc6d2158c1ac259aaaecdfe -0.062464 0.461536 \n",
|
| 1537 |
-
"1 0x22335c348afa4eae4cc6d2158c1ac259aaaecdfe -0.062464 0.461536 \n",
|
| 1538 |
-
"\n",
|
| 1539 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1540 |
-
"0 0.2 32 -0.074362 Jul-21 all \n",
|
| 1541 |
-
"1 0.2 32 -0.074362 Jul-21 quickstart \n",
|
| 1542 |
-
"Volume of data for trader 0x324267d9c6190f9bbcc126d10047eb9f761df540 and market creator all = 1\n",
|
| 1543 |
-
"{'trader_address': '0x324267d9c6190f9bbcc126d10047eb9f761df540', 'net_earnings': 0.08069455409216866, 'earnings': 0.4426945540921687, 'bet_amount': 0.1, 'nr_mech_calls': 26, 'roi': 0.13015250660027203}\n",
|
| 1544 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1545 |
-
"Volume of data for trader 0x324267d9c6190f9bbcc126d10047eb9f761df540 and market creator quickstart = 1\n",
|
| 1546 |
-
"{'trader_address': '0x324267d9c6190f9bbcc126d10047eb9f761df540', 'net_earnings': 0.08069455409216866, 'earnings': 0.4426945540921687, 'bet_amount': 0.1, 'nr_mech_calls': 26, 'roi': 0.13015250660027203}\n",
|
| 1547 |
-
"Filtering only specific market creators = pearl\n",
|
| 1548 |
-
"No data. Skipping market creator pearl\n",
|
| 1549 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1550 |
-
" trader_address net_earnings earnings \\\n",
|
| 1551 |
-
"0 0x324267d9c6190f9bbcc126d10047eb9f761df540 0.080695 0.442695 \n",
|
| 1552 |
-
"1 0x324267d9c6190f9bbcc126d10047eb9f761df540 0.080695 0.442695 \n",
|
| 1553 |
-
"\n",
|
| 1554 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1555 |
-
"0 0.1 26 0.130153 Jul-21 all \n",
|
| 1556 |
-
"1 0.1 26 0.130153 Jul-21 quickstart \n",
|
| 1557 |
-
"Volume of data for trader 0x6f99ccc54f239a9c0e7fe501e99c16b89785b96b and market creator all = 2\n",
|
| 1558 |
-
"{'trader_address': '0x6f99ccc54f239a9c0e7fe501e99c16b89785b96b', 'net_earnings': -0.42400000000000004, 'earnings': 0.0, 'bet_amount': 0.2, 'nr_mech_calls': 22, 'roi': -0.6625000000000001}\n",
|
| 1559 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1560 |
-
"Volume of data for trader 0x6f99ccc54f239a9c0e7fe501e99c16b89785b96b and market creator quickstart = 2\n",
|
| 1561 |
-
"{'trader_address': '0x6f99ccc54f239a9c0e7fe501e99c16b89785b96b', 'net_earnings': -0.42400000000000004, 'earnings': 0.0, 'bet_amount': 0.2, 'nr_mech_calls': 22, 'roi': -0.6625000000000001}\n",
|
| 1562 |
-
"Filtering only specific market creators = pearl\n",
|
| 1563 |
-
"No data. Skipping market creator pearl\n",
|
| 1564 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1565 |
-
" trader_address net_earnings earnings \\\n",
|
| 1566 |
-
"0 0x6f99ccc54f239a9c0e7fe501e99c16b89785b96b -0.424 0.0 \n",
|
| 1567 |
-
"1 0x6f99ccc54f239a9c0e7fe501e99c16b89785b96b -0.424 0.0 \n",
|
| 1568 |
-
"\n",
|
| 1569 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1570 |
-
"0 0.2 22 -0.6625 Jul-21 all \n",
|
| 1571 |
-
"1 0.2 22 -0.6625 Jul-21 quickstart \n",
|
| 1572 |
-
"Volume of data for trader 0x593c4ca4c85f24145de87e2591b7ec5d2e01d5e9 and market creator all = 4\n",
|
| 1573 |
-
"{'trader_address': '0x593c4ca4c85f24145de87e2591b7ec5d2e01d5e9', 'net_earnings': 1.0946011886656675, 'earnings': 5.0475474599643215, 'bet_amount': 3.7872022267633865, 'nr_mech_calls': 9, 'roi': 0.2759126271106906}\n",
|
| 1574 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1575 |
-
"Volume of data for trader 0x593c4ca4c85f24145de87e2591b7ec5d2e01d5e9 and market creator quickstart = 4\n",
|
| 1576 |
-
"{'trader_address': '0x593c4ca4c85f24145de87e2591b7ec5d2e01d5e9', 'net_earnings': 1.0946011886656675, 'earnings': 5.0475474599643215, 'bet_amount': 3.7872022267633865, 'nr_mech_calls': 9, 'roi': 0.2759126271106906}\n",
|
| 1577 |
-
"Filtering only specific market creators = pearl\n",
|
| 1578 |
-
"No data. Skipping market creator pearl\n",
|
| 1579 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1580 |
-
" trader_address net_earnings earnings \\\n",
|
| 1581 |
-
"0 0x593c4ca4c85f24145de87e2591b7ec5d2e01d5e9 1.094601 5.047547 \n",
|
| 1582 |
-
"1 0x593c4ca4c85f24145de87e2591b7ec5d2e01d5e9 1.094601 5.047547 \n",
|
| 1583 |
-
"\n",
|
| 1584 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1585 |
-
"0 3.787202 9 0.275913 Jul-21 all \n",
|
| 1586 |
-
"1 3.787202 9 0.275913 Jul-21 quickstart \n",
|
| 1587 |
-
"Volume of data for trader 0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9 and market creator all = 1\n",
|
| 1588 |
-
"{'trader_address': '0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9', 'net_earnings': 0.8096491228070175, 'earnings': 1.8396491228070175, 'bet_amount': 1.0, 'nr_mech_calls': 1, 'roi': 0.7937736498108015}\n",
|
| 1589 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1590 |
-
"No data. Skipping market creator quickstart\n",
|
| 1591 |
-
"Filtering only specific market creators = pearl\n",
|
| 1592 |
-
"Volume of data for trader 0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9 and market creator pearl = 1\n",
|
| 1593 |
-
"{'trader_address': '0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9', 'net_earnings': 0.8096491228070175, 'earnings': 1.8396491228070175, 'bet_amount': 1.0, 'nr_mech_calls': 1, 'roi': 0.7937736498108015}\n",
|
| 1594 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1595 |
-
" trader_address net_earnings earnings \\\n",
|
| 1596 |
-
"0 0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9 0.809649 1.839649 \n",
|
| 1597 |
-
"1 0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9 0.809649 1.839649 \n",
|
| 1598 |
-
"\n",
|
| 1599 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1600 |
-
"0 1.0 1 0.793774 Jul-21 all \n",
|
| 1601 |
-
"1 1.0 1 0.793774 Jul-21 pearl \n",
|
| 1602 |
-
"Volume of data for trader 0x1b9e28e7f817e1312636a485f31cca8a4be61fac and market creator all = 1\n",
|
| 1603 |
-
"{'trader_address': '0x1b9e28e7f817e1312636a485f31cca8a4be61fac', 'net_earnings': -1.03, 'earnings': 0.0, 'bet_amount': 1.0, 'nr_mech_calls': 1, 'roi': -1.0098039215686274}\n",
|
| 1604 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1605 |
-
"No data. Skipping market creator quickstart\n",
|
| 1606 |
-
"Filtering only specific market creators = pearl\n",
|
| 1607 |
-
"Volume of data for trader 0x1b9e28e7f817e1312636a485f31cca8a4be61fac and market creator pearl = 1\n",
|
| 1608 |
-
"{'trader_address': '0x1b9e28e7f817e1312636a485f31cca8a4be61fac', 'net_earnings': -1.03, 'earnings': 0.0, 'bet_amount': 1.0, 'nr_mech_calls': 1, 'roi': -1.0098039215686274}\n",
|
| 1609 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1610 |
-
" trader_address net_earnings earnings \\\n",
|
| 1611 |
-
"0 0x1b9e28e7f817e1312636a485f31cca8a4be61fac -1.03 0.0 \n",
|
| 1612 |
-
"1 0x1b9e28e7f817e1312636a485f31cca8a4be61fac -1.03 0.0 \n",
|
| 1613 |
-
"\n",
|
| 1614 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1615 |
-
"0 1.0 1 -1.009804 Jul-21 all \n",
|
| 1616 |
-
"1 1.0 1 -1.009804 Jul-21 pearl \n",
|
| 1617 |
-
"Volume of data for trader 0xe0113a139f591efa8bf5e19308c7c27199682d77 and market creator all = 2\n",
|
| 1618 |
-
"{'trader_address': '0xe0113a139f591efa8bf5e19308c7c27199682d77', 'net_earnings': -2.08, 'earnings': 0.0, 'bet_amount': 2.0, 'nr_mech_calls': 4, 'roi': -1.0}\n",
|
| 1619 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1620 |
-
"No data. Skipping market creator quickstart\n",
|
| 1621 |
-
"Filtering only specific market creators = pearl\n",
|
| 1622 |
-
"Volume of data for trader 0xe0113a139f591efa8bf5e19308c7c27199682d77 and market creator pearl = 2\n",
|
| 1623 |
-
"{'trader_address': '0xe0113a139f591efa8bf5e19308c7c27199682d77', 'net_earnings': -2.08, 'earnings': 0.0, 'bet_amount': 2.0, 'nr_mech_calls': 4, 'roi': -1.0}\n",
|
| 1624 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1625 |
-
" trader_address net_earnings earnings \\\n",
|
| 1626 |
-
"0 0xe0113a139f591efa8bf5e19308c7c27199682d77 -2.08 0.0 \n",
|
| 1627 |
-
"1 0xe0113a139f591efa8bf5e19308c7c27199682d77 -2.08 0.0 \n",
|
| 1628 |
-
"\n",
|
| 1629 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1630 |
-
"0 2.0 4 -1.0 Jul-21 all \n",
|
| 1631 |
-
"1 2.0 4 -1.0 Jul-21 pearl \n",
|
| 1632 |
-
"Volume of data for trader 0x9694c0fdb79a37d048ea19deb15e051482a690c4 and market creator all = 2\n",
|
| 1633 |
-
"{'trader_address': '0x9694c0fdb79a37d048ea19deb15e051482a690c4', 'net_earnings': -0.34400000000000003, 'earnings': 0.0, 'bet_amount': 0.2, 'nr_mech_calls': 14, 'roi': -0.7166666666666667}\n",
|
| 1634 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1635 |
-
"Volume of data for trader 0x9694c0fdb79a37d048ea19deb15e051482a690c4 and market creator quickstart = 2\n",
|
| 1636 |
-
"{'trader_address': '0x9694c0fdb79a37d048ea19deb15e051482a690c4', 'net_earnings': -0.34400000000000003, 'earnings': 0.0, 'bet_amount': 0.2, 'nr_mech_calls': 14, 'roi': -0.7166666666666667}\n",
|
| 1637 |
-
"Filtering only specific market creators = pearl\n",
|
| 1638 |
-
"No data. Skipping market creator pearl\n",
|
| 1639 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1640 |
-
" trader_address net_earnings earnings \\\n",
|
| 1641 |
-
"0 0x9694c0fdb79a37d048ea19deb15e051482a690c4 -0.344 0.0 \n",
|
| 1642 |
-
"1 0x9694c0fdb79a37d048ea19deb15e051482a690c4 -0.344 0.0 \n",
|
| 1643 |
-
"\n",
|
| 1644 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1645 |
-
"0 0.2 14 -0.716667 Jul-21 all \n",
|
| 1646 |
-
"1 0.2 14 -0.716667 Jul-21 quickstart \n",
|
| 1647 |
-
"Volume of data for trader 0x66a022b113b41e08d90cfd9468b8b6565d6ea995 and market creator all = 1\n",
|
| 1648 |
-
"{'trader_address': '0x66a022b113b41e08d90cfd9468b8b6565d6ea995', 'net_earnings': 3.6733333333333356, 'earnings': 13.883333333333335, 'bet_amount': 10.0, 'nr_mech_calls': 1, 'roi': 0.3666001330671992}\n",
|
| 1649 |
-
"Filtering only specific market creators = quickstart\n",
|
| 1650 |
-
"No data. Skipping market creator quickstart\n",
|
| 1651 |
-
"Filtering only specific market creators = pearl\n",
|
| 1652 |
-
"Volume of data for trader 0x66a022b113b41e08d90cfd9468b8b6565d6ea995 and market creator pearl = 1\n",
|
| 1653 |
-
"{'trader_address': '0x66a022b113b41e08d90cfd9468b8b6565d6ea995', 'net_earnings': 3.6733333333333356, 'earnings': 13.883333333333335, 'bet_amount': 10.0, 'nr_mech_calls': 1, 'roi': 0.3666001330671992}\n",
|
| 1654 |
-
"Total length of all trader metrics for this week = 2\n",
|
| 1655 |
-
" trader_address net_earnings earnings \\\n",
|
| 1656 |
-
"0 0x66a022b113b41e08d90cfd9468b8b6565d6ea995 3.673333 13.883333 \n",
|
| 1657 |
-
"1 0x66a022b113b41e08d90cfd9468b8b6565d6ea995 3.673333 13.883333 \n",
|
| 1658 |
-
"\n",
|
| 1659 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 1660 |
-
"0 10.0 1 0.3666 Jul-21 all \n",
|
| 1661 |
-
"1 10.0 1 0.3666 Jul-21 pearl \n",
|
| 1662 |
-
"End computing all weekly metrics by market creator\n"
|
| 1663 |
-
]
|
| 1664 |
-
},
|
| 1665 |
-
{
|
| 1666 |
-
"name": "stderr",
|
| 1667 |
-
"output_type": "stream",
|
| 1668 |
-
"text": [
|
| 1669 |
-
"\n"
|
| 1670 |
-
]
|
| 1671 |
-
},
|
| 1672 |
-
{
|
| 1673 |
-
"data": {
|
| 1674 |
-
"text/html": [
|
| 1675 |
-
"<div>\n",
|
| 1676 |
-
"<style scoped>\n",
|
| 1677 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 1678 |
-
" vertical-align: middle;\n",
|
| 1679 |
-
" }\n",
|
| 1680 |
-
"\n",
|
| 1681 |
-
" .dataframe tbody tr th {\n",
|
| 1682 |
-
" vertical-align: top;\n",
|
| 1683 |
-
" }\n",
|
| 1684 |
-
"\n",
|
| 1685 |
-
" .dataframe thead th {\n",
|
| 1686 |
-
" text-align: right;\n",
|
| 1687 |
-
" }\n",
|
| 1688 |
-
"</style>\n",
|
| 1689 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 1690 |
-
" <thead>\n",
|
| 1691 |
-
" <tr style=\"text-align: right;\">\n",
|
| 1692 |
-
" <th></th>\n",
|
| 1693 |
-
" <th>trader_address</th>\n",
|
| 1694 |
-
" <th>net_earnings</th>\n",
|
| 1695 |
-
" <th>earnings</th>\n",
|
| 1696 |
-
" <th>bet_amount</th>\n",
|
| 1697 |
-
" <th>nr_mech_calls</th>\n",
|
| 1698 |
-
" <th>roi</th>\n",
|
| 1699 |
-
" <th>month_year_week</th>\n",
|
| 1700 |
-
" <th>market_creator</th>\n",
|
| 1701 |
-
" </tr>\n",
|
| 1702 |
-
" </thead>\n",
|
| 1703 |
-
" <tbody>\n",
|
| 1704 |
-
" <tr>\n",
|
| 1705 |
-
" <th>0</th>\n",
|
| 1706 |
-
" <td>0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57</td>\n",
|
| 1707 |
-
" <td>-0.723411</td>\n",
|
| 1708 |
-
" <td>1.785135</td>\n",
|
| 1709 |
-
" <td>2.380927</td>\n",
|
| 1710 |
-
" <td>8</td>\n",
|
| 1711 |
-
" <td>-0.284704</td>\n",
|
| 1712 |
-
" <td>Jul-21</td>\n",
|
| 1713 |
-
" <td>all</td>\n",
|
| 1714 |
-
" </tr>\n",
|
| 1715 |
-
" <tr>\n",
|
| 1716 |
-
" <th>1</th>\n",
|
| 1717 |
-
" <td>0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57</td>\n",
|
| 1718 |
-
" <td>-0.723411</td>\n",
|
| 1719 |
-
" <td>1.785135</td>\n",
|
| 1720 |
-
" <td>2.380927</td>\n",
|
| 1721 |
-
" <td>8</td>\n",
|
| 1722 |
-
" <td>-0.284704</td>\n",
|
| 1723 |
-
" <td>Jul-21</td>\n",
|
| 1724 |
-
" <td>quickstart</td>\n",
|
| 1725 |
-
" </tr>\n",
|
| 1726 |
-
" <tr>\n",
|
| 1727 |
-
" <th>2</th>\n",
|
| 1728 |
-
" <td>0xf089874165be0377680683fd5187a058dea82683</td>\n",
|
| 1729 |
-
" <td>0.799649</td>\n",
|
| 1730 |
-
" <td>1.839649</td>\n",
|
| 1731 |
-
" <td>1.000000</td>\n",
|
| 1732 |
-
" <td>2</td>\n",
|
| 1733 |
-
" <td>0.768893</td>\n",
|
| 1734 |
-
" <td>Jul-21</td>\n",
|
| 1735 |
-
" <td>all</td>\n",
|
| 1736 |
-
" </tr>\n",
|
| 1737 |
-
" <tr>\n",
|
| 1738 |
-
" <th>3</th>\n",
|
| 1739 |
-
" <td>0xf089874165be0377680683fd5187a058dea82683</td>\n",
|
| 1740 |
-
" <td>0.799649</td>\n",
|
| 1741 |
-
" <td>1.839649</td>\n",
|
| 1742 |
-
" <td>1.000000</td>\n",
|
| 1743 |
-
" <td>2</td>\n",
|
| 1744 |
-
" <td>0.768893</td>\n",
|
| 1745 |
-
" <td>Jul-21</td>\n",
|
| 1746 |
-
" <td>quickstart</td>\n",
|
| 1747 |
-
" </tr>\n",
|
| 1748 |
-
" <tr>\n",
|
| 1749 |
-
" <th>4</th>\n",
|
| 1750 |
-
" <td>0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2</td>\n",
|
| 1751 |
-
" <td>-1.007165</td>\n",
|
| 1752 |
-
" <td>3.350264</td>\n",
|
| 1753 |
-
" <td>4.154342</td>\n",
|
| 1754 |
-
" <td>12</td>\n",
|
| 1755 |
-
" <td>-0.229196</td>\n",
|
| 1756 |
-
" <td>Jul-21</td>\n",
|
| 1757 |
-
" <td>all</td>\n",
|
| 1758 |
-
" </tr>\n",
|
| 1759 |
-
" <tr>\n",
|
| 1760 |
-
" <th>5</th>\n",
|
| 1761 |
-
" <td>0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2</td>\n",
|
| 1762 |
-
" <td>-1.007165</td>\n",
|
| 1763 |
-
" <td>3.350264</td>\n",
|
| 1764 |
-
" <td>4.154342</td>\n",
|
| 1765 |
-
" <td>12</td>\n",
|
| 1766 |
-
" <td>-0.229196</td>\n",
|
| 1767 |
-
" <td>Jul-21</td>\n",
|
| 1768 |
-
" <td>quickstart</td>\n",
|
| 1769 |
-
" </tr>\n",
|
| 1770 |
-
" <tr>\n",
|
| 1771 |
-
" <th>6</th>\n",
|
| 1772 |
-
" <td>0xe283e408c6017447da9fe092d52c386753699680</td>\n",
|
| 1773 |
-
" <td>-1.040000</td>\n",
|
| 1774 |
-
" <td>0.000000</td>\n",
|
| 1775 |
-
" <td>1.000000</td>\n",
|
| 1776 |
-
" <td>2</td>\n",
|
| 1777 |
-
" <td>-1.000000</td>\n",
|
| 1778 |
-
" <td>Jul-21</td>\n",
|
| 1779 |
-
" <td>all</td>\n",
|
| 1780 |
-
" </tr>\n",
|
| 1781 |
-
" <tr>\n",
|
| 1782 |
-
" <th>7</th>\n",
|
| 1783 |
-
" <td>0xe283e408c6017447da9fe092d52c386753699680</td>\n",
|
| 1784 |
-
" <td>-1.040000</td>\n",
|
| 1785 |
-
" <td>0.000000</td>\n",
|
| 1786 |
-
" <td>1.000000</td>\n",
|
| 1787 |
-
" <td>2</td>\n",
|
| 1788 |
-
" <td>-1.000000</td>\n",
|
| 1789 |
-
" <td>Jul-21</td>\n",
|
| 1790 |
-
" <td>pearl</td>\n",
|
| 1791 |
-
" </tr>\n",
|
| 1792 |
-
" <tr>\n",
|
| 1793 |
-
" <th>8</th>\n",
|
| 1794 |
-
" <td>0x480e5b5abd27cd754745871116e79caf90468dd4</td>\n",
|
| 1795 |
-
" <td>-0.367948</td>\n",
|
| 1796 |
-
" <td>1.964669</td>\n",
|
| 1797 |
-
" <td>2.247663</td>\n",
|
| 1798 |
-
" <td>4</td>\n",
|
| 1799 |
-
" <td>-0.158076</td>\n",
|
| 1800 |
-
" <td>Jul-21</td>\n",
|
| 1801 |
-
" <td>all</td>\n",
|
| 1802 |
-
" </tr>\n",
|
| 1803 |
-
" <tr>\n",
|
| 1804 |
-
" <th>9</th>\n",
|
| 1805 |
-
" <td>0x480e5b5abd27cd754745871116e79caf90468dd4</td>\n",
|
| 1806 |
-
" <td>-0.367948</td>\n",
|
| 1807 |
-
" <td>1.964669</td>\n",
|
| 1808 |
-
" <td>2.247663</td>\n",
|
| 1809 |
-
" <td>4</td>\n",
|
| 1810 |
-
" <td>-0.158076</td>\n",
|
| 1811 |
-
" <td>Jul-21</td>\n",
|
| 1812 |
-
" <td>quickstart</td>\n",
|
| 1813 |
-
" </tr>\n",
|
| 1814 |
-
" <tr>\n",
|
| 1815 |
-
" <th>10</th>\n",
|
| 1816 |
-
" <td>0x3c01b79bad670a37c8784bdf47b973b341064f10</td>\n",
|
| 1817 |
-
" <td>0.513005</td>\n",
|
| 1818 |
-
" <td>5.078853</td>\n",
|
| 1819 |
-
" <td>4.397890</td>\n",
|
| 1820 |
-
" <td>8</td>\n",
|
| 1821 |
-
" <td>0.112553</td>\n",
|
| 1822 |
-
" <td>Jul-21</td>\n",
|
| 1823 |
-
" <td>all</td>\n",
|
| 1824 |
-
" </tr>\n",
|
| 1825 |
-
" <tr>\n",
|
| 1826 |
-
" <th>11</th>\n",
|
| 1827 |
-
" <td>0x3c01b79bad670a37c8784bdf47b973b341064f10</td>\n",
|
| 1828 |
-
" <td>0.513005</td>\n",
|
| 1829 |
-
" <td>5.078853</td>\n",
|
| 1830 |
-
" <td>4.397890</td>\n",
|
| 1831 |
-
" <td>8</td>\n",
|
| 1832 |
-
" <td>0.112553</td>\n",
|
| 1833 |
-
" <td>Jul-21</td>\n",
|
| 1834 |
-
" <td>quickstart</td>\n",
|
| 1835 |
-
" </tr>\n",
|
| 1836 |
-
" <tr>\n",
|
| 1837 |
-
" <th>12</th>\n",
|
| 1838 |
-
" <td>0x8cd3e072c8341cfe1a03dbe1d6c32b5177b06164</td>\n",
|
| 1839 |
-
" <td>-0.749983</td>\n",
|
| 1840 |
-
" <td>5.962404</td>\n",
|
| 1841 |
-
" <td>6.345477</td>\n",
|
| 1842 |
-
" <td>24</td>\n",
|
| 1843 |
-
" <td>-0.109880</td>\n",
|
| 1844 |
-
" <td>Jul-21</td>\n",
|
| 1845 |
-
" <td>all</td>\n",
|
| 1846 |
-
" </tr>\n",
|
| 1847 |
-
" <tr>\n",
|
| 1848 |
-
" <th>13</th>\n",
|
| 1849 |
-
" <td>0x8cd3e072c8341cfe1a03dbe1d6c32b5177b06164</td>\n",
|
| 1850 |
-
" <td>-0.749983</td>\n",
|
| 1851 |
-
" <td>5.962404</td>\n",
|
| 1852 |
-
" <td>6.345477</td>\n",
|
| 1853 |
-
" <td>24</td>\n",
|
| 1854 |
-
" <td>-0.109880</td>\n",
|
| 1855 |
-
" <td>Jul-21</td>\n",
|
| 1856 |
-
" <td>quickstart</td>\n",
|
| 1857 |
-
" </tr>\n",
|
| 1858 |
-
" <tr>\n",
|
| 1859 |
-
" <th>14</th>\n",
|
| 1860 |
-
" <td>0x8dd0f0f64e575a356545d9ed096122a1887e64bf</td>\n",
|
| 1861 |
-
" <td>-0.117206</td>\n",
|
| 1862 |
-
" <td>3.871991</td>\n",
|
| 1863 |
-
" <td>3.763919</td>\n",
|
| 1864 |
-
" <td>15</td>\n",
|
| 1865 |
-
" <td>-0.028841</td>\n",
|
| 1866 |
-
" <td>Jul-21</td>\n",
|
| 1867 |
-
" <td>all</td>\n",
|
| 1868 |
-
" </tr>\n",
|
| 1869 |
-
" <tr>\n",
|
| 1870 |
-
" <th>15</th>\n",
|
| 1871 |
-
" <td>0x8dd0f0f64e575a356545d9ed096122a1887e64bf</td>\n",
|
| 1872 |
-
" <td>-0.117206</td>\n",
|
| 1873 |
-
" <td>3.871991</td>\n",
|
| 1874 |
-
" <td>3.763919</td>\n",
|
| 1875 |
-
" <td>15</td>\n",
|
| 1876 |
-
" <td>-0.028841</td>\n",
|
| 1877 |
-
" <td>Jul-21</td>\n",
|
| 1878 |
-
" <td>quickstart</td>\n",
|
| 1879 |
-
" </tr>\n",
|
| 1880 |
-
" <tr>\n",
|
| 1881 |
-
" <th>16</th>\n",
|
| 1882 |
-
" <td>0xec97bdf61fcb901033a3b8fcbcde77a372927b61</td>\n",
|
| 1883 |
-
" <td>-0.826362</td>\n",
|
| 1884 |
-
" <td>1.876616</td>\n",
|
| 1885 |
-
" <td>2.551938</td>\n",
|
| 1886 |
-
" <td>10</td>\n",
|
| 1887 |
-
" <td>-0.300283</td>\n",
|
| 1888 |
-
" <td>Jul-21</td>\n",
|
| 1889 |
-
" <td>all</td>\n",
|
| 1890 |
-
" </tr>\n",
|
| 1891 |
-
" <tr>\n",
|
| 1892 |
-
" <th>17</th>\n",
|
| 1893 |
-
" <td>0xec97bdf61fcb901033a3b8fcbcde77a372927b61</td>\n",
|
| 1894 |
-
" <td>-0.826362</td>\n",
|
| 1895 |
-
" <td>1.876616</td>\n",
|
| 1896 |
-
" <td>2.551938</td>\n",
|
| 1897 |
-
" <td>10</td>\n",
|
| 1898 |
-
" <td>-0.300283</td>\n",
|
| 1899 |
-
" <td>Jul-21</td>\n",
|
| 1900 |
-
" <td>quickstart</td>\n",
|
| 1901 |
-
" </tr>\n",
|
| 1902 |
-
" <tr>\n",
|
| 1903 |
-
" <th>18</th>\n",
|
| 1904 |
-
" <td>0x74d2b585a46279b4fa9feeae001efc972726c709</td>\n",
|
| 1905 |
-
" <td>0.324813</td>\n",
|
| 1906 |
-
" <td>1.558813</td>\n",
|
| 1907 |
-
" <td>1.200000</td>\n",
|
| 1908 |
-
" <td>1</td>\n",
|
| 1909 |
-
" <td>0.266240</td>\n",
|
| 1910 |
-
" <td>Jul-21</td>\n",
|
| 1911 |
-
" <td>all</td>\n",
|
| 1912 |
-
" </tr>\n",
|
| 1913 |
-
" <tr>\n",
|
| 1914 |
-
" <th>19</th>\n",
|
| 1915 |
-
" <td>0x74d2b585a46279b4fa9feeae001efc972726c709</td>\n",
|
| 1916 |
-
" <td>0.324813</td>\n",
|
| 1917 |
-
" <td>1.558813</td>\n",
|
| 1918 |
-
" <td>1.200000</td>\n",
|
| 1919 |
-
" <td>1</td>\n",
|
| 1920 |
-
" <td>0.266240</td>\n",
|
| 1921 |
-
" <td>Jul-21</td>\n",
|
| 1922 |
-
" <td>quickstart</td>\n",
|
| 1923 |
-
" </tr>\n",
|
| 1924 |
-
" <tr>\n",
|
| 1925 |
-
" <th>20</th>\n",
|
| 1926 |
-
" <td>0x22335c348afa4eae4cc6d2158c1ac259aaaecdfe</td>\n",
|
| 1927 |
-
" <td>-0.062464</td>\n",
|
| 1928 |
-
" <td>0.461536</td>\n",
|
| 1929 |
-
" <td>0.200000</td>\n",
|
| 1930 |
-
" <td>32</td>\n",
|
| 1931 |
-
" <td>-0.074362</td>\n",
|
| 1932 |
-
" <td>Jul-21</td>\n",
|
| 1933 |
-
" <td>all</td>\n",
|
| 1934 |
-
" </tr>\n",
|
| 1935 |
-
" <tr>\n",
|
| 1936 |
-
" <th>21</th>\n",
|
| 1937 |
-
" <td>0x22335c348afa4eae4cc6d2158c1ac259aaaecdfe</td>\n",
|
| 1938 |
-
" <td>-0.062464</td>\n",
|
| 1939 |
-
" <td>0.461536</td>\n",
|
| 1940 |
-
" <td>0.200000</td>\n",
|
| 1941 |
-
" <td>32</td>\n",
|
| 1942 |
-
" <td>-0.074362</td>\n",
|
| 1943 |
-
" <td>Jul-21</td>\n",
|
| 1944 |
-
" <td>quickstart</td>\n",
|
| 1945 |
-
" </tr>\n",
|
| 1946 |
-
" <tr>\n",
|
| 1947 |
-
" <th>22</th>\n",
|
| 1948 |
-
" <td>0x324267d9c6190f9bbcc126d10047eb9f761df540</td>\n",
|
| 1949 |
-
" <td>0.080695</td>\n",
|
| 1950 |
-
" <td>0.442695</td>\n",
|
| 1951 |
-
" <td>0.100000</td>\n",
|
| 1952 |
-
" <td>26</td>\n",
|
| 1953 |
-
" <td>0.130153</td>\n",
|
| 1954 |
-
" <td>Jul-21</td>\n",
|
| 1955 |
-
" <td>all</td>\n",
|
| 1956 |
-
" </tr>\n",
|
| 1957 |
-
" <tr>\n",
|
| 1958 |
-
" <th>23</th>\n",
|
| 1959 |
-
" <td>0x324267d9c6190f9bbcc126d10047eb9f761df540</td>\n",
|
| 1960 |
-
" <td>0.080695</td>\n",
|
| 1961 |
-
" <td>0.442695</td>\n",
|
| 1962 |
-
" <td>0.100000</td>\n",
|
| 1963 |
-
" <td>26</td>\n",
|
| 1964 |
-
" <td>0.130153</td>\n",
|
| 1965 |
-
" <td>Jul-21</td>\n",
|
| 1966 |
-
" <td>quickstart</td>\n",
|
| 1967 |
-
" </tr>\n",
|
| 1968 |
-
" <tr>\n",
|
| 1969 |
-
" <th>24</th>\n",
|
| 1970 |
-
" <td>0x6f99ccc54f239a9c0e7fe501e99c16b89785b96b</td>\n",
|
| 1971 |
-
" <td>-0.424000</td>\n",
|
| 1972 |
-
" <td>0.000000</td>\n",
|
| 1973 |
-
" <td>0.200000</td>\n",
|
| 1974 |
-
" <td>22</td>\n",
|
| 1975 |
-
" <td>-0.662500</td>\n",
|
| 1976 |
-
" <td>Jul-21</td>\n",
|
| 1977 |
-
" <td>all</td>\n",
|
| 1978 |
-
" </tr>\n",
|
| 1979 |
-
" <tr>\n",
|
| 1980 |
-
" <th>25</th>\n",
|
| 1981 |
-
" <td>0x6f99ccc54f239a9c0e7fe501e99c16b89785b96b</td>\n",
|
| 1982 |
-
" <td>-0.424000</td>\n",
|
| 1983 |
-
" <td>0.000000</td>\n",
|
| 1984 |
-
" <td>0.200000</td>\n",
|
| 1985 |
-
" <td>22</td>\n",
|
| 1986 |
-
" <td>-0.662500</td>\n",
|
| 1987 |
-
" <td>Jul-21</td>\n",
|
| 1988 |
-
" <td>quickstart</td>\n",
|
| 1989 |
-
" </tr>\n",
|
| 1990 |
-
" <tr>\n",
|
| 1991 |
-
" <th>26</th>\n",
|
| 1992 |
-
" <td>0x593c4ca4c85f24145de87e2591b7ec5d2e01d5e9</td>\n",
|
| 1993 |
-
" <td>1.094601</td>\n",
|
| 1994 |
-
" <td>5.047547</td>\n",
|
| 1995 |
-
" <td>3.787202</td>\n",
|
| 1996 |
-
" <td>9</td>\n",
|
| 1997 |
-
" <td>0.275913</td>\n",
|
| 1998 |
-
" <td>Jul-21</td>\n",
|
| 1999 |
-
" <td>all</td>\n",
|
| 2000 |
-
" </tr>\n",
|
| 2001 |
-
" <tr>\n",
|
| 2002 |
-
" <th>27</th>\n",
|
| 2003 |
-
" <td>0x593c4ca4c85f24145de87e2591b7ec5d2e01d5e9</td>\n",
|
| 2004 |
-
" <td>1.094601</td>\n",
|
| 2005 |
-
" <td>5.047547</td>\n",
|
| 2006 |
-
" <td>3.787202</td>\n",
|
| 2007 |
-
" <td>9</td>\n",
|
| 2008 |
-
" <td>0.275913</td>\n",
|
| 2009 |
-
" <td>Jul-21</td>\n",
|
| 2010 |
-
" <td>quickstart</td>\n",
|
| 2011 |
-
" </tr>\n",
|
| 2012 |
-
" <tr>\n",
|
| 2013 |
-
" <th>28</th>\n",
|
| 2014 |
-
" <td>0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9</td>\n",
|
| 2015 |
-
" <td>0.809649</td>\n",
|
| 2016 |
-
" <td>1.839649</td>\n",
|
| 2017 |
-
" <td>1.000000</td>\n",
|
| 2018 |
-
" <td>1</td>\n",
|
| 2019 |
-
" <td>0.793774</td>\n",
|
| 2020 |
-
" <td>Jul-21</td>\n",
|
| 2021 |
-
" <td>all</td>\n",
|
| 2022 |
-
" </tr>\n",
|
| 2023 |
-
" <tr>\n",
|
| 2024 |
-
" <th>29</th>\n",
|
| 2025 |
-
" <td>0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9</td>\n",
|
| 2026 |
-
" <td>0.809649</td>\n",
|
| 2027 |
-
" <td>1.839649</td>\n",
|
| 2028 |
-
" <td>1.000000</td>\n",
|
| 2029 |
-
" <td>1</td>\n",
|
| 2030 |
-
" <td>0.793774</td>\n",
|
| 2031 |
-
" <td>Jul-21</td>\n",
|
| 2032 |
-
" <td>pearl</td>\n",
|
| 2033 |
-
" </tr>\n",
|
| 2034 |
-
" <tr>\n",
|
| 2035 |
-
" <th>30</th>\n",
|
| 2036 |
-
" <td>0x1b9e28e7f817e1312636a485f31cca8a4be61fac</td>\n",
|
| 2037 |
-
" <td>-1.030000</td>\n",
|
| 2038 |
-
" <td>0.000000</td>\n",
|
| 2039 |
-
" <td>1.000000</td>\n",
|
| 2040 |
-
" <td>1</td>\n",
|
| 2041 |
-
" <td>-1.009804</td>\n",
|
| 2042 |
-
" <td>Jul-21</td>\n",
|
| 2043 |
-
" <td>all</td>\n",
|
| 2044 |
-
" </tr>\n",
|
| 2045 |
-
" <tr>\n",
|
| 2046 |
-
" <th>31</th>\n",
|
| 2047 |
-
" <td>0x1b9e28e7f817e1312636a485f31cca8a4be61fac</td>\n",
|
| 2048 |
-
" <td>-1.030000</td>\n",
|
| 2049 |
-
" <td>0.000000</td>\n",
|
| 2050 |
-
" <td>1.000000</td>\n",
|
| 2051 |
-
" <td>1</td>\n",
|
| 2052 |
-
" <td>-1.009804</td>\n",
|
| 2053 |
-
" <td>Jul-21</td>\n",
|
| 2054 |
-
" <td>pearl</td>\n",
|
| 2055 |
-
" </tr>\n",
|
| 2056 |
-
" <tr>\n",
|
| 2057 |
-
" <th>32</th>\n",
|
| 2058 |
-
" <td>0xe0113a139f591efa8bf5e19308c7c27199682d77</td>\n",
|
| 2059 |
-
" <td>-2.080000</td>\n",
|
| 2060 |
-
" <td>0.000000</td>\n",
|
| 2061 |
-
" <td>2.000000</td>\n",
|
| 2062 |
-
" <td>4</td>\n",
|
| 2063 |
-
" <td>-1.000000</td>\n",
|
| 2064 |
-
" <td>Jul-21</td>\n",
|
| 2065 |
-
" <td>all</td>\n",
|
| 2066 |
-
" </tr>\n",
|
| 2067 |
-
" <tr>\n",
|
| 2068 |
-
" <th>33</th>\n",
|
| 2069 |
-
" <td>0xe0113a139f591efa8bf5e19308c7c27199682d77</td>\n",
|
| 2070 |
-
" <td>-2.080000</td>\n",
|
| 2071 |
-
" <td>0.000000</td>\n",
|
| 2072 |
-
" <td>2.000000</td>\n",
|
| 2073 |
-
" <td>4</td>\n",
|
| 2074 |
-
" <td>-1.000000</td>\n",
|
| 2075 |
-
" <td>Jul-21</td>\n",
|
| 2076 |
-
" <td>pearl</td>\n",
|
| 2077 |
-
" </tr>\n",
|
| 2078 |
-
" <tr>\n",
|
| 2079 |
-
" <th>34</th>\n",
|
| 2080 |
-
" <td>0x9694c0fdb79a37d048ea19deb15e051482a690c4</td>\n",
|
| 2081 |
-
" <td>-0.344000</td>\n",
|
| 2082 |
-
" <td>0.000000</td>\n",
|
| 2083 |
-
" <td>0.200000</td>\n",
|
| 2084 |
-
" <td>14</td>\n",
|
| 2085 |
-
" <td>-0.716667</td>\n",
|
| 2086 |
-
" <td>Jul-21</td>\n",
|
| 2087 |
-
" <td>all</td>\n",
|
| 2088 |
-
" </tr>\n",
|
| 2089 |
-
" <tr>\n",
|
| 2090 |
-
" <th>35</th>\n",
|
| 2091 |
-
" <td>0x9694c0fdb79a37d048ea19deb15e051482a690c4</td>\n",
|
| 2092 |
-
" <td>-0.344000</td>\n",
|
| 2093 |
-
" <td>0.000000</td>\n",
|
| 2094 |
-
" <td>0.200000</td>\n",
|
| 2095 |
-
" <td>14</td>\n",
|
| 2096 |
-
" <td>-0.716667</td>\n",
|
| 2097 |
-
" <td>Jul-21</td>\n",
|
| 2098 |
-
" <td>quickstart</td>\n",
|
| 2099 |
-
" </tr>\n",
|
| 2100 |
-
" <tr>\n",
|
| 2101 |
-
" <th>36</th>\n",
|
| 2102 |
-
" <td>0x66a022b113b41e08d90cfd9468b8b6565d6ea995</td>\n",
|
| 2103 |
-
" <td>3.673333</td>\n",
|
| 2104 |
-
" <td>13.883333</td>\n",
|
| 2105 |
-
" <td>10.000000</td>\n",
|
| 2106 |
-
" <td>1</td>\n",
|
| 2107 |
-
" <td>0.366600</td>\n",
|
| 2108 |
-
" <td>Jul-21</td>\n",
|
| 2109 |
-
" <td>all</td>\n",
|
| 2110 |
-
" </tr>\n",
|
| 2111 |
-
" <tr>\n",
|
| 2112 |
-
" <th>37</th>\n",
|
| 2113 |
-
" <td>0x66a022b113b41e08d90cfd9468b8b6565d6ea995</td>\n",
|
| 2114 |
-
" <td>3.673333</td>\n",
|
| 2115 |
-
" <td>13.883333</td>\n",
|
| 2116 |
-
" <td>10.000000</td>\n",
|
| 2117 |
-
" <td>1</td>\n",
|
| 2118 |
-
" <td>0.366600</td>\n",
|
| 2119 |
-
" <td>Jul-21</td>\n",
|
| 2120 |
-
" <td>pearl</td>\n",
|
| 2121 |
-
" </tr>\n",
|
| 2122 |
-
" </tbody>\n",
|
| 2123 |
-
"</table>\n",
|
| 2124 |
-
"</div>"
|
| 2125 |
-
],
|
| 2126 |
-
"text/plain": [
|
| 2127 |
-
" trader_address net_earnings earnings \\\n",
|
| 2128 |
-
"0 0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57 -0.723411 1.785135 \n",
|
| 2129 |
-
"1 0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57 -0.723411 1.785135 \n",
|
| 2130 |
-
"2 0xf089874165be0377680683fd5187a058dea82683 0.799649 1.839649 \n",
|
| 2131 |
-
"3 0xf089874165be0377680683fd5187a058dea82683 0.799649 1.839649 \n",
|
| 2132 |
-
"4 0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2 -1.007165 3.350264 \n",
|
| 2133 |
-
"5 0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2 -1.007165 3.350264 \n",
|
| 2134 |
-
"6 0xe283e408c6017447da9fe092d52c386753699680 -1.040000 0.000000 \n",
|
| 2135 |
-
"7 0xe283e408c6017447da9fe092d52c386753699680 -1.040000 0.000000 \n",
|
| 2136 |
-
"8 0x480e5b5abd27cd754745871116e79caf90468dd4 -0.367948 1.964669 \n",
|
| 2137 |
-
"9 0x480e5b5abd27cd754745871116e79caf90468dd4 -0.367948 1.964669 \n",
|
| 2138 |
-
"10 0x3c01b79bad670a37c8784bdf47b973b341064f10 0.513005 5.078853 \n",
|
| 2139 |
-
"11 0x3c01b79bad670a37c8784bdf47b973b341064f10 0.513005 5.078853 \n",
|
| 2140 |
-
"12 0x8cd3e072c8341cfe1a03dbe1d6c32b5177b06164 -0.749983 5.962404 \n",
|
| 2141 |
-
"13 0x8cd3e072c8341cfe1a03dbe1d6c32b5177b06164 -0.749983 5.962404 \n",
|
| 2142 |
-
"14 0x8dd0f0f64e575a356545d9ed096122a1887e64bf -0.117206 3.871991 \n",
|
| 2143 |
-
"15 0x8dd0f0f64e575a356545d9ed096122a1887e64bf -0.117206 3.871991 \n",
|
| 2144 |
-
"16 0xec97bdf61fcb901033a3b8fcbcde77a372927b61 -0.826362 1.876616 \n",
|
| 2145 |
-
"17 0xec97bdf61fcb901033a3b8fcbcde77a372927b61 -0.826362 1.876616 \n",
|
| 2146 |
-
"18 0x74d2b585a46279b4fa9feeae001efc972726c709 0.324813 1.558813 \n",
|
| 2147 |
-
"19 0x74d2b585a46279b4fa9feeae001efc972726c709 0.324813 1.558813 \n",
|
| 2148 |
-
"20 0x22335c348afa4eae4cc6d2158c1ac259aaaecdfe -0.062464 0.461536 \n",
|
| 2149 |
-
"21 0x22335c348afa4eae4cc6d2158c1ac259aaaecdfe -0.062464 0.461536 \n",
|
| 2150 |
-
"22 0x324267d9c6190f9bbcc126d10047eb9f761df540 0.080695 0.442695 \n",
|
| 2151 |
-
"23 0x324267d9c6190f9bbcc126d10047eb9f761df540 0.080695 0.442695 \n",
|
| 2152 |
-
"24 0x6f99ccc54f239a9c0e7fe501e99c16b89785b96b -0.424000 0.000000 \n",
|
| 2153 |
-
"25 0x6f99ccc54f239a9c0e7fe501e99c16b89785b96b -0.424000 0.000000 \n",
|
| 2154 |
-
"26 0x593c4ca4c85f24145de87e2591b7ec5d2e01d5e9 1.094601 5.047547 \n",
|
| 2155 |
-
"27 0x593c4ca4c85f24145de87e2591b7ec5d2e01d5e9 1.094601 5.047547 \n",
|
| 2156 |
-
"28 0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9 0.809649 1.839649 \n",
|
| 2157 |
-
"29 0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9 0.809649 1.839649 \n",
|
| 2158 |
-
"30 0x1b9e28e7f817e1312636a485f31cca8a4be61fac -1.030000 0.000000 \n",
|
| 2159 |
-
"31 0x1b9e28e7f817e1312636a485f31cca8a4be61fac -1.030000 0.000000 \n",
|
| 2160 |
-
"32 0xe0113a139f591efa8bf5e19308c7c27199682d77 -2.080000 0.000000 \n",
|
| 2161 |
-
"33 0xe0113a139f591efa8bf5e19308c7c27199682d77 -2.080000 0.000000 \n",
|
| 2162 |
-
"34 0x9694c0fdb79a37d048ea19deb15e051482a690c4 -0.344000 0.000000 \n",
|
| 2163 |
-
"35 0x9694c0fdb79a37d048ea19deb15e051482a690c4 -0.344000 0.000000 \n",
|
| 2164 |
-
"36 0x66a022b113b41e08d90cfd9468b8b6565d6ea995 3.673333 13.883333 \n",
|
| 2165 |
-
"37 0x66a022b113b41e08d90cfd9468b8b6565d6ea995 3.673333 13.883333 \n",
|
| 2166 |
-
"\n",
|
| 2167 |
-
" bet_amount nr_mech_calls roi month_year_week market_creator \n",
|
| 2168 |
-
"0 2.380927 8 -0.284704 Jul-21 all \n",
|
| 2169 |
-
"1 2.380927 8 -0.284704 Jul-21 quickstart \n",
|
| 2170 |
-
"2 1.000000 2 0.768893 Jul-21 all \n",
|
| 2171 |
-
"3 1.000000 2 0.768893 Jul-21 quickstart \n",
|
| 2172 |
-
"4 4.154342 12 -0.229196 Jul-21 all \n",
|
| 2173 |
-
"5 4.154342 12 -0.229196 Jul-21 quickstart \n",
|
| 2174 |
-
"6 1.000000 2 -1.000000 Jul-21 all \n",
|
| 2175 |
-
"7 1.000000 2 -1.000000 Jul-21 pearl \n",
|
| 2176 |
-
"8 2.247663 4 -0.158076 Jul-21 all \n",
|
| 2177 |
-
"9 2.247663 4 -0.158076 Jul-21 quickstart \n",
|
| 2178 |
-
"10 4.397890 8 0.112553 Jul-21 all \n",
|
| 2179 |
-
"11 4.397890 8 0.112553 Jul-21 quickstart \n",
|
| 2180 |
-
"12 6.345477 24 -0.109880 Jul-21 all \n",
|
| 2181 |
-
"13 6.345477 24 -0.109880 Jul-21 quickstart \n",
|
| 2182 |
-
"14 3.763919 15 -0.028841 Jul-21 all \n",
|
| 2183 |
-
"15 3.763919 15 -0.028841 Jul-21 quickstart \n",
|
| 2184 |
-
"16 2.551938 10 -0.300283 Jul-21 all \n",
|
| 2185 |
-
"17 2.551938 10 -0.300283 Jul-21 quickstart \n",
|
| 2186 |
-
"18 1.200000 1 0.266240 Jul-21 all \n",
|
| 2187 |
-
"19 1.200000 1 0.266240 Jul-21 quickstart \n",
|
| 2188 |
-
"20 0.200000 32 -0.074362 Jul-21 all \n",
|
| 2189 |
-
"21 0.200000 32 -0.074362 Jul-21 quickstart \n",
|
| 2190 |
-
"22 0.100000 26 0.130153 Jul-21 all \n",
|
| 2191 |
-
"23 0.100000 26 0.130153 Jul-21 quickstart \n",
|
| 2192 |
-
"24 0.200000 22 -0.662500 Jul-21 all \n",
|
| 2193 |
-
"25 0.200000 22 -0.662500 Jul-21 quickstart \n",
|
| 2194 |
-
"26 3.787202 9 0.275913 Jul-21 all \n",
|
| 2195 |
-
"27 3.787202 9 0.275913 Jul-21 quickstart \n",
|
| 2196 |
-
"28 1.000000 1 0.793774 Jul-21 all \n",
|
| 2197 |
-
"29 1.000000 1 0.793774 Jul-21 pearl \n",
|
| 2198 |
-
"30 1.000000 1 -1.009804 Jul-21 all \n",
|
| 2199 |
-
"31 1.000000 1 -1.009804 Jul-21 pearl \n",
|
| 2200 |
-
"32 2.000000 4 -1.000000 Jul-21 all \n",
|
| 2201 |
-
"33 2.000000 4 -1.000000 Jul-21 pearl \n",
|
| 2202 |
-
"34 0.200000 14 -0.716667 Jul-21 all \n",
|
| 2203 |
-
"35 0.200000 14 -0.716667 Jul-21 quickstart \n",
|
| 2204 |
-
"36 10.000000 1 0.366600 Jul-21 all \n",
|
| 2205 |
-
"37 10.000000 1 0.366600 Jul-21 pearl "
|
| 2206 |
-
]
|
| 2207 |
-
},
|
| 2208 |
-
"execution_count": 43,
|
| 2209 |
-
"metadata": {},
|
| 2210 |
-
"output_type": "execute_result"
|
| 2211 |
-
}
|
| 2212 |
-
],
|
| 2213 |
"source": [
|
| 2214 |
"compute_weekly_metrics_by_market_creator(trader_agent_metrics)"
|
| 2215 |
]
|
|
|
|
| 1353 |
},
|
| 1354 |
{
|
| 1355 |
"cell_type": "code",
|
| 1356 |
+
"execution_count": null,
|
| 1357 |
"metadata": {},
|
| 1358 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1359 |
"source": [
|
| 1360 |
"compute_weekly_metrics_by_market_creator(trader_agent_metrics)"
|
| 1361 |
]
|
notebooks/winning_perc.ipynb
CHANGED
|
@@ -2,11 +2,14 @@
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
-
"execution_count":
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [],
|
| 8 |
"source": [
|
| 9 |
-
"import pandas as pd"
|
|
|
|
|
|
|
|
|
|
| 10 |
]
|
| 11 |
},
|
| 12 |
{
|
|
@@ -18,39 +21,6 @@
|
|
| 18 |
"all_trades = pd.read_parquet('../data/all_trades_profitability.parquet')"
|
| 19 |
]
|
| 20 |
},
|
| 21 |
-
{
|
| 22 |
-
"cell_type": "code",
|
| 23 |
-
"execution_count": 4,
|
| 24 |
-
"metadata": {},
|
| 25 |
-
"outputs": [],
|
| 26 |
-
"source": [
|
| 27 |
-
"all_trades[\"creation_date\"] = all_trades[\"creation_timestamp\"].dt.date"
|
| 28 |
-
]
|
| 29 |
-
},
|
| 30 |
-
{
|
| 31 |
-
"cell_type": "code",
|
| 32 |
-
"execution_count": 5,
|
| 33 |
-
"metadata": {},
|
| 34 |
-
"outputs": [
|
| 35 |
-
{
|
| 36 |
-
"name": "stderr",
|
| 37 |
-
"output_type": "stream",
|
| 38 |
-
"text": [
|
| 39 |
-
"/var/folders/gp/02mb1d514ng739czlxw1lhh00000gn/T/ipykernel_38171/1825242321.py:6: UserWarning: Converting to PeriodArray/Index representation will drop timezone information.\n",
|
| 40 |
-
" all_trades[\"creation_timestamp\"].dt.to_period(\"W\").dt.strftime(\"%b-%d\")\n"
|
| 41 |
-
]
|
| 42 |
-
}
|
| 43 |
-
],
|
| 44 |
-
"source": [
|
| 45 |
-
"all_trades = all_trades.sort_values(\n",
|
| 46 |
-
" by=\"creation_timestamp\", ascending=True\n",
|
| 47 |
-
")\n",
|
| 48 |
-
"\n",
|
| 49 |
-
"all_trades[\"month_year_week\"] = (\n",
|
| 50 |
-
" all_trades[\"creation_timestamp\"].dt.to_period(\"W\").dt.strftime(\"%b-%d\")\n",
|
| 51 |
-
")"
|
| 52 |
-
]
|
| 53 |
-
},
|
| 54 |
{
|
| 55 |
"cell_type": "code",
|
| 56 |
"execution_count": 6,
|
|
@@ -153,97 +123,9 @@
|
|
| 153 |
},
|
| 154 |
{
|
| 155 |
"cell_type": "code",
|
| 156 |
-
"execution_count":
|
| 157 |
"metadata": {},
|
| 158 |
-
"outputs": [
|
| 159 |
-
{
|
| 160 |
-
"data": {
|
| 161 |
-
"text/html": [
|
| 162 |
-
"<div>\n",
|
| 163 |
-
"<style scoped>\n",
|
| 164 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 165 |
-
" vertical-align: middle;\n",
|
| 166 |
-
" }\n",
|
| 167 |
-
"\n",
|
| 168 |
-
" .dataframe tbody tr th {\n",
|
| 169 |
-
" vertical-align: top;\n",
|
| 170 |
-
" }\n",
|
| 171 |
-
"\n",
|
| 172 |
-
" .dataframe thead th {\n",
|
| 173 |
-
" text-align: right;\n",
|
| 174 |
-
" }\n",
|
| 175 |
-
"</style>\n",
|
| 176 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 177 |
-
" <thead>\n",
|
| 178 |
-
" <tr style=\"text-align: right;\">\n",
|
| 179 |
-
" <th></th>\n",
|
| 180 |
-
" <th>month_year_week</th>\n",
|
| 181 |
-
" <th>market_creator</th>\n",
|
| 182 |
-
" <th>trader_address</th>\n",
|
| 183 |
-
" <th>winning_trade</th>\n",
|
| 184 |
-
" </tr>\n",
|
| 185 |
-
" </thead>\n",
|
| 186 |
-
" <tbody>\n",
|
| 187 |
-
" <tr>\n",
|
| 188 |
-
" <th>0</th>\n",
|
| 189 |
-
" <td>Jul-21</td>\n",
|
| 190 |
-
" <td>all</td>\n",
|
| 191 |
-
" <td>0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57</td>\n",
|
| 192 |
-
" <td>33.333333</td>\n",
|
| 193 |
-
" </tr>\n",
|
| 194 |
-
" <tr>\n",
|
| 195 |
-
" <th>1</th>\n",
|
| 196 |
-
" <td>Jul-21</td>\n",
|
| 197 |
-
" <td>quickstart</td>\n",
|
| 198 |
-
" <td>0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57</td>\n",
|
| 199 |
-
" <td>33.333333</td>\n",
|
| 200 |
-
" </tr>\n",
|
| 201 |
-
" <tr>\n",
|
| 202 |
-
" <th>2</th>\n",
|
| 203 |
-
" <td>Jul-21</td>\n",
|
| 204 |
-
" <td>quickstart</td>\n",
|
| 205 |
-
" <td>0xf089874165be0377680683fd5187a058dea82683</td>\n",
|
| 206 |
-
" <td>100.000000</td>\n",
|
| 207 |
-
" </tr>\n",
|
| 208 |
-
" <tr>\n",
|
| 209 |
-
" <th>3</th>\n",
|
| 210 |
-
" <td>Jul-21</td>\n",
|
| 211 |
-
" <td>all</td>\n",
|
| 212 |
-
" <td>0xf089874165be0377680683fd5187a058dea82683</td>\n",
|
| 213 |
-
" <td>100.000000</td>\n",
|
| 214 |
-
" </tr>\n",
|
| 215 |
-
" <tr>\n",
|
| 216 |
-
" <th>4</th>\n",
|
| 217 |
-
" <td>Jul-21</td>\n",
|
| 218 |
-
" <td>quickstart</td>\n",
|
| 219 |
-
" <td>0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2</td>\n",
|
| 220 |
-
" <td>50.000000</td>\n",
|
| 221 |
-
" </tr>\n",
|
| 222 |
-
" </tbody>\n",
|
| 223 |
-
"</table>\n",
|
| 224 |
-
"</div>"
|
| 225 |
-
],
|
| 226 |
-
"text/plain": [
|
| 227 |
-
" month_year_week market_creator trader_address \\\n",
|
| 228 |
-
"0 Jul-21 all 0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57 \n",
|
| 229 |
-
"1 Jul-21 quickstart 0x95ecc70d9f4feb162ed9f41c4432d990c36c8f57 \n",
|
| 230 |
-
"2 Jul-21 quickstart 0xf089874165be0377680683fd5187a058dea82683 \n",
|
| 231 |
-
"3 Jul-21 all 0xf089874165be0377680683fd5187a058dea82683 \n",
|
| 232 |
-
"4 Jul-21 quickstart 0x49f4e3d8edc85efda9b0a36d96e406a59b13fcc2 \n",
|
| 233 |
-
"\n",
|
| 234 |
-
" winning_trade \n",
|
| 235 |
-
"0 33.333333 \n",
|
| 236 |
-
"1 33.333333 \n",
|
| 237 |
-
"2 100.000000 \n",
|
| 238 |
-
"3 100.000000 \n",
|
| 239 |
-
"4 50.000000 "
|
| 240 |
-
]
|
| 241 |
-
},
|
| 242 |
-
"execution_count": 28,
|
| 243 |
-
"metadata": {},
|
| 244 |
-
"output_type": "execute_result"
|
| 245 |
-
}
|
| 246 |
-
],
|
| 247 |
"source": [
|
| 248 |
"from tqdm import tqdm\n",
|
| 249 |
"\n",
|
|
@@ -280,97 +162,9 @@
|
|
| 280 |
},
|
| 281 |
{
|
| 282 |
"cell_type": "code",
|
| 283 |
-
"execution_count":
|
| 284 |
"metadata": {},
|
| 285 |
-
"outputs": [
|
| 286 |
-
{
|
| 287 |
-
"data": {
|
| 288 |
-
"text/html": [
|
| 289 |
-
"<div>\n",
|
| 290 |
-
"<style scoped>\n",
|
| 291 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 292 |
-
" vertical-align: middle;\n",
|
| 293 |
-
" }\n",
|
| 294 |
-
"\n",
|
| 295 |
-
" .dataframe tbody tr th {\n",
|
| 296 |
-
" vertical-align: top;\n",
|
| 297 |
-
" }\n",
|
| 298 |
-
"\n",
|
| 299 |
-
" .dataframe thead th {\n",
|
| 300 |
-
" text-align: right;\n",
|
| 301 |
-
" }\n",
|
| 302 |
-
"</style>\n",
|
| 303 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 304 |
-
" <thead>\n",
|
| 305 |
-
" <tr style=\"text-align: right;\">\n",
|
| 306 |
-
" <th></th>\n",
|
| 307 |
-
" <th>month_year_week</th>\n",
|
| 308 |
-
" <th>market_creator</th>\n",
|
| 309 |
-
" <th>trader_address</th>\n",
|
| 310 |
-
" <th>winning_trade</th>\n",
|
| 311 |
-
" </tr>\n",
|
| 312 |
-
" </thead>\n",
|
| 313 |
-
" <tbody>\n",
|
| 314 |
-
" <tr>\n",
|
| 315 |
-
" <th>7</th>\n",
|
| 316 |
-
" <td>Jul-21</td>\n",
|
| 317 |
-
" <td>pearl</td>\n",
|
| 318 |
-
" <td>0xe283e408c6017447da9fe092d52c386753699680</td>\n",
|
| 319 |
-
" <td>0.0</td>\n",
|
| 320 |
-
" </tr>\n",
|
| 321 |
-
" <tr>\n",
|
| 322 |
-
" <th>29</th>\n",
|
| 323 |
-
" <td>Jul-21</td>\n",
|
| 324 |
-
" <td>pearl</td>\n",
|
| 325 |
-
" <td>0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9</td>\n",
|
| 326 |
-
" <td>100.0</td>\n",
|
| 327 |
-
" </tr>\n",
|
| 328 |
-
" <tr>\n",
|
| 329 |
-
" <th>30</th>\n",
|
| 330 |
-
" <td>Jul-21</td>\n",
|
| 331 |
-
" <td>pearl</td>\n",
|
| 332 |
-
" <td>0x1b9e28e7f817e1312636a485f31cca8a4be61fac</td>\n",
|
| 333 |
-
" <td>0.0</td>\n",
|
| 334 |
-
" </tr>\n",
|
| 335 |
-
" <tr>\n",
|
| 336 |
-
" <th>33</th>\n",
|
| 337 |
-
" <td>Jul-21</td>\n",
|
| 338 |
-
" <td>pearl</td>\n",
|
| 339 |
-
" <td>0xe0113a139f591efa8bf5e19308c7c27199682d77</td>\n",
|
| 340 |
-
" <td>0.0</td>\n",
|
| 341 |
-
" </tr>\n",
|
| 342 |
-
" <tr>\n",
|
| 343 |
-
" <th>37</th>\n",
|
| 344 |
-
" <td>Jul-21</td>\n",
|
| 345 |
-
" <td>pearl</td>\n",
|
| 346 |
-
" <td>0x66a022b113b41e08d90cfd9468b8b6565d6ea995</td>\n",
|
| 347 |
-
" <td>100.0</td>\n",
|
| 348 |
-
" </tr>\n",
|
| 349 |
-
" </tbody>\n",
|
| 350 |
-
"</table>\n",
|
| 351 |
-
"</div>"
|
| 352 |
-
],
|
| 353 |
-
"text/plain": [
|
| 354 |
-
" month_year_week market_creator trader_address \\\n",
|
| 355 |
-
"7 Jul-21 pearl 0xe283e408c6017447da9fe092d52c386753699680 \n",
|
| 356 |
-
"29 Jul-21 pearl 0x913dedfcfb335a49509b67acb3b1ab2612a5c0c9 \n",
|
| 357 |
-
"30 Jul-21 pearl 0x1b9e28e7f817e1312636a485f31cca8a4be61fac \n",
|
| 358 |
-
"33 Jul-21 pearl 0xe0113a139f591efa8bf5e19308c7c27199682d77 \n",
|
| 359 |
-
"37 Jul-21 pearl 0x66a022b113b41e08d90cfd9468b8b6565d6ea995 \n",
|
| 360 |
-
"\n",
|
| 361 |
-
" winning_trade \n",
|
| 362 |
-
"7 0.0 \n",
|
| 363 |
-
"29 100.0 \n",
|
| 364 |
-
"30 0.0 \n",
|
| 365 |
-
"33 0.0 \n",
|
| 366 |
-
"37 100.0 "
|
| 367 |
-
]
|
| 368 |
-
},
|
| 369 |
-
"execution_count": 30,
|
| 370 |
-
"metadata": {},
|
| 371 |
-
"output_type": "execute_result"
|
| 372 |
-
}
|
| 373 |
-
],
|
| 374 |
"source": [
|
| 375 |
"winning_pearl.head()"
|
| 376 |
]
|
|
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
+
"execution_count": 10,
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [],
|
| 8 |
"source": [
|
| 9 |
+
"import pandas as pd\n",
|
| 10 |
+
"import sys\n",
|
| 11 |
+
"sys.path.append('..')\n",
|
| 12 |
+
"from scripts.metrics import compute_weekly_metrics_by_market_creator"
|
| 13 |
]
|
| 14 |
},
|
| 15 |
{
|
|
|
|
| 21 |
"all_trades = pd.read_parquet('../data/all_trades_profitability.parquet')"
|
| 22 |
]
|
| 23 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
{
|
| 25 |
"cell_type": "code",
|
| 26 |
"execution_count": 6,
|
|
|
|
| 123 |
},
|
| 124 |
{
|
| 125 |
"cell_type": "code",
|
| 126 |
+
"execution_count": null,
|
| 127 |
"metadata": {},
|
| 128 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
"source": [
|
| 130 |
"from tqdm import tqdm\n",
|
| 131 |
"\n",
|
|
|
|
| 162 |
},
|
| 163 |
{
|
| 164 |
"cell_type": "code",
|
| 165 |
+
"execution_count": null,
|
| 166 |
"metadata": {},
|
| 167 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
"source": [
|
| 169 |
"winning_pearl.head()"
|
| 170 |
]
|
scripts/metrics.py
CHANGED
|
@@ -4,7 +4,9 @@ from tqdm import tqdm
|
|
| 4 |
DEFAULT_MECH_FEE = 0.01 # xDAI
|
| 5 |
|
| 6 |
|
| 7 |
-
def compute_metrics(
|
|
|
|
|
|
|
| 8 |
|
| 9 |
if len(trader_data) == 0:
|
| 10 |
# print("No data to compute metrics")
|
|
@@ -12,13 +14,16 @@ def compute_metrics(trader_address: str, trader_data: pd.DataFrame) -> dict:
|
|
| 12 |
|
| 13 |
agg_metrics = {}
|
| 14 |
agg_metrics["trader_address"] = trader_address
|
| 15 |
-
total_net_earnings = trader_data.net_earnings.sum()
|
| 16 |
total_bet_amounts = trader_data.collateral_amount.sum()
|
| 17 |
total_num_mech_calls = trader_data.num_mech_calls.sum()
|
| 18 |
-
agg_metrics["net_earnings"] = total_net_earnings
|
| 19 |
-
agg_metrics["earnings"] = trader_data.earnings.sum()
|
| 20 |
agg_metrics["bet_amount"] = total_bet_amounts
|
| 21 |
agg_metrics["nr_mech_calls"] = total_num_mech_calls
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
agg_metrics["nr_trades"] = len(trader_data)
|
| 23 |
total_fee_amounts = trader_data.mech_fee_amount.sum()
|
| 24 |
total_costs = (
|
|
@@ -31,7 +36,10 @@ def compute_metrics(trader_address: str, trader_data: pd.DataFrame) -> dict:
|
|
| 31 |
|
| 32 |
|
| 33 |
def compute_trader_metrics_by_market_creator(
|
| 34 |
-
trader_address: str,
|
|
|
|
|
|
|
|
|
|
| 35 |
) -> dict:
|
| 36 |
"""This function computes for a specific time window (week or day) the different metrics:
|
| 37 |
roi, net_earnings, earnings, bet_amount, nr_mech_calls and nr_trades.
|
|
@@ -50,7 +58,7 @@ def compute_trader_metrics_by_market_creator(
|
|
| 50 |
# tqdm.write(f"No data. Skipping market creator {market_creator}")
|
| 51 |
return {} # No Data
|
| 52 |
|
| 53 |
-
metrics = compute_metrics(trader_address, filtered_traders_data)
|
| 54 |
return metrics
|
| 55 |
|
| 56 |
|
|
@@ -112,20 +120,21 @@ def merge_trader_weekly_metrics(
|
|
| 112 |
|
| 113 |
|
| 114 |
def merge_trader_daily_metrics(
|
| 115 |
-
trader: str, daily_data: pd.DataFrame, day: str
|
| 116 |
) -> pd.DataFrame:
|
| 117 |
trader_metrics = []
|
| 118 |
# computation as specification 1 for all types of markets
|
| 119 |
daily_metrics_all = compute_trader_metrics_by_market_creator(
|
| 120 |
-
trader, daily_data, market_creator="all"
|
| 121 |
)
|
| 122 |
daily_metrics_all["creation_date"] = day
|
|
|
|
| 123 |
daily_metrics_all["market_creator"] = "all"
|
| 124 |
trader_metrics.append(daily_metrics_all)
|
| 125 |
|
| 126 |
# computation as specification 1 for quickstart markets
|
| 127 |
daily_metrics_qs = compute_trader_metrics_by_market_creator(
|
| 128 |
-
trader, daily_data, market_creator="quickstart"
|
| 129 |
)
|
| 130 |
if len(daily_metrics_qs) > 0:
|
| 131 |
daily_metrics_qs["creation_date"] = day
|
|
@@ -133,7 +142,7 @@ def merge_trader_daily_metrics(
|
|
| 133 |
trader_metrics.append(daily_metrics_qs)
|
| 134 |
# computation as specification 1 for pearl markets
|
| 135 |
daily_metrics_pearl = compute_trader_metrics_by_market_creator(
|
| 136 |
-
trader, daily_data, market_creator="pearl"
|
| 137 |
)
|
| 138 |
if len(daily_metrics_pearl) > 0:
|
| 139 |
daily_metrics_pearl["creation_date"] = day
|
|
@@ -193,32 +202,35 @@ def compute_weekly_metrics_by_market_creator(
|
|
| 193 |
|
| 194 |
|
| 195 |
def compute_daily_metrics_by_market_creator(
|
| 196 |
-
trader_agents_data: pd.DataFrame,
|
|
|
|
|
|
|
| 197 |
) -> pd.DataFrame:
|
| 198 |
"""Function to compute the metrics at the trader level per day
|
| 199 |
and with different categories by market creator"""
|
| 200 |
contents = []
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
print(f"Computing daily metrics for week ={last_week} by market creator")
|
| 204 |
-
last_week_data = trader_agents_data.loc[
|
| 205 |
-
trader_agents_data["month_year_week"] == last_week
|
| 206 |
-
]
|
| 207 |
-
all_days = list(last_week_data.creation_date.unique())
|
| 208 |
for day in all_days:
|
| 209 |
-
daily_data =
|
| 210 |
print(f"Computing daily metrics for {day}")
|
| 211 |
# traverse each trader agent
|
| 212 |
traders = list(daily_data.trader_address.unique())
|
| 213 |
for trader in tqdm(traders, desc=f"Trader' daily metrics", unit="metrics"):
|
| 214 |
if trader_filter is None:
|
| 215 |
-
contents.append(
|
|
|
|
|
|
|
| 216 |
elif trader_filter == "agentic":
|
| 217 |
filtered_data = daily_data.loc[daily_data["staking"] != "non_agent"]
|
| 218 |
-
contents.append(
|
|
|
|
|
|
|
| 219 |
else: # non_agent traders
|
| 220 |
filtered_data = daily_data.loc[daily_data["staking"] == "non_agent"]
|
| 221 |
-
contents.append(
|
|
|
|
|
|
|
| 222 |
print("End computing all daily metrics by market creator")
|
| 223 |
return pd.concat(contents, ignore_index=True)
|
| 224 |
|
|
|
|
| 4 |
DEFAULT_MECH_FEE = 0.01 # xDAI
|
| 5 |
|
| 6 |
|
| 7 |
+
def compute_metrics(
|
| 8 |
+
trader_address: str, trader_data: pd.DataFrame, live_metrics: bool = False
|
| 9 |
+
) -> dict:
|
| 10 |
|
| 11 |
if len(trader_data) == 0:
|
| 12 |
# print("No data to compute metrics")
|
|
|
|
| 14 |
|
| 15 |
agg_metrics = {}
|
| 16 |
agg_metrics["trader_address"] = trader_address
|
|
|
|
| 17 |
total_bet_amounts = trader_data.collateral_amount.sum()
|
| 18 |
total_num_mech_calls = trader_data.num_mech_calls.sum()
|
|
|
|
|
|
|
| 19 |
agg_metrics["bet_amount"] = total_bet_amounts
|
| 20 |
agg_metrics["nr_mech_calls"] = total_num_mech_calls
|
| 21 |
+
agg_metrics["staking"] = trader_data.iloc[0].staking
|
| 22 |
+
if live_metrics:
|
| 23 |
+
return agg_metrics
|
| 24 |
+
total_net_earnings = trader_data.net_earnings.sum()
|
| 25 |
+
agg_metrics["net_earnings"] = total_net_earnings
|
| 26 |
+
agg_metrics["earnings"] = trader_data.earnings.sum()
|
| 27 |
agg_metrics["nr_trades"] = len(trader_data)
|
| 28 |
total_fee_amounts = trader_data.mech_fee_amount.sum()
|
| 29 |
total_costs = (
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
def compute_trader_metrics_by_market_creator(
|
| 39 |
+
trader_address: str,
|
| 40 |
+
traders_data: pd.DataFrame,
|
| 41 |
+
market_creator: str = "all",
|
| 42 |
+
live_metrics: bool = False,
|
| 43 |
) -> dict:
|
| 44 |
"""This function computes for a specific time window (week or day) the different metrics:
|
| 45 |
roi, net_earnings, earnings, bet_amount, nr_mech_calls and nr_trades.
|
|
|
|
| 58 |
# tqdm.write(f"No data. Skipping market creator {market_creator}")
|
| 59 |
return {} # No Data
|
| 60 |
|
| 61 |
+
metrics = compute_metrics(trader_address, filtered_traders_data, live_metrics)
|
| 62 |
return metrics
|
| 63 |
|
| 64 |
|
|
|
|
| 120 |
|
| 121 |
|
| 122 |
def merge_trader_daily_metrics(
|
| 123 |
+
trader: str, daily_data: pd.DataFrame, day: str, live_metrics: bool = False
|
| 124 |
) -> pd.DataFrame:
|
| 125 |
trader_metrics = []
|
| 126 |
# computation as specification 1 for all types of markets
|
| 127 |
daily_metrics_all = compute_trader_metrics_by_market_creator(
|
| 128 |
+
trader, daily_data, market_creator="all", live_metrics=live_metrics
|
| 129 |
)
|
| 130 |
daily_metrics_all["creation_date"] = day
|
| 131 |
+
# staking label is at the trader level
|
| 132 |
daily_metrics_all["market_creator"] = "all"
|
| 133 |
trader_metrics.append(daily_metrics_all)
|
| 134 |
|
| 135 |
# computation as specification 1 for quickstart markets
|
| 136 |
daily_metrics_qs = compute_trader_metrics_by_market_creator(
|
| 137 |
+
trader, daily_data, market_creator="quickstart", live_metrics=live_metrics
|
| 138 |
)
|
| 139 |
if len(daily_metrics_qs) > 0:
|
| 140 |
daily_metrics_qs["creation_date"] = day
|
|
|
|
| 142 |
trader_metrics.append(daily_metrics_qs)
|
| 143 |
# computation as specification 1 for pearl markets
|
| 144 |
daily_metrics_pearl = compute_trader_metrics_by_market_creator(
|
| 145 |
+
trader, daily_data, market_creator="pearl", live_metrics=live_metrics
|
| 146 |
)
|
| 147 |
if len(daily_metrics_pearl) > 0:
|
| 148 |
daily_metrics_pearl["creation_date"] = day
|
|
|
|
| 202 |
|
| 203 |
|
| 204 |
def compute_daily_metrics_by_market_creator(
|
| 205 |
+
trader_agents_data: pd.DataFrame,
|
| 206 |
+
trader_filter: str = None,
|
| 207 |
+
live_metrics: bool = False,
|
| 208 |
) -> pd.DataFrame:
|
| 209 |
"""Function to compute the metrics at the trader level per day
|
| 210 |
and with different categories by market creator"""
|
| 211 |
contents = []
|
| 212 |
+
|
| 213 |
+
all_days = list(trader_agents_data.creation_date.unique())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
for day in all_days:
|
| 215 |
+
daily_data = trader_agents_data.loc[trader_agents_data["creation_date"] == day]
|
| 216 |
print(f"Computing daily metrics for {day}")
|
| 217 |
# traverse each trader agent
|
| 218 |
traders = list(daily_data.trader_address.unique())
|
| 219 |
for trader in tqdm(traders, desc=f"Trader' daily metrics", unit="metrics"):
|
| 220 |
if trader_filter is None:
|
| 221 |
+
contents.append(
|
| 222 |
+
merge_trader_daily_metrics(trader, daily_data, day, live_metrics)
|
| 223 |
+
)
|
| 224 |
elif trader_filter == "agentic":
|
| 225 |
filtered_data = daily_data.loc[daily_data["staking"] != "non_agent"]
|
| 226 |
+
contents.append(
|
| 227 |
+
merge_trader_daily_metrics(trader, filtered_data, day, live_metrics)
|
| 228 |
+
)
|
| 229 |
else: # non_agent traders
|
| 230 |
filtered_data = daily_data.loc[daily_data["staking"] == "non_agent"]
|
| 231 |
+
contents.append(
|
| 232 |
+
merge_trader_daily_metrics(trader, filtered_data, day, live_metrics)
|
| 233 |
+
)
|
| 234 |
print("End computing all daily metrics by market creator")
|
| 235 |
return pd.concat(contents, ignore_index=True)
|
| 236 |
|
tabs/daily_graphs.py
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import pandas as pd
|
| 2 |
+
import gradio as gr
|
| 3 |
+
import gc
|
| 4 |
+
import plotly.express as px
|
| 5 |
+
from plotly.subplots import make_subplots
|
| 6 |
+
import plotly.graph_objects as go
|
| 7 |
+
from datetime import datetime, timedelta
|
| 8 |
+
from tqdm import tqdm
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def plot_daily_trades(trades_df: pd.DataFrame) -> gr.Plot:
|
| 12 |
+
# get daily trades
|
| 13 |
+
daily_trades_count = (
|
| 14 |
+
trades_df.groupby("month_year_week").size().reset_index(name="trades")
|
| 15 |
+
)
|
| 16 |
+
daily_trades_count.columns = daily_trades_count.columns.astype(str)
|
| 17 |
+
print("WIP")
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def get_current_week_data(trades_df: pd.DataFrame) -> pd.DataFrame:
|
| 21 |
+
# Get current date
|
| 22 |
+
now = datetime.now()
|
| 23 |
+
|
| 24 |
+
# Get start of the current week (Monday)
|
| 25 |
+
start_of_week = now - timedelta(days=now.weekday())
|
| 26 |
+
start_of_week = start_of_week.replace(hour=0, minute=0, second=0, microsecond=0)
|
| 27 |
+
print(f"start of the week = {start_of_week}")
|
| 28 |
+
|
| 29 |
+
# Get end of the current week (Sunday)
|
| 30 |
+
end_of_week = start_of_week + timedelta(days=6)
|
| 31 |
+
end_of_week = end_of_week.replace(hour=23, minute=59, second=59, microsecond=999999)
|
| 32 |
+
print(f"end of the week = {end_of_week}")
|
| 33 |
+
trades_df["creation_date"] = pd.to_datetime(trades_df["creation_date"])
|
| 34 |
+
# Filter the dataframe
|
| 35 |
+
return trades_df[
|
| 36 |
+
(trades_df["creation_date"] >= start_of_week)
|
| 37 |
+
& (trades_df["creation_date"] <= end_of_week)
|
| 38 |
+
]
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def get_boxplot_daily_metrics(
|
| 42 |
+
column_name: str, trades_df: pd.DataFrame
|
| 43 |
+
) -> pd.DataFrame:
|
| 44 |
+
trades_filtered = trades_df[
|
| 45 |
+
[
|
| 46 |
+
"creation_timestamp",
|
| 47 |
+
"creation_date",
|
| 48 |
+
"market_creator",
|
| 49 |
+
"trader_address",
|
| 50 |
+
"staking",
|
| 51 |
+
column_name,
|
| 52 |
+
]
|
| 53 |
+
]
|
| 54 |
+
|
| 55 |
+
# adding the total
|
| 56 |
+
trades_filtered_all = trades_filtered.copy(deep=True)
|
| 57 |
+
trades_filtered_all["market_creator"] = "all"
|
| 58 |
+
|
| 59 |
+
# merging both dataframes
|
| 60 |
+
all_filtered_trades = pd.concat(
|
| 61 |
+
[trades_filtered, trades_filtered_all], ignore_index=True
|
| 62 |
+
)
|
| 63 |
+
all_filtered_trades = all_filtered_trades.sort_values(
|
| 64 |
+
by="creation_timestamp", ascending=True
|
| 65 |
+
)
|
| 66 |
+
gc.collect()
|
| 67 |
+
return all_filtered_trades
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
def plot_daily_metrics(
|
| 71 |
+
metric_name: str, trades_df: pd.DataFrame, trader_filter: str = None
|
| 72 |
+
) -> gr.Plot:
|
| 73 |
+
"""Plots the trade metrics."""
|
| 74 |
+
|
| 75 |
+
if metric_name == "mech calls":
|
| 76 |
+
metric_name = "mech_calls"
|
| 77 |
+
column_name = "num_mech_calls"
|
| 78 |
+
yaxis_title = "Nr of mech calls per trade"
|
| 79 |
+
elif metric_name == "ROI":
|
| 80 |
+
column_name = "roi"
|
| 81 |
+
yaxis_title = "ROI (net profit/cost)"
|
| 82 |
+
elif metric_name == "collateral amount":
|
| 83 |
+
metric_name = "bet_amount"
|
| 84 |
+
column_name = metric_name
|
| 85 |
+
yaxis_title = "Collateral amount per trade (xDAI)"
|
| 86 |
+
elif metric_name == "net earnings":
|
| 87 |
+
metric_name = "net_earnings"
|
| 88 |
+
column_name = metric_name
|
| 89 |
+
yaxis_title = "Net profit per trade (xDAI)"
|
| 90 |
+
else: # earnings
|
| 91 |
+
column_name = metric_name
|
| 92 |
+
yaxis_title = "Gross profit per trade (xDAI)"
|
| 93 |
+
|
| 94 |
+
if trader_filter == "agent":
|
| 95 |
+
trades_filtered = trades_df.loc[trades_df["staking"] != "non_agent"]
|
| 96 |
+
elif trader_filter == "non_agent":
|
| 97 |
+
trades_filtered = trades_df.loc[trades_df["staking"] == "non_agent"]
|
| 98 |
+
else:
|
| 99 |
+
trades_filtered = trades_df
|
| 100 |
+
color_mapping = [
|
| 101 |
+
"darkviolet",
|
| 102 |
+
"purple",
|
| 103 |
+
"goldenrod",
|
| 104 |
+
"darkgoldenrod",
|
| 105 |
+
"green",
|
| 106 |
+
"darkgreen",
|
| 107 |
+
]
|
| 108 |
+
|
| 109 |
+
# Create binary staking category
|
| 110 |
+
trades_filtered["trader_type"] = trades_filtered["staking"].apply(
|
| 111 |
+
lambda x: "non_agent" if x == "non_agent" else "agent"
|
| 112 |
+
)
|
| 113 |
+
trades_filtered["trader_market"] = trades_filtered.apply(
|
| 114 |
+
lambda x: (x["trader_type"], x["market_creator"]), axis=1
|
| 115 |
+
)
|
| 116 |
+
fig = px.box(
|
| 117 |
+
trades_filtered,
|
| 118 |
+
x="creation_date",
|
| 119 |
+
y=column_name,
|
| 120 |
+
color="trader_market",
|
| 121 |
+
color_discrete_sequence=color_mapping,
|
| 122 |
+
category_orders={
|
| 123 |
+
"market_creator": ["pearl", "quickstart", "all"],
|
| 124 |
+
"trader_market": [
|
| 125 |
+
("agent", "pearl"),
|
| 126 |
+
("non_agent", "pearl"),
|
| 127 |
+
("agent", "quickstart"),
|
| 128 |
+
("non_agent", "quickstart"),
|
| 129 |
+
("agent", "all"),
|
| 130 |
+
("non_agent", "all"),
|
| 131 |
+
],
|
| 132 |
+
},
|
| 133 |
+
facet_col="market_creator",
|
| 134 |
+
)
|
| 135 |
+
fig.update_traces(boxmean=True)
|
| 136 |
+
fig.update_layout(
|
| 137 |
+
xaxis_title="Day",
|
| 138 |
+
yaxis_title=yaxis_title,
|
| 139 |
+
legend=dict(yanchor="top", y=0.5),
|
| 140 |
+
)
|
| 141 |
+
for axis in fig.layout:
|
| 142 |
+
if axis.startswith("xaxis"):
|
| 143 |
+
fig.layout[axis].update(title="Day")
|
| 144 |
+
fig.update_xaxes(tickformat="%b %d")
|
| 145 |
+
return gr.Plot(
|
| 146 |
+
value=fig,
|
| 147 |
+
)
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
def plot_daily_metrics_v2(
|
| 151 |
+
metric_name: str, trades_df: pd.DataFrame, trader_filter: str = None
|
| 152 |
+
) -> gr.Plot:
|
| 153 |
+
"""Plots the trade metrics."""
|
| 154 |
+
|
| 155 |
+
if metric_name == "mech calls":
|
| 156 |
+
metric_name = "mech_calls"
|
| 157 |
+
column_name = "num_mech_calls"
|
| 158 |
+
yaxis_title = "Nr of mech calls per trade"
|
| 159 |
+
elif metric_name == "ROI":
|
| 160 |
+
column_name = "roi"
|
| 161 |
+
yaxis_title = "ROI (net profit/cost)"
|
| 162 |
+
elif metric_name == "collateral amount":
|
| 163 |
+
metric_name = "collateral_amount"
|
| 164 |
+
column_name = metric_name
|
| 165 |
+
yaxis_title = "Collateral amount per trade (xDAI)"
|
| 166 |
+
elif metric_name == "net earnings":
|
| 167 |
+
metric_name = "net_earnings"
|
| 168 |
+
column_name = metric_name
|
| 169 |
+
yaxis_title = "Net profit per trade (xDAI)"
|
| 170 |
+
else: # earnings
|
| 171 |
+
column_name = metric_name
|
| 172 |
+
yaxis_title = "Gross profit per trade (xDAI)"
|
| 173 |
+
|
| 174 |
+
color_discrete = ["purple", "darkgoldenrod", "darkgreen"]
|
| 175 |
+
trades_filtered = get_boxplot_daily_metrics(column_name, trades_df)
|
| 176 |
+
fig = make_subplots(rows=1, cols=2, subplot_titles=("Agent", "Non-Agents"))
|
| 177 |
+
|
| 178 |
+
# Create first boxplot for staking=True
|
| 179 |
+
fig.add_trace(
|
| 180 |
+
go.Box(
|
| 181 |
+
x=trades_filtered[trades_filtered["staking"] != "non_agent"][
|
| 182 |
+
"creation_date"
|
| 183 |
+
],
|
| 184 |
+
y=trades_filtered[trades_filtered["staking"] != "non_agent"][column_name],
|
| 185 |
+
name="Trades from agents",
|
| 186 |
+
marker_color=color_discrete[0],
|
| 187 |
+
legendgroup="staking_true",
|
| 188 |
+
showlegend=True,
|
| 189 |
+
),
|
| 190 |
+
row=1,
|
| 191 |
+
col=1,
|
| 192 |
+
)
|
| 193 |
+
|
| 194 |
+
# Create second boxplot for staking=False
|
| 195 |
+
fig.add_trace(
|
| 196 |
+
go.Box(
|
| 197 |
+
x=trades_filtered[trades_filtered["staking"] == False]["creation_date"],
|
| 198 |
+
y=trades_filtered[trades_filtered["staking"] == False][column_name],
|
| 199 |
+
name="Staking False",
|
| 200 |
+
marker_color=color_discrete[1],
|
| 201 |
+
legendgroup="staking_false",
|
| 202 |
+
showlegend=True,
|
| 203 |
+
),
|
| 204 |
+
row=1,
|
| 205 |
+
col=2,
|
| 206 |
+
)
|
| 207 |
+
|
| 208 |
+
# Update layout
|
| 209 |
+
fig.update_layout(
|
| 210 |
+
height=600,
|
| 211 |
+
width=1200,
|
| 212 |
+
title_text=f"Box Plot of {column_name} by Staking Status",
|
| 213 |
+
showlegend=True,
|
| 214 |
+
)
|
| 215 |
+
|
| 216 |
+
# Update y-axes to have the same range
|
| 217 |
+
fig.update_yaxes(matches="y")
|
tabs/trader_plots.py
CHANGED
|
@@ -12,6 +12,12 @@ trader_metric_choices = [
|
|
| 12 |
]
|
| 13 |
default_trader_metric = "ROI"
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
def get_metrics_text() -> gr.Markdown:
|
| 17 |
metric_text = """
|
|
|
|
| 12 |
]
|
| 13 |
default_trader_metric = "ROI"
|
| 14 |
|
| 15 |
+
trade_daily_metric_choices = [
|
| 16 |
+
"mech calls",
|
| 17 |
+
"collateral amount",
|
| 18 |
+
]
|
| 19 |
+
default_daily_metric = "collateral amount"
|
| 20 |
+
|
| 21 |
|
| 22 |
def get_metrics_text() -> gr.Markdown:
|
| 23 |
metric_text = """
|