# spec/strategy/predictive_alpha_dialectic_v2.yaml
# P1-014: Dialectical Predictive Alpha V2 - Synthesis Decile Calibration
#
# 목적: thesis-antithesis-synthesis 점수가 forward return과 연결되는지 검증.
# 현재 상태: BEARISH_SAFE_PENDING_CALIBRATION
#   - bearish_buy_violations = 0 (PASS)
#   - synthesis_decile_monotonicity = INSUFFICIENT_DATA (T+20 < 30)

meta:
  formula_id: PREDICTIVE_ALPHA_CALIBRATION_V2
  version: "2026-06-06"
  python_tools:
    - tools/build_predictive_alpha_dialectic_engine_v2.py
    - tools/validate_predictive_alpha_dialectic_v2.py
  sources:
    - Temp/predictive_alpha_engine_v2.json
    - Temp/proposal_evaluation_history.json
    - Temp/predictive_alpha_calibration_v2.json

# -- 정반합 구조 --
dialectic_structure:
  thesis:
    description: "종목이 상승할 근거 (기술적/펀더멘털/모멘텀 팩터)"
    max_score: 100
  antithesis:
    description: "종목이 하락할 근거 (거시/리스크/센티멘트 팩터)"
    max_score: 100
    single_factor_cap: "antithesis_total의 50% 이하"
  synthesis:
    formula: "direction_confidence = thesis_score - antithesis_score"
    verdicts:
      STRONG_BULLISH:  "dc >= 40"
      BULLISH:         "dc >= 20"
      NEUTRAL:         "dc >= -20"
      HOLD:            "dc < -20 (약한 약세 — EXIT 아님)"
      BEARISH:         "dc < -40 (신규 BUY 금지)"

# -- synthesis_decile_monotonicity 검증 --
decile_monotonicity:
  method: "synthesis_score 5분위별 T+20 평균수익률 단조 증가 확인"
  required_t20_samples: 30
  current_t20_live_samples: 0
  status: INSUFFICIENT_DATA
  remediation: "T+20 LIVE 표본 30건 축적 후 자동 활성화 (~2026-07-15)"
  threshold_rule: >
    높은 decile일수록 기대수익 단조 증가하지 않으면
    threshold 낮추지 않음 (과최적화 방지)

# -- BEARISH BUY 차단 --
bearish_buy_guard:
  rule: "synthesis_verdict in BEARISH/STRONG_BEARISH/AVOID → BUY 금지"
  current_violations: 0
  status: PASS
  enforcement: "allow_execution=False when direction_confidence < -40"

# -- alpha_calibration_gate 판정 로직 --
calibration_gate:
  CALIBRATED:
    requires: "bearish_violations==0 AND synthesis_decile_monotonicity==PASS"
    status: NOT_YET
  BEARISH_SAFE_PENDING_CALIBRATION:
    requires: "bearish_violations==0 AND T+20<30"
    status: CURRENT
  BLOCKED_BEARISH_VIOLATION:
    requires: "bearish BUY 감지됨"
    status: GUARD_ACTIVE

# -- 수락 기준 --
acceptance_criteria:
  alpha_calibration_gate:
    target: CALIBRATED
    current: BEARISH_SAFE_PENDING_CALIBRATION
    status: PENDING_DATA
    remediation: "T+20 LIVE 표본 축적 (~2026-07-15)"
  synthesis_decile_monotonicity:
    target: PASS
    current: INSUFFICIENT_DATA
    status: PENDING_DATA
  bearish_buy_violation_count:
    target: "==0"
    current: 0
    status: PASS

# -- 금지 사항 --
prohibitions:
  - "BEARISH 판정 종목에 BUY/STRONG_BUY 제안 금지"
  - "T+20 표본 없이 synthesis_decile_monotonicity=PASS 선언 금지"
  - "decile monotonicity 미검증 상태에서 threshold 하향 조정 금지"
  - "antithesis 단일 팩터가 50% 이상 점수 차지 금지"
