Repository navigation
Conversation
fix: reconcile executed portfolio returns and reduce calculation cost
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.
휴장일에 DCA가 지연되면 이후 납입 요일도 이동하고, 체결되지 않은 예정 납입액까지 원금에 포함해 고정가에서도 -33.33% 손실이 발생했습니다. 예정 달력과 실제 납입을 분리하고, 전체 시뮬레이션의 USD 체결 원장으로 개별 수익률·평가액·거래 로그를 생성합니다.
검증: Docker BE 단위 579개 + golden master 1개, 별도 런타임 HTTP의 6개 전략·휴장일 DCA·USD/KRW/현금·네 조회, 실제 로컬 웹 계산, 의존성 감사와 스키마 정합성 통과. 기존 반례는 수정 전에 8개 테스트로 실패를 확인했고 독립 회귀 테스트를 총 21개 추가했습니다.
동일 호스트/2 CPU/2GiB/합성 시세/3회 중앙값에서 20종목·10년 DCA+리밸런싱은 2.889→1.734초, SMA는 2.519→1.088초였습니다. DB·외부 API·HTTP 전송을 제외한 로컬 측정입니다. 최대 프로세스 RSS는 216→228MiB입니다. 자세한 근거는 docs/reviews/calculation-performance-2026-10-25.md에 있습니다.
운영 검증 완료 — 2026-10-25