Files
QuantEngineByItz/spec/strategy/smart_money_liquidity_gate_v1.yaml
kjh2064 af1236202d WBS-7.3: GAS→Python 마이그레이션 5개 항목 완료 (F14, F02-F06)
- F14: late_chase_risk_score 검증
  * GAS가 유일한 생산처 (Python canonical 없음)
  * migration_action: KEEP_IN_GAS로 정정, status: DONE

- F02/F03/F04/F06: priceBasis 로직 포팅
  * formulas/price_basis_v1.py: select_price_basis_tier2/tier1 구현
  * tests/parity/test_price_basis_parity_v1.py: 8 parity 테스트 (모두 PASS)
  * GAS Number.isFinite() 의미론 정확히 재현 (math.isfinite 사용)
  * 모든 테스트 112/112 PASS

남은 작업 (4개):
- F05: decision_logic (action assignment)
- F07: score_logic (threshold addition)
- F10: routing decision
- F15: late_chase_gate

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-22 22:45:00 +09:00

62 lines
2.5 KiB
YAML

formula_id: SMART_MONEY_LIQUIDITY_GATE_V1
name: 스마트머니 및 유동성 게이트 (Smart Money Liquidity Gate)
description: 기관/외국인의 수급 동향과 호가창 유동성을 실시간 분석하여 뒷북 매수 및 설거지 휩쓸림을 방지합니다.
rules:
- id: SM001
condition: "inst_net_buy_5d < 0 AND frg_net_buy_5d < 0"
action: "BLOCK_BUY"
reason: "스마트머니 양매도 진행 중 (분산 국면)"
- id: SM002
condition: "avg_trade_value_5d < 5000000000"
action: "LIMIT_QUANTITY"
reason: "유동성 부족 상태 (슬리피지 리스크)"
- id: SM003
condition: "rsi14 > 70 AND flow_credit < 0.3"
action: "BLOCK_BUY"
reason: "고점 과열 및 수급 약화 (설거지 위험)"
output:
schema: smart_money_liquidity_json
fields:
- flow_state: STRING (ACCUMULATION, DISTRIBUTION, NEUTRAL)
- liquidity_grade: STRING (HIGH, NORMAL, LOW)
- execution_mode: STRING (NORMAL, STAGED_ONLY)
# ── 신호-결과 연결 (SMART_MONEY_LIQUIDITY_OUTCOME_LINK_V1) ──────────────────
evidence_outcome_link:
formula_id: SMART_MONEY_LIQUIDITY_OUTCOME_LINK_V1
rationale: "수급(외인/기관 순매수)·유동성(FROZEN/THIN/NORMAL/DEEP) 신호가 실제 T+5 수익과 상관 있는지 수치로 확인"
implementation:
- step: 1
desc: "진입 시점 smart_money_score, liquidity_label을 결과(T+5 return)와 조인"
- step: 2
desc: "liquidity_label별 평균 슬리피지(체결 손실)와 수익률 표를 산출"
- step: 3
desc: "FROZEN→conviction=0 강제(AGENTS S1)가 실제 손실 회피로 이어졌는지 확인"
liquidity_labels:
FROZEN: {conviction_override: 0, note: "AGENTS S1 강제 적용"}
THIN: {note: "LIMIT_QUANTITY 발동"}
NORMAL: {note: "정상 진입 가능"}
DEEP: {note: "대형주 슬리피지 최소"}
output_table_fields:
- liquidity_label
- avg_slippage_pct
- t5_avg_return_pct
- t5_win_rate
- sample_count
- label # UNVALIDATED 또는 VALIDATED
output: Temp/smart_money_liquidity_outcome_link_v1.json
python_tool: tools/build_smart_money_liquidity_composite_v3.py
gs_coverage: "gas_apex_alpha_watch.gs:linkSmartMoneyOutcome_()"
validator: "tools/validate_smart_money_liquidity_evidence_v2.py"
acceptance:
- "liquidity_label별 슬리피지·수익 표 출력"
- "표본 < 30 시 [UNVALIDATED: n={n}] 라벨 부착"
conflict_precedence:
- risk_exit
- cash_floor
- anti_late_entry
- smart_money
- momentum