{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", "import gc\n", "sns.set_style(\"darkgrid\")" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "fpmms = pd.read_parquet('../data/fpmms.parquet')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
idcurrentAnswertitle
00x0020d13c89140b47e10db54cbd53852b90bc1391NoWill the Francis Scott Key Bridge in Baltimore...
10x003ae5e007cc38b3f86b0ed7c82f938a1285ac07NoWill FC Saarbrucken reach the final of the Ger...
20x004c8d4c619dc6b9caa940f5ea7ef699ae85359cYesWill the pro-life activists convicted for 'con...
30x005e3f7a90585acbec807425a750fbba1d0c2b5cYesWill Apple announce the release of a new M4 ch...
40x0094fa304017d5c2b355790e2976f769ea600492NoWill the Hisense U8K be considered a top-tier ...
\n", "
" ], "text/plain": [ " id currentAnswer \\\n", "0 0x0020d13c89140b47e10db54cbd53852b90bc1391 No \n", "1 0x003ae5e007cc38b3f86b0ed7c82f938a1285ac07 No \n", "2 0x004c8d4c619dc6b9caa940f5ea7ef699ae85359c Yes \n", "3 0x005e3f7a90585acbec807425a750fbba1d0c2b5c Yes \n", "4 0x0094fa304017d5c2b355790e2976f769ea600492 No \n", "\n", " title \n", "0 Will the Francis Scott Key Bridge in Baltimore... \n", "1 Will FC Saarbrucken reach the final of the Ger... \n", "2 Will the pro-life activists convicted for 'con... \n", "3 Will Apple announce the release of a new M4 ch... \n", "4 Will the Hisense U8K be considered a top-tier ... " ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fpmms.head()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "currentAnswer\n", "No 2170\n", "Yes 1500\n", "no 1\n", "False 1\n", "IND 1\n", "Name: count, dtype: int64" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fpmms.currentAnswer.value_counts()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "RangeIndex: 3673 entries, 0 to 3672\n", "Data columns (total 3 columns):\n", " # Column Non-Null Count Dtype \n", "--- ------ -------------- ----- \n", " 0 id 3673 non-null object\n", " 1 currentAnswer 3673 non-null object\n", " 2 title 3673 non-null object\n", "dtypes: object(3)\n", "memory usage: 86.2+ KB\n" ] } ], "source": [ "fpmms.info()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "all_trades = pd.read_parquet('../data/all_trades_profitability.parquet')" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "27707" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(all_trades)" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "127674" ] }, "execution_count": 34, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(tools)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
trader_addresstrade_idcreation_timestamptitlemarket_statuscollateral_amountoutcome_indextrade_fee_amountoutcomes_tokens_tradedcurrent_answeris_invalidwinning_tradeearningsredeemedredeemed_amountnum_mech_callsmech_fee_amountnet_earningsroi
00x034c4ad84f7ac6638bf19300d5bbe7d9b981e7360x005e3f7a90585acbec807425a750fbba1d0c2b5c0x03...2024-05-12 04:26:35+00:00Will Apple announce the release of a new M4 ch...CLOSED0.68236000.0136470.8893680FalseTrue0.889368True0.88936800.00.1933600.277813
10x034c4ad84f7ac6638bf19300d5bbe7d9b981e7360x017947579ab51313c31fe1cc562c0f1726ec09c90x03...2024-05-21 04:26:40+00:00Will Google's Pixel 9 lineup be officially rel...CLOSED0.73215810.0146431.1207981FalseTrue1.120798True1.12079800.00.3739970.500799
20x034c4ad84f7ac6638bf19300d5bbe7d9b981e7360x0290d432108f22fdc91e6677b1436e7bc702bced0x03...2024-05-09 08:26:30+00:00Will the ICC take legal action against Israel ...CLOSED1.24655100.0249312.5059720FalseTrue2.505972True2.50597200.01.2344900.970906
30x034c4ad84f7ac6638bf19300d5bbe7d9b981e7360x02c244eef143b16254f3d6a444c2e44d35a175590x03...2024-05-04 04:24:20+00:00Will Trent Staggs win the Senatorial race to r...CLOSED1.21965900.0243932.9486661FalseFalse0.000000True0.00000000.0-1.244052-1.000000
40x034c4ad84f7ac6638bf19300d5bbe7d9b981e7360x0518764fb0684f3156c200ae78d4214d19d8b9530x03...2024-05-19 04:22:50+00:00Will OpenAI release another model update by 20...CLOSED1.20309710.0240623.1436670FalseFalse0.000000True0.00000000.0-1.227159-1.000000
\n", "
" ], "text/plain": [ " trader_address \\\n", "0 0x034c4ad84f7ac6638bf19300d5bbe7d9b981e736 \n", "1 0x034c4ad84f7ac6638bf19300d5bbe7d9b981e736 \n", "2 0x034c4ad84f7ac6638bf19300d5bbe7d9b981e736 \n", "3 0x034c4ad84f7ac6638bf19300d5bbe7d9b981e736 \n", "4 0x034c4ad84f7ac6638bf19300d5bbe7d9b981e736 \n", "\n", " trade_id \\\n", "0 0x005e3f7a90585acbec807425a750fbba1d0c2b5c0x03... \n", "1 0x017947579ab51313c31fe1cc562c0f1726ec09c90x03... \n", "2 0x0290d432108f22fdc91e6677b1436e7bc702bced0x03... \n", "3 0x02c244eef143b16254f3d6a444c2e44d35a175590x03... \n", "4 0x0518764fb0684f3156c200ae78d4214d19d8b9530x03... \n", "\n", " creation_timestamp \\\n", "0 2024-05-12 04:26:35+00:00 \n", "1 2024-05-21 04:26:40+00:00 \n", "2 2024-05-09 08:26:30+00:00 \n", "3 2024-05-04 04:24:20+00:00 \n", "4 2024-05-19 04:22:50+00:00 \n", "\n", " title market_status \\\n", "0 Will Apple announce the release of a new M4 ch... CLOSED \n", "1 Will Google's Pixel 9 lineup be officially rel... CLOSED \n", "2 Will the ICC take legal action against Israel ... CLOSED \n", "3 Will Trent Staggs win the Senatorial race to r... CLOSED \n", "4 Will OpenAI release another model update by 20... CLOSED \n", "\n", " collateral_amount outcome_index trade_fee_amount outcomes_tokens_traded \\\n", "0 0.682360 0 0.013647 0.889368 \n", "1 0.732158 1 0.014643 1.120798 \n", "2 1.246551 0 0.024931 2.505972 \n", "3 1.219659 0 0.024393 2.948666 \n", "4 1.203097 1 0.024062 3.143667 \n", "\n", " current_answer is_invalid winning_trade earnings redeemed \\\n", "0 0 False True 0.889368 True \n", "1 1 False True 1.120798 True \n", "2 0 False True 2.505972 True \n", "3 1 False False 0.000000 True \n", "4 0 False False 0.000000 True \n", "\n", " redeemed_amount num_mech_calls mech_fee_amount net_earnings roi \n", "0 0.889368 0 0.0 0.193360 0.277813 \n", "1 1.120798 0 0.0 0.373997 0.500799 \n", "2 2.505972 0 0.0 1.234490 0.970906 \n", "3 0.000000 0 0.0 -1.244052 -1.000000 \n", "4 0.000000 0 0.0 -1.227159 -1.000000 " ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "all_trades.head()" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "winning_trade\n", "False 14574\n", "True 13133\n", "Name: count, dtype: int64" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "all_trades.winning_trade.value_counts()" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [], "source": [ "all_trades[\"creation_timestamp\"] = pd.to_datetime(all_trades[\"creation_timestamp\"])" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "current_answer\n", " 1 13016\n", " 0 10814\n", "-1 3877\n", "Name: count, dtype: int64" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "all_trades.current_answer.value_counts()" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "203" ] }, "execution_count": 38, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(list(all_trades.trader_address.unique()))" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "27707" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(all_trades)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/var/folders/gp/02mb1d514ng739czlxw1lhh00000gn/T/ipykernel_70112/183699308.py:1: UserWarning: Converting to PeriodArray/Index representation will drop timezone information.\n", " all_trades['month_year'] = all_trades['creation_timestamp'].dt.to_period('M').astype(str)\n", "/var/folders/gp/02mb1d514ng739czlxw1lhh00000gn/T/ipykernel_70112/183699308.py:2: UserWarning: Converting to PeriodArray/Index representation will drop timezone information.\n", " all_trades['month_year_week'] = all_trades['creation_timestamp'].dt.to_period('W').astype(str)\n" ] }, { "data": { "text/plain": [ "winning_trade\n", "0 14574\n", "1 13133\n", "Name: count, dtype: int64" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "all_trades['month_year'] = all_trades['creation_timestamp'].dt.to_period('M').astype(str)\n", "all_trades['month_year_week'] = all_trades['creation_timestamp'].dt.to_period('W').astype(str)\n", "all_trades['winning_trade'] = all_trades['winning_trade'].astype(int)\n", "all_trades.winning_trade.value_counts()" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
month_year_weekwinning_trade
02024-04-22/2024-04-2860.465116
12024-04-29/2024-05-0553.887043
22024-05-06/2024-05-1249.626201
32024-05-13/2024-05-1947.931617
42024-05-20/2024-05-2646.209810
52024-05-27/2024-06-0241.855369
62024-06-03/2024-06-0943.714888
72024-06-10/2024-06-1646.697039
82024-06-17/2024-06-2352.762120
\n", "
" ], "text/plain": [ " month_year_week winning_trade\n", "0 2024-04-22/2024-04-28 60.465116\n", "1 2024-04-29/2024-05-05 53.887043\n", "2 2024-05-06/2024-05-12 49.626201\n", "3 2024-05-13/2024-05-19 47.931617\n", "4 2024-05-20/2024-05-26 46.209810\n", "5 2024-05-27/2024-06-02 41.855369\n", "6 2024-06-03/2024-06-09 43.714888\n", "7 2024-06-10/2024-06-16 46.697039\n", "8 2024-06-17/2024-06-23 52.762120" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "winning_trades = all_trades.groupby(['month_year_week'])['winning_trade'].sum() / all_trades.groupby(['month_year_week'])['winning_trade'].count() * 100\n", "# winning_trades is a series, give it a dataframe\n", "winning_trades = winning_trades.reset_index()\n", "winning_trades.columns = winning_trades.columns.astype(str)\n", "winning_trades.columns = ['month_year_week', 'winning_trade']\n", "winning_trades" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
month_year_weekwinning_trade
62024-06-03/2024-06-0943.714888
\n", "
" ], "text/plain": [ " month_year_week winning_trade\n", "6 2024-06-03/2024-06-09 43.714888" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "that_week = winning_trades[winning_trades[\"month_year_week\"]==\"2024-06-03/2024-06-09\"]\n", "that_week" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
month_year_weeksumcount
02024-04-22/2024-04-282643
12024-04-29/2024-05-0516223010
22024-05-06/2024-05-1227885618
32024-05-13/2024-05-1922714738
42024-05-20/2024-05-2619694261
52024-05-27/2024-06-0217194107
62024-06-03/2024-06-0912452848
72024-06-10/2024-06-1610252195
82024-06-17/2024-06-23468887
\n", "
" ], "text/plain": [ " month_year_week sum count\n", "0 2024-04-22/2024-04-28 26 43\n", "1 2024-04-29/2024-05-05 1622 3010\n", "2 2024-05-06/2024-05-12 2788 5618\n", "3 2024-05-13/2024-05-19 2271 4738\n", "4 2024-05-20/2024-05-26 1969 4261\n", "5 2024-05-27/2024-06-02 1719 4107\n", "6 2024-06-03/2024-06-09 1245 2848\n", "7 2024-06-10/2024-06-16 1025 2195\n", "8 2024-06-17/2024-06-23 468 887" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "winning_trades2 = all_trades.groupby(['month_year_week'])['winning_trade'].agg([\"sum\",\"count\"]).reset_index()\n", "winning_trades2" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
month_year_weeksumcountwinning_trade
62024-06-03/2024-06-091245284843.714888
\n", "
" ], "text/plain": [ " month_year_week sum count winning_trade\n", "6 2024-06-03/2024-06-09 1245 2848 43.714888" ] }, "execution_count": 29, "metadata": {}, "output_type": "execute_result" } ], "source": [ "that_week = winning_trades2[winning_trades2[\"month_year_week\"]==\"2024-06-03/2024-06-09\"]\n", "that_week" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [], "source": [ "INC_TOOLS = [\n", " \"prediction-online\",\n", " \"prediction-offline\",\n", " \"claude-prediction-online\",\n", " \"claude-prediction-offline\",\n", " \"prediction-offline-sme\",\n", " \"prediction-online-sme\",\n", " \"prediction-request-rag\",\n", " \"prediction-request-reasoning\",\n", " \"prediction-url-cot-claude\",\n", " \"prediction-request-rag-claude\",\n", " \"prediction-request-reasoning-claude\",\n", "]" ] }, { "cell_type": "code", "execution_count": 60, "metadata": {}, "outputs": [], "source": [ "tools = pd.read_parquet('../data/tools.parquet')" ] }, { "cell_type": "code", "execution_count": 61, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "RangeIndex: 127674 entries, 0 to 127673\n", "Data columns (total 22 columns):\n", " # Column Non-Null Count Dtype \n", "--- ------ -------------- ----- \n", " 0 request_id 127674 non-null object \n", " 1 request_block 127674 non-null int64 \n", " 2 prompt_request 127674 non-null object \n", " 3 tool 127674 non-null object \n", " 4 nonce 127674 non-null object \n", " 5 trader_address 127674 non-null object \n", " 6 deliver_block 127674 non-null int64 \n", " 7 error 127668 non-null float64\n", " 8 error_message 19534 non-null object \n", " 9 prompt_response 120607 non-null object \n", " 10 mech_address 127674 non-null object \n", " 11 p_yes 108134 non-null float64\n", " 12 p_no 108134 non-null float64\n", " 13 confidence 108134 non-null float64\n", " 14 info_utility 108134 non-null float64\n", " 15 vote 94137 non-null object \n", " 16 win_probability 108134 non-null float64\n", " 17 title 118074 non-null object \n", " 18 currentAnswer 88330 non-null object \n", " 19 request_time 127674 non-null object \n", " 20 request_month_year 127674 non-null object \n", " 21 request_month_year_week 127674 non-null object \n", "dtypes: float64(6), int64(2), object(14)\n", "memory usage: 21.4+ MB\n" ] } ], "source": [ "tools.info()" ] }, { "cell_type": "code", "execution_count": 62, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "currentAnswer\n", "No 51140\n", "Yes 37190\n", "Name: count, dtype: int64" ] }, "execution_count": 62, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tools.currentAnswer.value_counts()" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "127674" ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(tools)" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [], "source": [ "tools_inc = tools[tools['tool'].isin(INC_TOOLS)]\n", "tools_non_error = tools_inc[tools_inc['error'] != 1]\n", "tools_non_error.loc[:, 'currentAnswer'] = tools_non_error['currentAnswer'].replace({'no': 'No', 'yes': 'Yes'})\n", "tools_non_error = tools_non_error[tools_non_error['currentAnswer'].isin(['Yes', 'No'])]\n", "tools_non_error = tools_non_error[tools_non_error['vote'].isin(['Yes', 'No'])]\n", "tools_non_error['win'] = (tools_non_error['currentAnswer'] == tools_non_error['vote']).astype(int)\n", "tools_non_error.columns = tools_non_error.columns.astype(str)\n", "wins = tools_non_error.groupby(['tool', 'request_month_year_week', 'win']).size().unstack().fillna(0)" ] }, { "cell_type": "code", "execution_count": 63, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
win01
toolrequest_month_year_week
claude-prediction-offline2024-04-22/2024-04-2814.023.0
2024-04-29/2024-05-0534.099.0
2024-05-06/2024-05-1222.034.0
2024-05-13/2024-05-1940.052.0
2024-05-20/2024-05-2618.052.0
............
prediction-url-cot-claude2024-05-06/2024-05-1267.091.0
2024-05-13/2024-05-1928.043.0
2024-05-20/2024-05-2664.0145.0
2024-05-27/2024-06-0281.0112.0
2024-06-03/2024-06-097.041.0
\n", "

91 rows × 2 columns

\n", "
" ], "text/plain": [ "win 0 1\n", "tool request_month_year_week \n", "claude-prediction-offline 2024-04-22/2024-04-28 14.0 23.0\n", " 2024-04-29/2024-05-05 34.0 99.0\n", " 2024-05-06/2024-05-12 22.0 34.0\n", " 2024-05-13/2024-05-19 40.0 52.0\n", " 2024-05-20/2024-05-26 18.0 52.0\n", "... ... ...\n", "prediction-url-cot-claude 2024-05-06/2024-05-12 67.0 91.0\n", " 2024-05-13/2024-05-19 28.0 43.0\n", " 2024-05-20/2024-05-26 64.0 145.0\n", " 2024-05-27/2024-06-02 81.0 112.0\n", " 2024-06-03/2024-06-09 7.0 41.0\n", "\n", "[91 rows x 2 columns]" ] }, "execution_count": 63, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wins" ] }, { "cell_type": "code", "execution_count": 56, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "186" ] }, "execution_count": 56, "metadata": {}, "output_type": "execute_result" } ], "source": [ "selected_traders = list(tools.trader_address.unique())\n", "len(selected_traders)" ] }, { "cell_type": "code", "execution_count": 59, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "182" ] }, "execution_count": 59, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(list(tools_non_error.trader_address.unique()))" ] }, { "cell_type": "code", "execution_count": 36, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "10817" ] }, "execution_count": 36, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(tools)-len(tools_inc)" ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "11778" ] }, "execution_count": 32, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tools_week = tools_non_error[tools_non_error[\"request_month_year_week\"]==\"2024-06-03/2024-06-09\"]\n", "len(tools_week)" ] }, { "cell_type": "code", "execution_count": 44, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 44, "metadata": {}, "output_type": "execute_result" } ], "source": [ "filtered_trades = all_trades.loc[all_trades[\"trader_address\"].isin(selected_traders)]\n", "len(filtered_trades)" ] }, { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [], "source": [ "all_addresses = list(all_trades.trader_address.unique())" ] }, { "cell_type": "code", "execution_count": 58, "metadata": {}, "outputs": [], "source": [ "for a in all_addresses:\n", " if a in selected_traders:\n", " print(\"found\")" ] }, { "cell_type": "code", "execution_count": 57, "metadata": {}, "outputs": [], "source": [ "for a in selected_traders:\n", " if a in all_addresses:\n", " print(\"found\")" ] }, { "cell_type": "code", "execution_count": 46, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 46, "metadata": {}, "output_type": "execute_result" } ], "source": [ "filtered_tools = tools[tools[\"trader_address\"].isin(all_addresses)]\n", "len(filtered_tools)" ] }, { "cell_type": "code", "execution_count": 55, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "count 27707.000000\n", "mean 3.912224\n", "std 4.622220\n", "min 0.000000\n", "25% 1.000000\n", "50% 2.000000\n", "75% 5.000000\n", "max 66.000000\n", "Name: num_mech_calls, dtype: float64" ] }, "execution_count": 55, "metadata": {}, "output_type": "execute_result" } ], "source": [ "all_trades.num_mech_calls.describe()" ] } ], "metadata": { "kernelspec": { "display_name": "market_creator", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.3" } }, "nbformat": 4, "nbformat_minor": 2 }