feat: CIO 매도 결정안 + 결정안 성과추적 + 대시보드 표시

- score-engine: run_cio_decisions에 보유종목(user_portfolio) 매도 결정안(등급악화/손절)
  추가, 모든 결정안에 entry_price 기록. verify_decisions_job(매일18:10)이 7일 실측
  수익·알파·정답여부 채점 → /decisions/accuracy (자동실행 게이트, "회사 결정이 실제 맞았나").
- dashboard-api: /api/data-health·accuracy·hot-validate·decisions·decisions-accuracy 프록시.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
kyu
2026-06-03 12:42:12 +09:00
parent 84fd3833ff
commit 0cb1b736a9
2 changed files with 132 additions and 13 deletions
+27
View File
@@ -2084,6 +2084,33 @@ async def proxy_sector_concentration():
return await _proxy_get(f"{SCORE_ENGINE_URL}/sector/concentration")
# ── AI 투자조직 패널 (데이터건강·정확도·핫검증·결정안) ──────────────
@app.get("/api/data-health")
async def proxy_data_health():
"""데이터 무결성 (score-engine /data-health)"""
return await _proxy_get(f"{SCORE_ENGINE_URL}/data-health")
@app.get("/api/accuracy")
async def proxy_accuracy(days: int = Query(default=90, ge=7, le=365)):
"""추천 등급별 정확도 (score-engine /accuracy)"""
return await _proxy_get(f"{SCORE_ENGINE_URL}/accuracy?days={days}")
@app.get("/api/hot-validate")
async def proxy_hot_validate():
"""핫종목 검증 (score-engine /hot/validate)"""
return await _proxy_get(f"{SCORE_ENGINE_URL}/hot/validate", timeout=20.0)
@app.get("/api/decisions")
async def proxy_decisions():
"""오늘의 결정안 (score-engine /decisions)"""
return await _proxy_get(f"{SCORE_ENGINE_URL}/decisions")
@app.get("/api/decisions-accuracy")
async def proxy_decisions_accuracy(days: int = Query(default=60, ge=7, le=365)):
"""결정안 실측 성과 (score-engine /decisions/accuracy)"""
return await _proxy_get(f"{SCORE_ENGINE_URL}/decisions/accuracy?days={days}")
async def _enrich_kr_names(rows):
"""rows의 kr_code/stock_code에 dart_corps.corp_name을 kr_name으로 첨부"""
if not isinstance(rows, list) or not rows: