Files
QuantEngineByItz/spec/strategy/sector_model.yaml
kjh2064 5166750b53 WBS-7.3/7.4/7.5/7.11: 거버넌스 문서 정합성 정리 + spec-코드 동기화 게이트
2026-06-21 비판적 리뷰에서 spec/governance YAML이 코드 상태와 어긋난
채로 방치되던 3개 구체적 사례를 발견하고 정정했다. 근본 원인(동기화를
보장하는 장치 없음)에 대응하는 신규 CI 게이트도 함께 추가한다.

- spec/aliases.yaml: deprecated alias 17건 제거(활성 참조 0건 확인 후,
  2026-06-30 데드라인 전). role: deprecated_redirect인 spec/03_risk_policy.yaml,
  spec/04_strategy_rules.yaml 2개만 실삭제 — spec/06_exit_policy.yaml은
  role: compatibility_index(영구유지 설계)였음을 재확인해 보존
- governance/gas_logic_migration_ledger_v1.yaml: 존재하지 않는 파일을
  canonical 구현으로 인용하던 오류 2건 발견·정정, parity 테스트 부재로
  GAS 코드 삭제 보류(F12/F13/F14)
- spec/13_formula_registry.yaml: OVERHANG_PRESSURE_V1의 "-500000"
  절대값 폴백을 avg_volume_5d 비례식으로 교체(EXPERT_PRIOR 등록)
- tools/validate_specs.py: validate_spec_code_sync() 신규 — has_code_implementation/
  code_path 필드가 있는 spec만 검사(점진적 롤아웃, 기존 PASS 상태 비파괴),
  12개 파일 1차 태깅
2026-06-21 20:08:48 +09:00

