feat(backtest): 매집 점수 신호 검증 + 포트폴리오 커버 이미지#1
Merged
Conversation
형성구간(12거래일)에서 점수화한 후보를 보유구간 실제 수익률로 평가하는
간이 검증을 추가. 순위상관(scipy 비의존)·점수 분위별 평균 수익률 요약과
kq-backtest CLI 제공. README 커버용 그림 3종(랭킹·검증·종목 수급)을
scripts/make_figures.py 로 재현 가능하게 생성.
- strategies/backtest.py: forward_returns / backtest / spearman + CLI
- viz/portfolio.py: 랭킹 막대, 점수↔수익률 2패널
- scripts/make_figures.py: docs/images/{ranking,backtest,candidate}.png
- tests/test_backtest.py: split·forward_returns·spearman·예외 (5)
- 시장 색상 버그 수정: DB는 '거래소'/'코스닥' 한글 저장 (영문 비교 오류)
- .gitignore: README 이미지(docs/images/*.png) 추적 예외
3dd4671 to
fa00c00
Compare
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.
개요
매집 스크리너가 실제로 신호를 담고 있는지를 데이터로 보이고, README 커버에 올릴 시각화 3종을 추가합니다. 포트폴리오 가독성을 위한 변경입니다.
변경 사항
strategies/backtest.py— 형성구간(기본 12거래일)에서 점수화한 후보를 보유구간 실제 수익률로 평가. 순위상관(scipy 비의존, 순위변환 후 Pearson)·점수 분위별 평균 수익률 요약.kq-backtestCLI 제공.viz/portfolio.py— 매집 후보 랭킹 막대 + 점수↔수익률 2패널(산점도 + 분위별 막대).scripts/make_figures.py—docs/images/{ranking,backtest,candidate}.png재현 생성.tests/test_backtest.py— split·forward_returns·spearman·예외 5건.함께 잡은 버그
'거래소'/'코스닥'한글로 저장하는데 영문"KOSPI"와 비교해 전부 KOSDAQ 색으로 칠해지던 것 수정.*.png전역.gitignore가 README 이미지까지 잡아 GitHub에서 깨질 뻔한 것 →!docs/images/*.png예외.검증 결과 (2026-05-15~06-12, 19거래일)
ruff checkclean🤖 Generated with Claude Code