--- schema_version: "pre_distribution_gate_v1" generated: "2026-06-25" description: "P5: 뒷북 매수·설거지 차단" # Phase 5: 뒷북 차단 (배분 위험 조기 감지) # late_chase_status=DEGRADE_BUY_PERMISSION 발동 중 → 차단 purpose: "배분 상황의 뒷북 매수 · 설거지 청산 차단" # ───────────────────────────────────────────────────────────────────────────── # Solution 1: ALPHA_LEAD_ENTRY_GATE_V1 # ───────────────────────────────────────────────────────────────────────────── solution_1_alpha_lead_entry: name: "ALPHA_LEAD_ENTRY_GATE_V1" purpose: "선행 진입만 허용, 뒷북 진입 차단" rules: pilot_allowed: | alpha_lead_score >= 75 AND lead_entry_state == PILOT_ALLOWED add_on_allowed: | pilot_pnl >= 0 AND flow_confirmed=true AND breakout_volume_confirmed=true pullback_allowed: | confirmed_add_on=true AND pullback_to_ma20_or_atr_band=true tranche_order: - "T1: 30% (파일럿 진입)" - "T2: 30% (add_on 추가)" - "T3: 40% (pullback 추가, 최후 진입)" forbidden: - "CONFIRMED_ADD_ON 없이 T3 진입 금지" - "분위기로 PILOT 승격 금지" - "상대 강세만으로 T3 진입 금지" gas_function: "calcAlphaLeadV1_(alphaLeadScore, leadEntryState, pilotPnL, flowConfirmed)" # ───────────────────────────────────────────────────────────────────────────── # Solution 2: PRE_DISTRIBUTION_EARLY_WARNING_V1 # ───────────────────────────────────────────────────────────────────────────── solution_2_pre_distribution_gate: name: "PRE_DISTRIBUTION_EARLY_WARNING_V1" purpose: "배분 위험 신호 4개 중 2개 이상 → BUY 차단" block_buy_conditions: - condition: "distribution_risk_score >= 70" meaning: "배분 위험 점수 높음" weight: "critical" - condition: "price_up_volume_down == true" meaning: "가격 상승 vs 거래량 하락 (약세 신호)" weight: "high" - condition: "foreign_inst_net_sell_5d == true" meaning: "외국인 기관 순매도 (5일)" weight: "high" - condition: "candle_upper_tail_cluster == true" meaning: "상부 꼬리 연속 형성 (배분 신호)" weight: "medium" trigger_logic: "2개 이상 신호 발생 → BLOCK_BUY" action: "BLOCK_BUY (진입 금지)" gas_function: "calcDistributionRiskV1_(score, priceUpVolDown, foreignInstNetSell5d, candleUpperTailCluster)" # ───────────────────────────────────────────────────────────────────────────── # 구현 # ───────────────────────────────────────────────────────────────────────────── implementation: - "spec/exit/pre_distribution_gate.yaml (현재 파일)" - "src/google_apps_script/gas_data_feed.gs: calcAlphaLeadV1_(), calcDistributionRiskV1_()" - "tools/validate_alpha_execution_harness.py (검증)" enforcement: - "Alpha Lead: 자동 실행, LLM 자유도 없음" - "Distribution Gate: 자동 실행, LLM 자유도 없음" - "차단 사항 로깅 의무"