feat: 트랙레코드 재시작 도구 — 자본 결정(A안) 원클릭 실행 준비#427
Merged
Merged
Conversation
자본 레버(A안) 등 운영 중 구성 변경 시 NAV 시계열 점프를 피하려면 재시작이 필요하다(평가 기준서 권장 절차). 이 도구는 기존 기록을 삭제하지 않고 account_key/strategy를 '<키>@archived-<날짜>'로 이전한다: - 가역: --undo --archive-suffix <값> --apply로 복원 (살아있는 키에 기록이 있으면 섞임 방지 fail-closed) - 아카이브 기록은 평가·게이트(정확 키 매칭)에서 자연 제외 — 새 시계열만 판정 - dry-run 기본, --apply 명시 시에만 변경 A안 실행 절차(도구 docstring에 명시): yaml에 initial_capital 추가 → dry-run 확인 → --apply → 다음 사이클부터 새 자본·새 시계열(0/60 재시작). 테스트 3건(dry-run 무변경 / 아카이브→undo 왕복 / 살아있는 기록 위 undo 차단). 전체 1526 passed.
easygap
added a commit
that referenced
this pull request
Jul 2, 2026
한 달 실측(-5.47% vs KS11 +0.71%)의 격차 -6.18%p를 실행 격차(-2.5%p, 통제 가능)와 구성 격차(-3.7%p, 설계 수용)로 분해하고, 개선 계획을 정리했다. 핵심 발견: - 하이닉스 슬롯 공백이 이번 달에만 -1.5%p — 하필 못 산 종목이 최고 상승(+18.4%) - 현금 41%는 버그가 아니라 산수: 슬롯 80만 < 하이닉스 1주 + 정수 절사 10.9%p - 6/26 스냅샷 결측은 원인 기록조차 없음(사이클 이벤트 부재) → 커버리지 94% < 95% - 6/10 하루 일괄 진입의 타이밍 비용 약 -1%p (당일 지수 -4.5%) 계획: - 오너 결정 1건: 자본 A안, 최신 시세 반영 시 최소 3,030만 → 3,400만 권고 (슬롯 채움 시뮬레이션 표 포함, #427 재시작 도구로 가역 실행) - P0: 사이클 하트비트+결측 당일 경보+재시도 / SMTP 재발급 / 일일 리포트 v2 (벤치마크 격차·배치율·진행률·미체결 경고) - P1~P3: 귀속 자동화, 집계 배치율 감시, 스냅샷 시점 정합, 주간 리포트, 50/50 병행 트랙, 분할 진입 옵션(기본 off), 소액 live 전환 순서 구현은 항목별 별도 PR — 이 커밋은 문서만.
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.
배경
#422 자본 결정(A/B/C)의 어느 쪽이든 운영 중 구성 변경에는 트랙레코드 재시작이 필요합니다(NAV 점프 방지 — 평가 기준서 권장). 지금까지는 재시작 수단이 없었습니다.
내용 —
tools/restart_basket_track_record.py<키>@archived-<날짜>로 이전 — 아카이브 기록은 평가·게이트(정확 키 매칭)에서 자연 제외--undo --archive-suffix <값> --apply로 복원, 살아있는 키에 기록 존재 시 섞임 방지 fail-closedA안 선택 시 실행 절차 (3단계)
평가 자본 정합(#426)이 이미 머지돼 있어 레버를 켜도 판정 왜곡이 없습니다.
검증
테스트 3건(dry-run 무변경 / 아카이브↔undo 왕복 / 오염 방지 차단) — 전체 1526 passed