69 lines
5.3 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
meta:
title: "은퇴자산포트폴리오 — 섹터 모델 분할 후보"
parent_file: "RetirementAssetPortfolio.yaml" # 2026-06-22 WBS-7.11: spec/04_strategy_rules.yaml 삭제로 갱신
version: "2026-05-15-F8_split"
language: "ko-KR"
timezone: "Asia/Seoul"
role: "canonical"
migration_status: "canonical_split_active"
authority_rule: "이 split 파일이 해당 섹션의 canonical source다. parent_file은 legacy compatibility index다."
sector_model:
score_axes: ["1M/3M 상대강도", "거래대금", "외국인·기관 수급", "실적전망", "거시환경", "밸류에이션"]
score_axes_formula: # [P128] 100점 만점 채점 공식 — A_core/B_wait/C_watch/D_exclude 임계치 근거
total: 100
components:
price_strength: {axis: "1M/3M 상대강도", weight: 25, score_rule: "섹터 내 1M 상대강도 상위 30% 이내→25점; 30~60%→15점; 60% 초과→0점"}
volume_quality: {axis: "거래대금", weight: 15, score_rule: "5D 거래대금 20D 평균 대비 120% 이상→15점; 80~120%→8점; 미만→0점. ETF proxy는 etf_raw.ETF_Liquidity_Score를 별도 반영"}
flow_quality: {axis: "외국인·기관 수급", weight: 25, score_rule: "sector_flow 기준 Sector_Flow_Quality = 0.6×SmartMoney_5D_Norm_Score + 0.4×Flow_Breadth_5D_Score. legacy sector_flow 단독으로 A_core 근거 금지"}
earnings_revision: {axis: "실적전망", weight: 20, score_rule: "컨센서스 EPS 상향→20점; 유지→10점; 하향→0점"}
macro_regime: {axis: "거시환경", weight: 10, score_rule: "Risk-On(VIX<18, KOSPI>MA20)→10점; Neutral→5점; Risk-Off→0점"}
valuation: {axis: "밸류에이션", weight: 5, score_rule: "PER/PBR 섹터 평균 이하→5점; 평균~1.5배→2점; 1.5배 초과→0점"}
flow_credit_definition_xref: "quant_feed_contract.investor_flow_rules.active_quality_gate.formula # 종목 단위 flow_credit 정의 위치. 섹터 단위는 sector_flow 원화 수급·확산도 우선."
prohibition: "점수 미산출 시 A_core 판정 금지. 데이터 누락 축은 0점 처리 후 DATA_MISSING 표시. sector_flow.Data_Quality가 C 또는 D이면 Strong_Buy 및 섹터 단독 Strong_Sell 금지. sector_universe.Is_ETF=Y 행은 구성종목 수급 집계에서 제외한다."
grade:
alias_of: "recommendation_grade" # [ALIAS / proposal_118] A_core=A, B_wait=B, C_watch=C, D_exclude=D. 기준은 recommendation_grade 참조.
A_core: "80점 이상 (원시데이터 80% 이상 확인, 비용차감 기대수익비 2:1 이상, 돌파 직후가 아니라 확인 후 진입)"
B_wait: "65~79점 또는 가격 과열, 신고가 직후·장대양봉 직후는 대기"
C_watch: "50~64점 또는 데이터 일부 누락"
D_exclude: "50점 미만 또는 핵심 데이터 충돌"
missing_data_rule: ["가격·수급·거래대금 중 2개 이상 누락 시 최대 C-관찰", "프록시만으로 A등급 금지", "점수 개선 당일 추격매수 금지", "신고가/돌파 당일은 시범진입만 허용하고 본진입은 다음 거래일 확인 후"]
core_satellite_classification_score:
purpose: >
종목의 처우(trailing band·time-stop·risk_budget)를 결정하기 위한
단일 분류 기준. 진입 판단과 무관하며 진입 이후 처우 기준 통일 목적.
formula: "CSCS = W1×kospi_weight_factor(0.30) + W2×flow_strength_20d(0.30) + W3×holding_stability(0.20) + W4×atr_stability(0.20)"
weights:
W1_kospi_weight_factor:
weight: 0.30
scoring: "KOSPI 시총 비중 >=1%:100pt / 0.5~1%:70pt / 0.1~0.5%:40pt / <0.1%:10pt. KOSDAQ종목:0pt."
W2_flow_strength_20d:
weight: 0.30
scoring: "Frg_20D+Inst_20D 합산 양수&Flow_Rows>=20:100pt / 어느 하나만 양수:60pt / 둘 다 음수:0pt. Flow_OK=N:0pt."
W3_holding_stability:
weight: 0.20
scoring: "보유 >=60거래일:100pt / 30~59:70pt / 10~29:40pt / <10거래일:0pt. 보유기간 미확인:50pt(중립)."
W4_atr_stability:
weight: 0.20
scoring: "ATR20_Pct <3%:100pt / 3~5%:70pt / 5~8%:40pt / >=8%:10pt. ATR20 DATA_MISSING:50pt(중립)."
classification:
core: "CSCS >= 70 → 코어 처우"
satellite: "CSCS < 70 → 위성 처우"
treatment_mapping:
core_treatment:
trailing_bands: "take_profit.trailing_stop.core_large_cap"
time_stop: "stop_loss.time_stop.core"
risk_budget_cap: "단일 종목 총자산 1.0~1.2% 이내"
satellite_treatment:
trailing_bands: "take_profit.trailing_stop.satellite_trigger"
time_stop: "stop_loss.time_stop.satellite"
risk_budget_cap: "단일 종목 총자산 0.7~1.0% 이내"
special_exception:
- "삼성전자(005930)·SK하이닉스(000660): CSCS 계산 없이 항상 core 처우. special_exception.kospi_semiconductor_leadership 우선."
hard_rules:
- "CSCS 미산출 종목: 보유비중으로 수동 판단. 코어/위성 자동 구분 금지."
- "W2·W4가 DATA_MISSING이면 해당 항목 50pt 중립 처리."
- "CSCS는 진입 결정이 아닌 진입 후 처우 결정에만 사용."
output_required:
columns: ["종목명", "CSCS점수", "W1", "W2", "W3", "W4", "분류(코어/위성)", "적용_trailing", "time_stop_기준일"]