""" general_analysis HTML 요약 리포트. """ from __future__ import annotations from pathlib import Path import pandas as pd from deepcoin.analysis.general_analysis_config import DEFAULT_OUTPUT_CSV, DEFAULT_OUTPUT_HTML def write_analysis_report( csv_path: Path | str = DEFAULT_OUTPUT_CSV, html_path: Path | str = DEFAULT_OUTPUT_HTML, ) -> Path: """ 스냅샷 CSV를 읽어 모듈별 컬럼 수·샘플 테이블 HTML 생성. Returns: HTML 경로. """ df = pd.read_csv(csv_path) html_out = Path(html_path) html_out.parent.mkdir(parents=True, exist_ok=True) modules = { "지표 (ga_)": [c for c in df.columns if "_ga_" in c or c.startswith("ga_")], "패턴": [c for c in df.columns if "ga_pattern_" in c], "파동·구조": [c for c in df.columns if "ga_struct_" in c or "ga_elliott" in c or "ga_wyckoff" in c or "ga_fib_" in c], "차트": [c for c in df.columns if "ga_chart_" in c], "MTF 합성": [c for c in df.columns if "ga_align_" in c], "레거시": [c for c in df.columns if c.endswith("_RSI") or c.endswith("_bb_pos")], } summary_rows = "" for name, cols in modules.items(): summary_rows += f"
타점 {len(df)}건 · 컬럼 {len(df.columns)}개 · CSV: {csv_path}
| 모듈 | 컬럼 수 |
|---|
전체 데이터: {csv_path}