code_path: tools/build_continuous_evaluation_dashboard_v1.py
formula_id: CONTINUOUS_EVALUATION_DASHBOARD_V1
gate_logic:
  INSUFFICIENT_DATA:
    condition: live_t20_count < 30
    effect: 성과 지표를 None으로 표기 (게이트 실패 아님)
  PASS:
    condition: live_t20_count >= 30
  WARNING:
    condition: expectancy_pct < 0 OR win_rate_pct < 40
has_code_implementation: true
meta:
  has_code_implementation: false
metric_definitions:
  expectancy_pct:
    formula: mean(t20_return_pct) for LIVE EVALUATED_T20 records
    note: T+20 표본이 30건 미만이면 INSUFFICIENT_DATA
    target: '> 0'
  max_drawdown_pct:
    formula: min(t20_return_pct) for EVALUATED_T20 records
    note: 음수가 클수록 나쁨
  profit_giveback_pct:
    formula: 'count(proposals where t20_return > 0 AND subsequent outcome showed >50%
      giveback) / count(profitable_t20) * 100

      '
    note: 현재 giveback 추적 미구현 → None 반환
  win_rate_pct:
    formula: count(t20_return_pct > 0) / count(EVALUATED_T20) * 100
    target: '>= 50%'
output: Temp/continuous_evaluation_dashboard_v1.json
prohibitions:
- REPLAY 표본을 성과 지표(win_rate/expectancy/MDD) 계산에 포함 금지
- T+20 미확정 LIVE 거래를 EVALUATED_T20으로 분류 금지
- 외부 가격 데이터를 직접 조회해 T+20 수익률 계산 금지 (history 기록 기준만 사용)
purpose: 'P2-020: 주간 성과 대시보드. LIVE T+20 표본 기반 기대수익/승률/MDD/수익반납 지표 산출. REPLAY 표본은 informational
  섹션에만 집계되며 성과 지표 계산에 혼입 금지.

  '
python_tool: tools/build_continuous_evaluation_dashboard_v1.py
required_fields:
- weekly_scorecard_generated
- expectancy_pct
- win_rate_pct
- max_drawdown_pct
- profit_giveback_pct
schema_version: evaluation_dashboard_contract.v2
sources:
- Temp/proposal_evaluation_history.json
weekly_scorecard:
  fields:
  - win_rate_pct
  - expectancy_pct
  - trade_count
  - avg_t20_days
  group_by: ISO_week
  min_records_per_week: 3
