feat: Add DART strategy and related configurations

ㅇ
Changes:
- Introduced the DART strategy to the trading system, including its configuration and integration into the existing framework.
- Updated the database schema to include DART-specific tables for disclosures and watchlists.
- Enhanced the backtesting and parameter search functionalities to support the DART strategy.
- Implemented new rules for browser verification and API interactions to ensure compliance with the updated DART strategy.

Impact:
- These additions expand the trading capabilities of the system, allowing for more comprehensive analysis and execution of DART-related strategies, while maintaining system integrity and performance.
This commit is contained in:
Your Name
2026-07-21 07:50:24 +09:00
parent 74db49149f
commit 61bec4bd1d
86 changed files with 4811 additions and 297 deletions

View File

@@ -222,16 +222,29 @@ def purge_ghost_active_trades(order_mgr, broker: Optional[Dict[str, Any]] = None
if _broker_qty(broker, code) > 0:
continue
try:
db.delete_active_trade(code=code, strategy=strategy or None)
# OrderManager 와 동일: trade_history 에 ghost_purge 남긴 뒤 정리
recorded = False
if hasattr(order_mgr, "_record_ghost_purge_history"):
recorded = bool(
order_mgr._record_ghost_purge_history(
code,
strategy or "",
sell_reason="ghost_purge:broker_zero",
)
)
else:
db.delete_active_trade(code=code, strategy=strategy or None)
out["purged"].append({
"code": code,
"name": name,
"strategy": strategy,
"qty": int(d.get("current_qty") or 0),
"history_recorded": recorded,
})
logger.warning(
"🧹 [유령잔고삭제] [%s] %s %s — 브로커 0주 → active_trades 삭제",
"🧹 [유령잔고삭제] [%s] %s %s — 브로커 0주 → 정리%s",
strategy, name, code,
" (trade_history 기록)" if recorded else "",
)
except Exception as e:
out["failed"].append({"code": code, "name": name, "error": str(e)})