System save at 14/10/2024 11:16 by user_client2024

This commit is contained in:
user_client2024 2024-10-14 05:46:27 +00:00
parent c1627a1c91
commit 6890e8df7c
3 changed files with 143 additions and 16 deletions

View File

@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 1,
"id": "90c70e46-71a0-44a6-8090-f53aad3193c3",
"metadata": {
"tags": []
@ -64,6 +64,7 @@
" (buy_volume / NULLIF(total_volume, 0)) * 100 AS \"Volume (%)\"\n",
"FROM aggregated_trades\n",
"WHERE buy_volume > 0 OR sell_volume > 0\n",
"limit 1000\n",
"\"\"\"\n",
"\n",
"class Scenario:\n",
@ -116,14 +117,76 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 3,
"id": "caee5554-5254-4388-bf24-029281d77890",
"metadata": {},
"outputs": [],
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Query start time: 2024-10-14 05:44:12.616270\n",
"Query end time: 2024-10-14 05:44:12.873749\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>START_DATE_TIME</th>\n",
" <th>END_DATE_TIME</th>\n",
" <th>FOCAL_ID</th>\n",
" <th>MIN_PRICE</th>\n",
" <th>MAX_PRICE</th>\n",
" <th>PRICE_CHANGE (%)</th>\n",
" <th>PARTICIPANT_VOLUME</th>\n",
" <th>TOTAL_VOLUME</th>\n",
" <th>VOLUME (%)</th>\n",
" <th>PARTICIPANT_VOLUME_PCT</th>\n",
" <th>Segment</th>\n",
" <th>SAR_FLAG</th>\n",
" <th>Risk</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: [START_DATE_TIME, END_DATE_TIME, FOCAL_ID, MIN_PRICE, MAX_PRICE, PRICE_CHANGE (%), PARTICIPANT_VOLUME, TOTAL_VOLUME, VOLUME (%), PARTICIPANT_VOLUME_PCT, Segment, SAR_FLAG, Risk]\n",
"Index: []"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Instantiate and execute logic\n",
"#scenario = Scenario()\n",
"#scenario.logic(validation_window=1000)"
"scenario = Scenario()\n",
"scenario.logic(validation_window=100000)"
]
},
{

View File

@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 1,
"id": "90c70e46-71a0-44a6-8090-f53aad3193c3",
"metadata": {
"tags": []
@ -64,6 +64,7 @@
" (buy_volume / NULLIF(total_volume, 0)) * 100 AS \"Volume (%)\"\n",
"FROM aggregated_trades\n",
"WHERE buy_volume > 0 OR sell_volume > 0\n",
"limit 1000\n",
"\"\"\"\n",
"\n",
"class Scenario:\n",
@ -116,14 +117,76 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 3,
"id": "caee5554-5254-4388-bf24-029281d77890",
"metadata": {},
"outputs": [],
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Query start time: 2024-10-14 05:44:12.616270\n",
"Query end time: 2024-10-14 05:44:12.873749\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>START_DATE_TIME</th>\n",
" <th>END_DATE_TIME</th>\n",
" <th>FOCAL_ID</th>\n",
" <th>MIN_PRICE</th>\n",
" <th>MAX_PRICE</th>\n",
" <th>PRICE_CHANGE (%)</th>\n",
" <th>PARTICIPANT_VOLUME</th>\n",
" <th>TOTAL_VOLUME</th>\n",
" <th>VOLUME (%)</th>\n",
" <th>PARTICIPANT_VOLUME_PCT</th>\n",
" <th>Segment</th>\n",
" <th>SAR_FLAG</th>\n",
" <th>Risk</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: [START_DATE_TIME, END_DATE_TIME, FOCAL_ID, MIN_PRICE, MAX_PRICE, PRICE_CHANGE (%), PARTICIPANT_VOLUME, TOTAL_VOLUME, VOLUME (%), PARTICIPANT_VOLUME_PCT, Segment, SAR_FLAG, Risk]\n",
"Index: []"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Instantiate and execute logic\n",
"#scenario = Scenario()\n",
"#scenario.logic(validation_window=1000)"
"scenario = Scenario()\n",
"scenario.logic(validation_window=100000)"
]
},
{

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
# coding: utf-8
# In[4]:
# In[1]:
from datetime import datetime
@ -59,6 +59,7 @@ SELECT
(buy_volume / NULLIF(total_volume, 0)) * 100 AS "Volume (%)"
FROM aggregated_trades
WHERE buy_volume > 0 OR sell_volume > 0
limit 1000
"""
class Scenario:
@ -109,12 +110,12 @@ class Scenario:
# In[5]:
# In[3]:
# Instantiate and execute logic
#scenario = Scenario()
#scenario.logic(validation_window=1000)
scenario = Scenario()
scenario.logic(validation_window=100000)
# In[ ]: