feat: 일일 리포트 v2 — 시장/설계/일정 대비 지표 추가#429
Merged
Merged
Conversation
한 달 운영 리뷰(docs/PAPER_MONTH1_REVIEW_AND_PLAN.md P0-3)의 처방을 구현했다. 기존 일일 카드는 절대 수익만 있어 -5.47%가 전략 탓인지 판단할 수 없었다. 아래 세 축을 카드에 추가해 왜 그런지 한눈에 보이게 한다. 추가 필드: - 📊 vs KS11: NAV vs 벤치마크 격차 (시장 대비) - 🎯 주식 배치율: 실제 주식비중 vs 설계 80% (설계 대비) - 📅 진행률: n/60일 · 커버리지 % · 잔여 결측예산 (일정 대비) - 💸 누적 비용: 누적/연환산(기간 미충족 시 참고 표기) -⚠️ 미체결 슬롯: 현재 자본으로 못 채우는 슬롯 경고(#422) 구조: - core/basket_evaluation.py: 순수 포맷터 build_daily_report_extras + 평가결과에 snapshot_days 노출(결측예산 계산). 테스트 용이하게 분리. - core/basket_rebalancer.py: 읽기전용 diagnose_deployment — 종목별 드리프트가 못 보는 집계 배치율 이탈 + 미체결 슬롯을 함께 드러낸다. - main.py: 일일 사이클 배선. 부가필드 실패해도 기본 카드는 발송(채널 보조). - core/notifier.py: 값 있을 때만 렌더링(하위 호환). 적대적 리뷰 반영: 스냅샷 결측일 NAV 단일소스화(카드 누적수익률과 일치), 결측예산 게이트 정합(max(min_days, progress_days)), min_trading_days=0 방어, 경계 테스트 보강(>3 슬롯 요약, min_trade arm, 가격/총자산 0). 전체 스위트 1548 통과, 실데이터 스모크 확인.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇
한 달 운영 리뷰(docs/PAPER_MONTH1_REVIEW_AND_PLAN.md §4 P0-3)의 일일 리포트 v2를 구현합니다. 기존 카드는 절대 수익만 있어 "왜"를 판단할 수 없었는데, 시장 대비 / 설계 대비 / 일정 대비를 한눈에 보이게 했습니다.
추가된 필드
실데이터 예시:
구조 (테스트 용이하게 분리)
core/basket_evaluation.py— 순수 포맷터build_daily_report_extras(). 평가결과에snapshot_days노출(결측예산 계산용).core/basket_rebalancer.py— 읽기전용 진단diagnose_deployment(). 종목별 드리프트가 못 보는 집계 배치율 이탈과 미체결 슬롯을 함께 드러냄.main.py— 일일 사이클에서 배선. 부가필드 계산 실패해도 기본 카드는 항상 발송(채널은 보조).core/notifier.py— 5개 필드 선택 렌더링(값 있을 때만 → 하위 호환).적대적 리뷰 반영
다중 에이전트로 diff를 검토(11건 제기 → 7건 확정·전부 low, 3건 반증, 1건 불확실). 확정 항목 반영:
max(min_days, progress_days)로 정합.min_trading_days=0(무의미 설정)에서 '5/0일' 방어.남은 저순위(별도): KS11 조회 캐시 없음 — 바스켓 N개면 매일 N회 재조회(현재 N=1이라 무해, 공유 함수 변경이라 P1에서).
테스트
tests/test_daily_report_extras.py(포맷터),TestDiagnoseDeployment(진단), notifier 렌더링 2건.