fix: 로그 WARNING 2종 수정 - scanner 오해 메시지 및 홀딩 종목 rsi 누락 (#267) #268

Merged
jihoson merged 2 commits from feature/issue-267-fix-log-warnings into main 2026-02-26 01:46:44 +09:00
Collaborator

Summary

  • WARNING 1 제거: No dynamic overseas symbol universe for US_AMEX; scanner cannot run

    • fallback_stocks가 없어도 overseas ranking API로 scanner가 정상 동작함
    • WARNING → DEBUG로 레벨 낮춤 (2곳: daily 모드, realtime 모드)
  • WARNING 2 & 3 제거: Condition requires 'rsi'/'volume_ratio' but key missing from market_data

    • 홀딩 종목(NVDA 등)은 scanner를 통하지 않아 scan_candidates에 없음
    • candidate 없는 경우 market_data에 fallback 값 설정:
      • rsi: price_change_pct 기반 implied RSI
      • volume_ratio: 1.0 (기본값)
    • scenario_engine 조건 평가 항상 완전하게 동작

Test plan

  • 전체 888개 테스트 통과
  • test_scan_candidates_market_scoped: 잘못된 마켓 candidate의 rsi 무시 확인
  • test_scenario_engine_called_without_scanner_data: fallback implied_rsi 검증

🤖 Generated with Claude Code

## Summary - **WARNING 1 제거**: `No dynamic overseas symbol universe for US_AMEX; scanner cannot run` - fallback_stocks가 없어도 overseas ranking API로 scanner가 정상 동작함 - WARNING → DEBUG로 레벨 낮춤 (2곳: daily 모드, realtime 모드) - **WARNING 2 & 3 제거**: `Condition requires 'rsi'/'volume_ratio' but key missing from market_data` - 홀딩 종목(NVDA 등)은 scanner를 통하지 않아 scan_candidates에 없음 - candidate 없는 경우 market_data에 fallback 값 설정: - rsi: price_change_pct 기반 implied RSI - volume_ratio: 1.0 (기본값) - scenario_engine 조건 평가 항상 완전하게 동작 ## Test plan - [x] 전체 888개 테스트 통과 - [x] test_scan_candidates_market_scoped: 잘못된 마켓 candidate의 rsi 무시 확인 - [x] test_scenario_engine_called_without_scanner_data: fallback implied_rsi 검증 🤖 Generated with [Claude Code](https://claude.com/claude-code)
agentson added 1 commit 2026-02-26 01:40:04 +09:00
1. WARNING → DEBUG: fallback_stocks 없어도 overseas ranking API로 scanner
   정상 동작하므로 오해를 주는 WARNING 레벨을 DEBUG로 낮춤 (2곳)

2. 홀딩 종목 market_data 보강: scanner를 통하지 않은 종목(NVDA 등)에
   price_change_pct 기반 implied_rsi와 volume_ratio=1.0 기본값 설정,
   scenario_engine 조건 평가 완전화

3. test_main.py: 새로운 동작에 맞게 관련 테스트 2개 업데이트

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
agentson added 1 commit 2026-02-26 01:45:28 +09:00
fix: 홀딩 종목 volume_ratio를 price API high/low 실데이터로 계산 (#267)
Some checks failed
CI / test (pull_request) Has been cancelled
9d7ca12275
candidate 없는 해외 홀딩 종목(NVDA 등)에 대해 이미 호출된
get_overseas_price 응답의 high/low를 활용하여 scanner와 동일한 방식으로
volume_ratio 계산:

  intraday_range_pct = (high - low) / price * 100
  volume_ratio = max(1.0, volatility_pct / 2.0)

high/low 미제공 시(국내 종목, API 미응답) 기존 기본값 1.0 유지.
implied_rsi는 이미 실API price_change_pct(rate 필드) 기반.

tests/test_main.py: 해외 홀딩 종목 volume_ratio 계산 검증 테스트 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jihoson merged commit 219eef6388 into main 2026-02-26 01:46:44 +09:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jihoson/The-Ouroboros#268