System save at 14/10/2024 13:19 by user_client2024

This commit is contained in:
user_client2024 2024-10-14 07:49:12 +00:00
parent 77db4dec7b
commit c1a7fbf09c
3 changed files with 138 additions and 138 deletions

View File

@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 21,
"id": "e706cfb0-2234-4c4c-95d8-d1968f656aa0",
"metadata": {
"tags": []
@ -127,7 +127,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 22,
"id": "b5c4307f-bc35-47e2-b680-fd1df2168d6c",
"metadata": {
"tags": []
@ -137,7 +137,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Query start time : 2024-10-14 06:23:07.242919\n"
"Query start time : 2024-10-14 07:40:43.846637\n"
]
},
{
@ -161,7 +161,7 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>TRADER_ID</th>\n",
" <th>focal_ID</th>\n",
" <th>trade_time_window</th>\n",
" <th>net_volume</th>\n",
" <th>order_count</th>\n",
@ -253,12 +253,12 @@
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>995</th>\n",
" <td>3382197985</td>\n",
" <td>2024-01-01 02:30:00</td>\n",
" <td>-159.0</td>\n",
" <th>95</th>\n",
" <td>1945772682</td>\n",
" <td>2024-01-01 00:43:00</td>\n",
" <td>-854.0</td>\n",
" <td>1</td>\n",
" <td>159</td>\n",
" <td>854</td>\n",
" <td>-1.0</td>\n",
" <td>0.0</td>\n",
" <td>Default</td>\n",
@ -266,12 +266,12 @@
" <td>Low Risk</td>\n",
" </tr>\n",
" <tr>\n",
" <th>996</th>\n",
" <td>1129008990</td>\n",
" <td>2024-01-01 02:30:00</td>\n",
" <td>-582.0</td>\n",
" <th>96</th>\n",
" <td>2137478041</td>\n",
" <td>2024-01-01 00:43:00</td>\n",
" <td>-926.0</td>\n",
" <td>1</td>\n",
" <td>582</td>\n",
" <td>926</td>\n",
" <td>-1.0</td>\n",
" <td>0.0</td>\n",
" <td>Default</td>\n",
@ -279,12 +279,12 @@
" <td>Low Risk</td>\n",
" </tr>\n",
" <tr>\n",
" <th>997</th>\n",
" <td>2944122893</td>\n",
" <td>2024-01-01 02:30:00</td>\n",
" <td>-65.0</td>\n",
" <th>97</th>\n",
" <td>7138329164</td>\n",
" <td>2024-01-01 00:43:00</td>\n",
" <td>-433.0</td>\n",
" <td>1</td>\n",
" <td>65</td>\n",
" <td>433</td>\n",
" <td>-1.0</td>\n",
" <td>0.0</td>\n",
" <td>Default</td>\n",
@ -292,12 +292,12 @@
" <td>Low Risk</td>\n",
" </tr>\n",
" <tr>\n",
" <th>998</th>\n",
" <td>2910876405</td>\n",
" <td>2024-01-01 02:30:00</td>\n",
" <td>-117.0</td>\n",
" <th>98</th>\n",
" <td>1867007441</td>\n",
" <td>2024-01-01 00:43:00</td>\n",
" <td>-626.0</td>\n",
" <td>1</td>\n",
" <td>117</td>\n",
" <td>626</td>\n",
" <td>-1.0</td>\n",
" <td>0.0</td>\n",
" <td>Default</td>\n",
@ -305,12 +305,12 @@
" <td>Low Risk</td>\n",
" </tr>\n",
" <tr>\n",
" <th>999</th>\n",
" <td>1816942226</td>\n",
" <td>2024-01-01 02:30:00</td>\n",
" <td>-732.0</td>\n",
" <th>99</th>\n",
" <td>2347906349</td>\n",
" <td>2024-01-01 00:43:00</td>\n",
" <td>-69.0</td>\n",
" <td>1</td>\n",
" <td>732</td>\n",
" <td>69</td>\n",
" <td>-1.0</td>\n",
" <td>0.0</td>\n",
" <td>Default</td>\n",
@ -319,53 +319,53 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1000 rows × 10 columns</p>\n",
"<p>100 rows × 10 columns</p>\n",
"</div>"
],
"text/plain": [
" TRADER_ID trade_time_window net_volume order_count \\\n",
"0 3097728207 2024-01-01 00:03:00 -92.0 1 \n",
"1 3228645322 2024-01-01 00:06:00 -689.0 1 \n",
"2 2701872727 2024-01-01 00:09:00 -42.0 1 \n",
"3 1659056655 2024-01-01 00:11:00 -167.0 1 \n",
"4 1661288887 2024-01-01 00:13:00 -756.0 1 \n",
".. ... ... ... ... \n",
"995 3382197985 2024-01-01 02:30:00 -159.0 1 \n",
"996 1129008990 2024-01-01 02:30:00 -582.0 1 \n",
"997 2944122893 2024-01-01 02:30:00 -65.0 1 \n",
"998 2910876405 2024-01-01 02:30:00 -117.0 1 \n",
"999 1816942226 2024-01-01 02:30:00 -732.0 1 \n",
" focal_ID trade_time_window net_volume order_count \\\n",
"0 3097728207 2024-01-01 00:03:00 -92.0 1 \n",
"1 3228645322 2024-01-01 00:06:00 -689.0 1 \n",
"2 2701872727 2024-01-01 00:09:00 -42.0 1 \n",
"3 1659056655 2024-01-01 00:11:00 -167.0 1 \n",
"4 1661288887 2024-01-01 00:13:00 -756.0 1 \n",
".. ... ... ... ... \n",
"95 1945772682 2024-01-01 00:43:00 -854.0 1 \n",
"96 2137478041 2024-01-01 00:43:00 -926.0 1 \n",
"97 7138329164 2024-01-01 00:43:00 -433.0 1 \n",
"98 1867007441 2024-01-01 00:43:00 -626.0 1 \n",
"99 2347906349 2024-01-01 00:43:00 -69.0 1 \n",
"\n",
" total_trade_volume order_trade_ratio volume_percentage Segment \\\n",
"0 92 -1.0 0.0 Default \n",
"1 689 -1.0 0.0 Default \n",
"2 42 -1.0 0.0 Default \n",
"3 167 -1.0 0.0 Default \n",
"4 756 -1.0 0.0 Default \n",
".. ... ... ... ... \n",
"995 159 -1.0 0.0 Default \n",
"996 582 -1.0 0.0 Default \n",
"997 65 -1.0 0.0 Default \n",
"998 117 -1.0 0.0 Default \n",
"999 732 -1.0 0.0 Default \n",
" total_trade_volume order_trade_ratio volume_percentage Segment \\\n",
"0 92 -1.0 0.0 Default \n",
"1 689 -1.0 0.0 Default \n",
"2 42 -1.0 0.0 Default \n",
"3 167 -1.0 0.0 Default \n",
"4 756 -1.0 0.0 Default \n",
".. ... ... ... ... \n",
"95 854 -1.0 0.0 Default \n",
"96 926 -1.0 0.0 Default \n",
"97 433 -1.0 0.0 Default \n",
"98 626 -1.0 0.0 Default \n",
"99 69 -1.0 0.0 Default \n",
"\n",
" SAR_FLAG Risk \n",
"0 N Low Risk \n",
"1 N Low Risk \n",
"2 N Low Risk \n",
"3 N Low Risk \n",
"4 N Low Risk \n",
".. ... ... \n",
"995 N Low Risk \n",
"996 N Low Risk \n",
"997 N Low Risk \n",
"998 N Low Risk \n",
"999 N Low Risk \n",
" SAR_FLAG Risk \n",
"0 N Low Risk \n",
"1 N Low Risk \n",
"2 N Low Risk \n",
"3 N Low Risk \n",
"4 N Low Risk \n",
".. ... ... \n",
"95 N Low Risk \n",
"96 N Low Risk \n",
"97 N Low Risk \n",
"98 N Low Risk \n",
"99 N Low Risk \n",
"\n",
"[1000 rows x 10 columns]"
"[100 rows x 10 columns]"
]
},
"execution_count": 17,
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}

