refactor: GT·시뮬·운영 3축 정리 및 hybrid 실거래 정합
Phase C/dry-run·미사용 모듈·재생성 HTML을 제거하고, 운영 체결을 sim_causal_hybrid와 동일한 hybrid 로직으로 통합한다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,14 +6,23 @@ from __future__ import annotations
|
||||
|
||||
import pandas as pd
|
||||
|
||||
from config import DOWNLOAD_INTERVALS, SYMBOL
|
||||
from config import DOWNLOAD_INTERVALS, DOWNLOAD_INTERVALS_WM, SYMBOL
|
||||
from deepcoin.data.candle_intervals import interval_display_label
|
||||
|
||||
|
||||
def interval_label(interval: int) -> str:
|
||||
"""봉 간격 표시 라벨."""
|
||||
if interval >= 1440:
|
||||
return "일봉"
|
||||
return f"{interval}분"
|
||||
return interval_display_label(interval)
|
||||
|
||||
|
||||
def _all_load_intervals() -> tuple[int, ...]:
|
||||
seen: set[int] = set()
|
||||
out: list[int] = []
|
||||
for iv in (*DOWNLOAD_INTERVALS, *DOWNLOAD_INTERVALS_WM):
|
||||
if iv not in seen:
|
||||
seen.add(iv)
|
||||
out.append(iv)
|
||||
return tuple(out)
|
||||
|
||||
|
||||
def load_frames_from_db(
|
||||
@@ -33,7 +42,7 @@ def load_frames_from_db(
|
||||
간격(분) → OHLCV+지표 DataFrame.
|
||||
"""
|
||||
frames: dict[int, pd.DataFrame] = {}
|
||||
for iv in DOWNLOAD_INTERVALS:
|
||||
for iv in _all_load_intervals():
|
||||
db_max = None
|
||||
if lookback_days is not None:
|
||||
db_max = monitor.db_row_limit_for_interval(iv, lookback_days)
|
||||
|
||||
Reference in New Issue
Block a user