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:
@@ -51,6 +51,8 @@ _STRATEGY_EOD_SPEC: Dict[str, Tuple[str, str, bool, str, str]] = {
|
||||
"MOMENTUM": ("MOMENTUM_EOD_ENABLED", "MOMENTUM_EOD_HM", True, "15:20", "MOMENTUM_FORCE_EOD_EXIT"),
|
||||
"TAIL": ("TAIL_EOD_ENABLED", "TAIL_EOD_HM", True, "15:20", "force_eod_exit"),
|
||||
"SHORT": ("TAIL_EOD_ENABLED", "TAIL_EOD_HM", True, "15:20", "force_eod_exit"),
|
||||
# 실매 scalping.py 기존 하드코딩 15:25 와 동일 (장마감청산)
|
||||
"SCALP": ("SCALP_EOD_ENABLED", "SCALP_EOD_HM", True, "15:25", "force_eod_exit"),
|
||||
}
|
||||
|
||||
|
||||
@@ -116,6 +118,20 @@ def is_backtest_eod_bar(
|
||||
return (bar_hh > eod_hh) or (bar_hh == eod_hh and bar_mm >= eod_mm)
|
||||
|
||||
|
||||
def eod_bar_time_key(
|
||||
day_yyyymmdd: str,
|
||||
eod_hm: str,
|
||||
*,
|
||||
default_hm: str = "15:20",
|
||||
) -> str:
|
||||
"""당일 EOD 시각을 봉 키(YYYYMMDDHHMM)로. 백테 벽시계 EOD sell_time 용."""
|
||||
day = str(day_yyyymmdd or "").strip()[:8]
|
||||
if len(day) != 8 or not day.isdigit():
|
||||
return ""
|
||||
hh, mm = parse_eod_hm(eod_hm, default_hm)
|
||||
return "%s%02d%02d" % (day, hh, mm)
|
||||
|
||||
|
||||
def is_strategy_eod_bar(
|
||||
candle_time: str,
|
||||
params: Dict[str, Any],
|
||||
|
||||
Reference in New Issue
Block a user