View File

@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 21,
"id": "e706cfb0-2234-4c4c-95d8-d1968f656aa0",
"metadata": {
"tags": []
@ -127,7 +127,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 22,
"id": "b5c4307f-bc35-47e2-b680-fd1df2168d6c",
"metadata": {
"tags": []
@ -137,7 +137,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Query start time : 2024-10-14 06:23:07.242919\n"
"Query start time : 2024-10-14 07:40:43.846637\n"
]
},
{
@ -161,7 +161,7 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>TRADER_ID</th>\n",
" <th>focal_ID</th>\n",
" <th>trade_time_window</th>\n",
" <th>net_volume</th>\n",
" <th>order_count</th>\n",
@ -253,12 +253,12 @@
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>995</th>\n",
" <td>3382197985</td>\n",
" <td>2024-01-01 02:30:00</td>\n",
" <td>-159.0</td>\n",
" <th>95</th>\n",
" <td>1945772682</td>\n",
" <td>2024-01-01 00:43:00</td>\n",
" <td>-854.0</td>\n",
" <td>1</td>\n",
" <td>159</td>\n",
" <td>854</td>\n",
" <td>-1.0</td>\n",
" <td>0.0</td>\n",
" <td>Default</td>\n",
@ -266,12 +266,12 @@
" <td>Low Risk</td>\n",
" </tr>\n",
" <tr>\n",
" <th>996</th>\n",
" <td>1129008990</td>\n",
" <td>2024-01-01 02:30:00</td>\n",
" <td>-582.0</td>\n",
" <th>96</th>\n",
" <td>2137478041</td>\n",
" <td>2024-01-01 00:43:00</td>\n",
" <td>-926.0</td>\n",
" <td>1</td>\n",
" <td>582</td>\n",
" <td>926</td>\n",
" <td>-1.0</td>\n",
" <td>0.0</td>\n",
" <td>Default</td>\n",
@ -279,12 +279,12 @@
" <td>Low Risk</td>\n",
" </tr>\n",
" <tr>\n",
" <th>997</th>\n",
" <td>2944122893</td>\n",
" <td>2024-01-01 02:30:00</td>\n",
" <td>-65.0</td>\n",
" <th>97</th>\n",
" <td>7138329164</td>\n",
" <td>2024-01-01 00:43:00</td>\n",
" <td>-433.0</td>\n",
" <td>1</td>\n",
" <td>65</td>\n",
" <td>433</td>\n",
" <td>-1.0</td>\n",
" <td>0.0</td>\n",
" <td>Default</td>\n",
@ -292,12 +292,12 @@
" <td>Low Risk</td>\n",
" </tr>\n",
" <tr>\n",
" <th>998</th>\n",
" <td>2910876405</td>\n",
" <td>2024-01-01 02:30:00</td>\n",
" <td>-117.0</td>\n",
" <th>98</th>\n",
" <td>1867007441</td>\n",
" <td>2024-01-01 00:43:00</td>\n",
" <td>-626.0</td>\n",
" <td>1</td>\n",
" <td>117</td>\n",
" <td>626</td>\n",
" <td>-1.0</td>\n",
" <td>0.0</td>\n",
" <td>Default</td>\n",
@ -305,12 +305,12 @@
" <td>Low Risk</td>\n",
" </tr>\n",
" <tr>\n",
" <th>999</th>\n",
" <td>1816942226</td>\n",
" <td>2024-01-01 02:30:00</td>\n",
" <td>-732.0</td>\n",
" <th>99</th>\n",
" <td>2347906349</td>\n",
" <td>2024-01-01 00:43:00</td>\n",
" <td>-69.0</td>\n",
" <td>1</td>\n",
" <td>732</td>\n",
" <td>69</td>\n",
" <td>-1.0</td>\n",
" <td>0.0</td>\n",
" <td>Default</td>\n",
@ -319,53 +319,53 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1000 rows × 10 columns</p>\n",
"<p>100 rows × 10 columns</p>\n",
"</div>"
],
"text/plain": [
" TRADER_ID trade_time_window net_volume order_count \\\n",
"0 3097728207 2024-01-01 00:03:00 -92.0 1 \n",
"1 3228645322 2024-01-01 00:06:00 -689.0 1 \n",
"2 2701872727 2024-01-01 00:09:00 -42.0 1 \n",
"3 1659056655 2024-01-01 00:11:00 -167.0 1 \n",
"4 1661288887 2024-01-01 00:13:00 -756.0 1 \n",
".. ... ... ... ... \n",
"995 3382197985 2024-01-01 02:30:00 -159.0 1 \n",
"996 1129008990 2024-01-01 02:30:00 -582.0 1 \n",
"997 2944122893 2024-01-01 02:30:00 -65.0 1 \n",
"998 2910876405 2024-01-01 02:30:00 -117.0 1 \n",
"999 1816942226 2024-01-01 02:30:00 -732.0 1 \n",
" focal_ID trade_time_window net_volume order_count \\\n",
"0 3097728207 2024-01-01 00:03:00 -92.0 1 \n",
"1 3228645322 2024-01-01 00:06:00 -689.0 1 \n",
"2 2701872727 2024-01-01 00:09:00 -42.0 1 \n",
"3 1659056655 2024-01-01 00:11:00 -167.0 1 \n",
"4 1661288887 2024-01-01 00:13:00 -756.0 1 \n",
".. ... ... ... ... \n",
"95 1945772682 2024-01-01 00:43:00 -854.0 1 \n",
"96 2137478041 2024-01-01 00:43:00 -926.0 1 \n",
"97 7138329164 2024-01-01 00:43:00 -433.0 1 \n",
"98 1867007441 2024-01-01 00:43:00 -626.0 1 \n",
"99 2347906349 2024-01-01 00:43:00 -69.0 1 \n",
"\n",
" total_trade_volume order_trade_ratio volume_percentage Segment \\\n",
"0 92 -1.0 0.0 Default \n",
"1 689 -1.0 0.0 Default \n",
"2 42 -1.0 0.0 Default \n",
"3 167 -1.0 0.0 Default \n",
"4 756 -1.0 0.0 Default \n",
".. ... ... ... ... \n",
"995 159 -1.0 0.0 Default \n",
"996 582 -1.0 0.0 Default \n",
"997 65 -1.0 0.0 Default \n",
"998 117 -1.0 0.0 Default \n",
"999 732 -1.0 0.0 Default \n",
" total_trade_volume order_trade_ratio volume_percentage Segment \\\n",
"0 92 -1.0 0.0 Default \n",
"1 689 -1.0 0.0 Default \n",
"2 42 -1.0 0.0 Default \n",
"3 167 -1.0 0.0 Default \n",
"4 756 -1.0 0.0 Default \n",
".. ... ... ... ... \n",
"95 854 -1.0 0.0 Default \n",
"96 926 -1.0 0.0 Default \n",
"97 433 -1.0 0.0 Default \n",
"98 626 -1.0 0.0 Default \n",
"99 69 -1.0 0.0 Default \n",
"\n",
" SAR_FLAG Risk \n",
"0 N Low Risk \n",
"1 N Low Risk \n",
"2 N Low Risk \n",
"3 N Low Risk \n",
"4 N Low Risk \n",
".. ... ... \n",
"995 N Low Risk \n",
"996 N Low Risk \n",
"997 N Low Risk \n",
"998 N Low Risk \n",
"999 N Low Risk \n",
" SAR_FLAG Risk \n",
"0 N Low Risk \n",
"1 N Low Risk \n",
"2 N Low Risk \n",
"3 N Low Risk \n",
"4 N Low Risk \n",
".. ... ... \n",
"95 N Low Risk \n",
"96 N Low Risk \n",
"97 N Low Risk \n",
"98 N Low Risk \n",
"99 N Low Risk \n",
"\n",
"[1000 rows x 10 columns]"
"[100 rows x 10 columns]"
]
},
"execution_count": 17,
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
# coding: utf-8
# In[16]:
# In[21]:
from datetime import datetime, timedelta
@ -120,7 +120,7 @@ class Scenario:
return final_scenario_df
# In[17]:
# In[22]:
# scenario = Scenario()