인과적 GT 신호·복리 배분 시뮬을 도입하고 운영 정합성을 맞춘다.

미래 데이터를 쓰지 않는 causal 신호/tier와 전기간 복리 포트폴리오 비교로 GT 대비 sim_sized 검증 경로를 정리하고, 일한도·매수 상한·live_buy 스케일을 제거한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
xavis
2026-05-31 19:50:54 +09:00
parent 5842cc9fa3
commit e68bb44083
16 changed files with 1817 additions and 474 deletions

View File

@@ -188,6 +188,22 @@ def build_mtf_scan_frame(
if align_needed:
out = _add_align_columns_vectorized(out)
gt_needed = [c for c in needed_cols if c.startswith("gt_")]
bb_in_rules = "bb_pos" in needed_cols
if gt_needed or bb_in_rules:
ef = enriched[primary]
for src in ("Low", "High", "low", "high", "bb_pos", "Open", "Volume"):
if src in ef.columns and src not in out.columns:
out[src] = ef[src].reindex(out.index)
if "Low" not in out.columns and "low" in out.columns:
out["Low"] = out["low"]
if "High" not in out.columns and "high" in out.columns:
out["High"] = out["high"]
from deepcoin.ground_truth.gt_signal_rules import enrich_scan_frame_gt_signals
# 시뮬·live 스캔: 타점 판단은 항상 인과적 (GT 정답 생성은 ground_truth.py 별도)
out = enrich_scan_frame_gt_signals(out, causal=True)
out = out.loc[:, ~out.columns.duplicated()]
out = out.dropna(subset=["close"])
print(f"[04b] 스캔 프레임: {len(out):,}× {len(out.columns)}")