refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.
This commit is contained in:
12
scratch/check_ob_tables.py
Normal file
12
scratch/check_ob_tables.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from database import TradeDB
|
||||
db = TradeDB()
|
||||
try:
|
||||
for t in ['kis_ws_orderbook', 'ls_ws_orderbook']:
|
||||
try:
|
||||
sql = f"SELECT COUNT(*) as cnt FROM {t} WHERE DATE(recv_ts) = '2026-08-10'"
|
||||
cnt = db.conn.execute(sql).fetchone()['cnt']
|
||||
print(f"Table {t}: {cnt} rows today")
|
||||
except Exception as e:
|
||||
print(f"Could not count {t}: {e}")
|
||||
finally:
|
||||
db.close()
|
||||
Reference in New Issue
Block a user