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

View File

@@ -0,0 +1,22 @@
from database import TradeDB
db = TradeDB()
try:
snap = db.get_merged_env_snapshot()
updated = False
# 전략별 후보 상한(CAND_LIMIT)을 0(무제한)으로 설정
for prefix in ["SCALP", "SHORT", "MOMENTUM", "BREAKOUT", "RANGE_BREAK", "UPDOW", "DART", "US_MOMENTUM"]:
key = f"{prefix}_CAND_LIMIT"
if snap.get(key) != "0":
snap[key] = "0"
updated = True
print(f"Set {key} to 0 (Unlimited)")
if updated:
db.insert_env_snapshot(snap)
print("Inserted new env snapshot with CAND_LIMIT removed.")
else:
print("All CAND_LIMITs are already 0.")
finally:
db.close()