refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.

This commit is contained in:
Your Name
2026-08-12 10:19:19 +09:00
parent cb7e5037a0
commit c6bd62a25f
218 changed files with 31613 additions and 759 deletions

19
scratch_db_query.py Normal file
View File

@@ -0,0 +1,19 @@
import sys
import os
sys.path.insert(0, os.path.abspath("."))
from kis_trader.database import TradeDBExt
db = TradeDBExt()
try:
print("--- 키움 WS 실시간 수신 상태 확인 (가장 최근 틱 조회) ---")
rows = db.conn.execute("SELECT code, price, volume, tick_time, source, recv_ts FROM ws_ticks ORDER BY recv_ts DESC LIMIT 5").fetchall()
for row in rows:
print(dict(row))
print("--- 캔들 최근 데이터 ---")
rows2 = db.conn.execute("SELECT code, close, candle_time, source, is_confirmed FROM ws_candles ORDER BY id DESC LIMIT 5").fetchall()
for row in rows2:
print(dict(row))
finally:
db.close()