feat: use market_outlook to adjust BUY confidence threshold (#173) #177

Merged
jihoson merged 1 commits from feature/issue-173-market-outlook-threshold into main 2026-02-20 08:38:52 +09:00
Collaborator

Summary

  • trading_cycle에서 ScenarioEngine 평가 직후 market_outlook 기반 BUY confidence 임계값 조정
  • BEARISH → min_confidence=90, BULLISH → min_confidence=75, 기타 → settings.CONFIDENCE_THRESHOLD(기본 80)
  • 임계값 미달 BUY는 HOLD로 다운그레이드하고 사유(outlook, 임계값) 기록
  • MarketOutlook을 상단 import로 이동 (inline import 제거)

Test plan

  • test_bearish_outlook_raises_buy_confidence_threshold (confidence 85 → HOLD)
  • test_bearish_outlook_allows_high_confidence_buy (confidence 92 → BUY)
  • test_bullish_outlook_lowers_buy_confidence_threshold (confidence 77 → BUY)
  • test_bullish_outlook_suppresses_very_low_confidence_buy (confidence 70 → HOLD)
  • test_neutral_outlook_uses_default_threshold (confidence 82 → BUY)
  • 전체 694개 테스트 통과

Closes #173

🤖 Generated with Claude Code

## Summary - trading_cycle에서 ScenarioEngine 평가 직후 market_outlook 기반 BUY confidence 임계값 조정 - BEARISH → min_confidence=90, BULLISH → min_confidence=75, 기타 → settings.CONFIDENCE_THRESHOLD(기본 80) - 임계값 미달 BUY는 HOLD로 다운그레이드하고 사유(outlook, 임계값) 기록 - MarketOutlook을 상단 import로 이동 (inline import 제거) ## Test plan - [x] test_bearish_outlook_raises_buy_confidence_threshold (confidence 85 → HOLD) - [x] test_bearish_outlook_allows_high_confidence_buy (confidence 92 → BUY) - [x] test_bullish_outlook_lowers_buy_confidence_threshold (confidence 77 → BUY) - [x] test_bullish_outlook_suppresses_very_low_confidence_buy (confidence 70 → HOLD) - [x] test_neutral_outlook_uses_default_threshold (confidence 82 → BUY) - [x] 전체 694개 테스트 통과 Closes #173 🤖 Generated with [Claude Code](https://claude.com/claude-code)
agentson added 1 commit 2026-02-20 08:31:34 +09:00
feat: use market_outlook to adjust BUY confidence threshold (#173)
Some checks failed
CI / test (pull_request) Has been cancelled
d6edbc0fa2
- Import MarketOutlook at module level in main.py
- After scenario evaluation, check market_outlook and apply BUY confidence
  threshold: BEARISH→90, BULLISH→75, others→settings.CONFIDENCE_THRESHOLD
- BUY actions below the adjusted threshold are downgraded to HOLD with
  a descriptive rationale including the outlook and threshold values
- Add 5 integration tests covering bearish suppression, bearish allow,
  bullish allow, bullish suppression, and neutral default threshold

Closes #173

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jihoson merged commit bd2b3241b2 into main 2026-02-20 08:38:52 +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#177