Files
Bithumb/deepcoin/matching/match_rules.py
dsyoon 2cb67c42b3 GT MTF 프로필·캘리브레이션과 04 매칭/시뮬/실거래 파이프라인을 추가한다.
3분~일봉 GT 타점 분석(03c), leg 체결 순서 수정, 총자산 90% 검증 루프,
walk-forward Go/No-Go 시뮬, monitor·live_trader 및 reference 문서를 포함한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-31 11:27:50 +09:00

45 lines
1.3 KiB
Python

"""
04단계: GT 프로필 + 전구간 EV 필터 매칭 파이프라인.
"""
from __future__ import annotations
from pathlib import Path
from deepcoin.matching.pipeline import run_matching_pipeline
from deepcoin.paths import ANALYSIS_TRADES_CSV, REPORTS_ANALYSIS, REPORTS_MATCHING
def run_match(
phase: str = "all",
trades_csv: Path | None = None,
) -> None:
"""
04 파이프라인 실행.
Args:
phase: all | profile | scan | label | select.
trades_csv: 03b CSV 경로(선택).
"""
REPORTS_MATCHING.mkdir(parents=True, exist_ok=True)
csv = trades_csv or ANALYSIS_TRADES_CSV
if not csv.is_file():
raise FileNotFoundError(
f"03b CSV 없음: {csv}\n python scripts/03_analyze_trades.py 먼저 실행"
)
run_matching_pipeline(phase=phase, trades_csv=csv)
def run_match_stub() -> Path:
"""하위 호환: 스텁 대신 phase=profile만 안내."""
print("=== Phase 04 Matching ===")
print(" 전체 파이프라인: python scripts/04_match_rules.py")
print(" 단계별: --phase profile|scan|label|select")
print(f" analysis csv: {ANALYSIS_TRADES_CSV}")
print(f" output dir: {REPORTS_MATCHING}")
return REPORTS_MATCHING
if __name__ == "__main__":
run_match()