ee3e799de1
주요 변경: - tools/build_rebalance_engine_v1.py: REBALANCE_ENGINE_V1 신규 * account_snapshot 직접 합산(_build_snap_position_map) → 소수주 분리 행 병합 * 레짐 소스 macro.REGIME_PRELIM 최우선 (GAS 와 동일) - src/gas_adapter_parts/gdf_06_rebalance.gs: runRebalanceSheet_() 신규 * Logger.log / getSpreadsheet_() 로 run_all 연동 수정 - src/gas_adapter_parts/gdc_01_fetch_fundamentals.gs * _mergePositionRecord_(): 소수주 중복 행 합산 신규 * parseInt → parseFloat (qty, availQty) - src/gas_adapter_parts/gdf_01_price_metrics.gs * 미보유 종목 SELL_READY → WATCH_EXIT_SIGNAL - spec/41_release_dag.yaml: build_rebalance_sheet 노드 추가 (step_count 63) - spec/51_formula_lifecycle_registry.yaml: REBALANCE_ENGINE_V1 등록 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1621 lines
53 KiB
YAML
1621 lines
53 KiB
YAML
schema_version: formula_domain.v1
|
||
source: C:\Temp\data_feed\spec\13_formula_registry.yaml
|
||
domain: risk
|
||
formulas:
|
||
PEG_SCORE_V1:
|
||
purpose: 코스닥 종목의 ForwardPER을 EPS 3개년 성장률로 나눠 밸류에이션 타당성 판정. 고PER이라도 고성장이 뒷받침되면
|
||
허용.
|
||
applicable: 코스닥 상장 종목에만 실행. KOSPI 종목은 이 공식 미적용.
|
||
inputs:
|
||
- field: forward_pe
|
||
unit: ratio
|
||
source: spec/12_field_dictionary.yaml:field_dictionary.forward_pe
|
||
- field: eps_growth_3y_cagr_pct
|
||
unit: percent
|
||
source: '컨센서스 3개년 EPS CAGR (예: 30% → 30 입력)'
|
||
- field: sector_median_forward_pe
|
||
unit: ratio
|
||
source: spec/12_field_dictionary.yaml:field_dictionary.sector_median_forward_pe
|
||
derived_fields:
|
||
peg: forward_pe / eps_growth_3y_cagr_pct
|
||
rules:
|
||
- if: peg <= 1.5
|
||
result: PASS
|
||
valuation_gate: OK
|
||
quantity_modifier: 1.0
|
||
- if: 1.5 < peg <= 2.5
|
||
result: CAUTION
|
||
valuation_gate: CAUTION
|
||
quantity_modifier: 0.7
|
||
- if: peg > 2.5
|
||
result: REJECT
|
||
valuation_gate: REJECT
|
||
quantity_modifier: 0.0
|
||
fallback:
|
||
condition: eps_growth_3y_cagr_pct == DATA_MISSING OR eps_growth_3y_cagr_pct
|
||
<= 0
|
||
rules:
|
||
- if: forward_pe <= sector_median_forward_pe * 2.0
|
||
result: PASS
|
||
quantity_modifier: 1.0
|
||
- if: forward_pe <= sector_median_forward_pe * 3.0
|
||
result: CAUTION
|
||
quantity_modifier: 0.7
|
||
- if: forward_pe > sector_median_forward_pe * 3.0
|
||
result: REJECT
|
||
quantity_modifier: 0.0
|
||
prohibition: EPS 성장률 추정·보간으로 PEG 계산 금지 — 확정 컨센서스 없으면 fallback만 허용
|
||
output:
|
||
field: peg_gate_result
|
||
unit: enum [PASS, CAUTION, REJECT]
|
||
required_fields:
|
||
- peg
|
||
- peg_gate_result
|
||
- quantity_modifier
|
||
- valuation_gate
|
||
missing_policy:
|
||
forward_pe: fallback 규칙 적용. DATA_MISSING 표기.
|
||
sector_median_forward_pe: fallback 분자 기준 미산출 → CAUTION 보수 처리.
|
||
canonical_ref: spec/strategy/stock_model.yaml:stock_model.kosdaq_valuation_gate
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- forward_pe
|
||
- eps_growth_3y_cagr_pct
|
||
- sector_median_forward_pe
|
||
output_fields:
|
||
- peg_gate_result
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
FINANCIAL_HEALTH_SCORE_V1:
|
||
purpose: 'ROE·영업이익률·부채비율·FCF를 결합해 종목의 재무 건전성을 0~20점으로 정량화. 수급·모멘텀 중심 편향을 보완하는
|
||
펀더멘털 축. 연간 기준 재무 데이터 사용.
|
||
|
||
'
|
||
inputs:
|
||
- field: roe_pct
|
||
unit: percent
|
||
optional: true
|
||
- field: operating_margin_pct
|
||
unit: percent
|
||
optional: true
|
||
- field: debt_to_equity
|
||
unit: ratio
|
||
optional: true
|
||
- field: fcf_b
|
||
unit: KRW_100M
|
||
optional: true
|
||
- field: sector_type
|
||
unit: enum
|
||
optional: true
|
||
note: 금융업(financial) 여부 — D/E 스코어링 건너뜀 판단
|
||
components:
|
||
profitability:
|
||
max_points: 8
|
||
source_field: roe_pct
|
||
rules:
|
||
- if: roe_pct >= 15
|
||
points: 8
|
||
- if: 10 <= roe_pct < 15
|
||
points: 5
|
||
- if: 5 <= roe_pct < 10
|
||
points: 2
|
||
- if: 0 <= roe_pct < 5
|
||
points: 0
|
||
- if: roe_pct < 0
|
||
points: -5
|
||
label: 수익성_훼손_페널티
|
||
missing_rule: 4pt 중립 처리 (DATA_MISSING_PROFITABILITY 태그)
|
||
operating_efficiency:
|
||
max_points: 7
|
||
source_field: operating_margin_pct
|
||
rules:
|
||
- if: operating_margin_pct >= 20
|
||
points: 7
|
||
- if: 10 <= operating_margin_pct < 20
|
||
points: 4
|
||
- if: 0 <= operating_margin_pct < 10
|
||
points: 2
|
||
- if: operating_margin_pct < 0
|
||
points: 0
|
||
label: 영업적자_HF007_발동
|
||
missing_rule: 3pt 중립 처리
|
||
financial_stability:
|
||
max_points: 5
|
||
source_field: debt_to_equity
|
||
financial_sector_skip: true
|
||
rules:
|
||
- if: debt_to_equity < 50
|
||
points: 5
|
||
- if: 50 <= debt_to_equity < 100
|
||
points: 3
|
||
- if: 100 <= debt_to_equity < 200
|
||
points: 1
|
||
- if: 200 <= debt_to_equity <= 400
|
||
points: 0
|
||
- if: debt_to_equity > 400
|
||
points: 0
|
||
label: 극단_부채_HF008_발동
|
||
missing_rule: 2pt 중립 처리
|
||
cash_generation:
|
||
max_points: 5
|
||
source_field: fcf_b
|
||
rules:
|
||
- if: fcf_b > 0
|
||
points: 5
|
||
label: 현금_창출
|
||
- if: fcf_b <= 0
|
||
points: 0
|
||
label: 현금_소각_또는_부재
|
||
missing_rule: 2pt 중립 처리
|
||
expression: "clamp(\n profitability_pts + operating_efficiency_pts +\n financial_stability_pts\
|
||
\ + cash_generation_pts,\n min=-5, max=20\n)\n"
|
||
output:
|
||
field: financial_health_score
|
||
unit: points_neg5_to_20
|
||
score_interpretation:
|
||
18_to_20: 재무 최우량 — ROE 높고 부채 낮고 FCF 창출
|
||
12_to_17: 재무 양호
|
||
6_to_11: 재무 보통 — 일부 약점 존재
|
||
0_to_5: 재무 취약 — 수급 강세여도 진입 신중
|
||
negative: 재무 훼손 — 영업적자 또는 ROE 음수. 수급 점수 불문 등급 하향 압력
|
||
missing_policy:
|
||
all_inputs_missing: 'financial_health_score = 8pt (전체 중립). DATA_MISSING_FHS
|
||
태그 필수. 재무 데이터 미제공 자체를 패널티로 처리하지 않음. 단, 코스닥 종목은 all_missing 시 6pt (더 보수적) 적용.
|
||
|
||
'
|
||
partial_missing: 각 컴포넌트별 missing_rule 적용 후 합산
|
||
sector_exception:
|
||
financial_sector:
|
||
definition: 은행·보험·증권·카드·캐피탈·리츠 등 금융업 SIC 분류
|
||
treatment: 'debt_to_equity 컴포넌트 건너뜀. financial_stability_pts = 3pt 기본값. ROE·Operating_Margin·FCF
|
||
컴포넌트는 동일 적용.
|
||
|
||
'
|
||
canonical_ref: spec/08_scoring_rules.yaml:strategy_score.financial_health
|
||
version: 2026-05-18_FINANCIAL_HEALTH_V1
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- roe_pct
|
||
- operating_margin_pct
|
||
- debt_to_equity
|
||
- fcf_b
|
||
- sector_type
|
||
output_fields:
|
||
- financial_health_score
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
RS_MOMENTUM_V1:
|
||
purpose: 상대강도(RS)와 수급 가속도를 측정하여 상투 진입 방지 및 후발주(Laggard) 조기 식별
|
||
inputs:
|
||
- field: close_price
|
||
unit: KRW_per_share
|
||
- field: ma20
|
||
unit: KRW_per_share
|
||
- field: avg_trade_value_5d
|
||
unit: KRW
|
||
- field: avg_trade_value_20d
|
||
unit: KRW
|
||
- field: relative_strength_1m_percentile
|
||
unit: percentile
|
||
derived_fields:
|
||
disparity_20d: close_price / ma20
|
||
momentum_acceleration: avg_trade_value_5d / avg_trade_value_20d
|
||
rules:
|
||
- if: disparity_20d > 1.15
|
||
action: TRIGGER_HF009_BLOCK
|
||
label: 이격도_과열(상투)
|
||
- if: momentum_acceleration < 0.8 AND close_price > ma20
|
||
action: TRIM_WARNING
|
||
label: 수급_가속도_둔화(설거지_경계)
|
||
- if: relative_strength_1m_percentile > 70
|
||
action: LAGGARD_SELL_PRIORITY_1
|
||
label: 상대강도_최하위(우선감축)
|
||
output:
|
||
field: alpha_shield_status
|
||
unit: enum
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- close_price
|
||
- ma20
|
||
- avg_trade_value_5d
|
||
- avg_trade_value_20d
|
||
- relative_strength_1m_percentile
|
||
output_fields:
|
||
- alpha_shield_status
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
OVERSOLD_DELAY_V1:
|
||
purpose: 현금 확보 시 '지하실 매도(패닉 셀)' 방지를 위한 데드캣 바운스 대기 알고리즘
|
||
inputs:
|
||
- field: rsi_14
|
||
unit: points
|
||
optional: true
|
||
- field: current_price
|
||
unit: KRW_per_share
|
||
- field: cash_shortfall_krw
|
||
unit: KRW
|
||
rules:
|
||
- condition: rsi_14 < 30 AND cash_shortfall_krw > 0
|
||
action: 전량 시장가 매도 금지. 25%만 TRIM 실행하고 잔여 수량은 단기 반등(+3% 이상) 시점까지 매도 유예.
|
||
label: 과매도_분할탈출(Staged Exit)
|
||
output:
|
||
field: oversold_exit_strategy
|
||
unit: string
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- rsi_14
|
||
- current_price
|
||
- cash_shortfall_krw
|
||
output_fields:
|
||
- oversold_exit_strategy
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
MEAN_REVERSION_GATE_V1:
|
||
purpose: '주가가 MA20 대비 과도하게 상승하면 신규 매수를 하드 블록한다. 에너지 분산(Distribution) 구간에서의 추격
|
||
매수(상투 잡기)를 원천 봉쇄.
|
||
|
||
'
|
||
applicable: 매수 주문 생성 전 항상 실행.
|
||
inputs:
|
||
- field: close_price
|
||
unit: KRW_per_share
|
||
- field: ma20
|
||
unit: KRW_per_share
|
||
expression: deviation_ratio = close_price / ma20
|
||
output:
|
||
field: deviation_ratio
|
||
unit: ratio
|
||
gates:
|
||
- if: deviation_ratio >= 1.15
|
||
status: BUY_HARD_BLOCK
|
||
rule_id: MRG001
|
||
note: HF009_OVEREXTENSION_BLOCK 연동
|
||
- if: 1.10 <= deviation_ratio < 1.15
|
||
status: BUY_CAUTION
|
||
rule_id: MRG001_SOFT
|
||
note: 과열 접근 -- 신규 매수 강도 축소
|
||
- if: deviation_ratio < 1.10
|
||
status: PASS
|
||
missing_policy:
|
||
ma20: MRG001 DATA_MISSING. MA20 데이터 필요. 매수 보류.
|
||
canonical_ref: spec/08_scoring_rules.yaml:hard_filters.HF009_OVEREXTENSION_BLOCK
|
||
version: 2026-05-19_ALPHA_SHIELD_V1
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- close_price
|
||
- ma20
|
||
output_fields:
|
||
- deviation_ratio
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
ECP_RISK_SCALE_V1:
|
||
purpose: 총자산 곡선(Equity Curve) 모멘텀에 따른 리스크 예산 자동 조절
|
||
inputs:
|
||
- field: total_asset
|
||
unit: KRW
|
||
- field: total_asset_ma10
|
||
unit: KRW
|
||
note: 10일 자산 이동평균
|
||
rules:
|
||
- if: total_asset < total_asset_ma10
|
||
action: RISK_BUDGET_HALVE
|
||
label: 자산곡선_역배열_방어
|
||
- if: total_asset >= total_asset_ma10
|
||
action: RISK_BUDGET_NORMAL
|
||
label: 자산곡선_정배열_정상
|
||
output:
|
||
field: equity_curve_status
|
||
unit: enum
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- total_asset
|
||
- total_asset_ma10
|
||
output_fields:
|
||
- equity_curve_status
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
COMPOSITE_VERDICT_V1:
|
||
purpose: 'SS001 등급(A/B/C/D)과 rs_verdict(LEADER/MARKET/LAGGARD/BROKEN/UNKNOWN)를
|
||
결합해 종목의 최종 포지션 판정을 내린다. LLM이 "좋아 보인다"류 언어적 판단으로 판정을 변경하는 것을 구조적으로 방지한다.
|
||
|
||
'
|
||
applicable: _addTickerGates_ 내에서 SS001 계산 직후 실행.
|
||
inputs:
|
||
- field: ss001_grade
|
||
unit: enum [A,B,C,D]
|
||
- field: rs_verdict
|
||
unit: enum [LEADER,MARKET,LAGGARD,BROKEN,UNKNOWN]
|
||
matrix: 'GRADE LEADER MARKET LAGGARD BROKEN UNKNOWN
|
||
|
||
A PRIME_CANDIDATE PRIME_CANDIDATE WATCH_CANDIDATE EXIT_REVIEW WATCH_CANDIDATE
|
||
|
||
B PRIME_CANDIDATE WATCH_CANDIDATE REDUCE_CANDIDATE EXIT_REVIEW WATCH_CANDIDATE
|
||
|
||
C WATCH_CANDIDATE REDUCE_CANDIDATE REDUCE_CANDIDATE CLOSE_POSITION REDUCE_CANDIDATE
|
||
|
||
D REDUCE_CANDIDATE REDUCE_CANDIDATE CLOSE_POSITION CLOSE_POSITION REDUCE_CANDIDATE
|
||
|
||
'
|
||
output:
|
||
field: composite_verdict
|
||
unit: enum [PRIME_CANDIDATE, WATCH_CANDIDATE, REDUCE_CANDIDATE, EXIT_REVIEW,
|
||
CLOSE_POSITION]
|
||
action_guidance:
|
||
PRIME_CANDIDATE: 코어 유지·추가. RAG_V1 PASS 시 위성 추가 허용.
|
||
WATCH_CANDIDATE: 현재 비중 유지. 추가매수 보류.
|
||
REDUCE_CANDIDATE: 분할 축소. 5% 이상 비중이면 TRIM 실행.
|
||
EXIT_REVIEW: 다음 반등 시 전량 매도 준비.
|
||
CLOSE_POSITION: 즉시 정리. calcFinalDecision_ SELL 강제 검토.
|
||
missing_policy:
|
||
ss001_grade: composite_verdict = WATCH_CANDIDATE (보수적)
|
||
rs_verdict: UNKNOWN 컬럼으로 처리
|
||
ground_truth: harness
|
||
llm_allowed: cite_only
|
||
prohibition:
|
||
- composite_verdict = CLOSE_POSITION인 종목을 LLM이 'HOLD도 무방'으로 서술 금지
|
||
- composite_verdict 없이 종목 정리 우선순위 결정 금지
|
||
canonical_ref: spec/13_formula_registry.yaml:RS_VERDICT_V1
|
||
version: 2026-05-21_CLA_HARNESS_V1
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- ss001_grade
|
||
- rs_verdict
|
||
output_fields:
|
||
- composite_verdict
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
BENCHMARK_RELATIVE_TIMESERIES_V1:
|
||
purpose: '종목을 KOSPI 기준 시계열로 평가해 초과낙폭, 반등 회복률, 하락장 베타, RS선 기울기와 brt_verdict를 결정론적으로
|
||
산출한다. LLM은 값 인용만 가능하다.
|
||
|
||
'
|
||
applicable: _addTickerGates_에서 RS_VERDICT_V2 이전 실행. 과거 가격 배열이 없으면 RET20/RET60
|
||
기반 프록시임을 method에 남긴다.
|
||
inputs:
|
||
- field: price.ret5D
|
||
unit: pct
|
||
- field: price.ret20D
|
||
unit: pct
|
||
- field: price.ret60D
|
||
unit: pct
|
||
- field: price.close
|
||
unit: KRW_per_share
|
||
- field: high52w
|
||
unit: KRW_per_share
|
||
optional: true
|
||
- field: globalKospiRet5D_
|
||
unit: pct
|
||
- field: globalKospiRet20D_
|
||
unit: pct
|
||
- field: globalKospiRet60D_
|
||
unit: pct
|
||
- field: globalKospiDrawdown_
|
||
unit: pct
|
||
derived:
|
||
stock_drawdown_from_high_pct: if high52W>0 then max(0,(1-close/high52W)*100)
|
||
else null
|
||
excess_drawdown_pctp: stock_drawdown_from_high_pct - globalKospiDrawdown_
|
||
recovery_ratio_5d: price.ret5D / globalKospiRet5D_ if globalKospiRet5D_ > 0
|
||
else null
|
||
recovery_ratio_20d: price.ret20D / globalKospiRet20D_ if globalKospiRet20D_
|
||
> 0 else null
|
||
downside_beta: price.ret20D / globalKospiRet20D_ if globalKospiRet20D_ < 0 else
|
||
null
|
||
rs_ratio_5d: price.ret5D / globalKospiRet5D_ if globalKospiRet5D_ != 0 else
|
||
null
|
||
rs_ratio_20d: price.ret20D / globalKospiRet20D_ if globalKospiRet20D_ != 0 else
|
||
null
|
||
rs_ratio_60d: price.ret60D / globalKospiRet60D_ if globalKospiRet60D_ != 0 else
|
||
null
|
||
rs_line_20d_slope: (rs_ratio_20d - rs_ratio_5d) / 15 if both available else
|
||
(ret20D - k20) / 20
|
||
rs_line_60d_slope: (rs_ratio_60d - rs_ratio_20d) / 40 if both available else
|
||
(ret60D - k60) / 60
|
||
brt_method: RS_RATIO_MULTI_WINDOW_PROXY if rs_ratio_5d and rs_ratio_20d available
|
||
else PROXY_FROM_RET20_RET60
|
||
verdict_table:
|
||
LEADER: excess_drawdown_pctp <= 0 AND recovery_ratio_20d >= 1.20 AND rs_line_20d_slope
|
||
> 0
|
||
MARKET: excess_drawdown_pctp between -5 and 5 AND recovery_ratio_20d between
|
||
0.80 and 1.20
|
||
LAGGARD: excess_drawdown_pctp >= 5 OR recovery_ratio_20d < 0.80 OR rs_line_20d_slope
|
||
< 0
|
||
BROKEN: excess_drawdown_pctp >= 10 AND (recovery_ratio_20d < 0.50 OR rs_line_60d_slope
|
||
< 0)
|
||
output:
|
||
fields:
|
||
- stock_drawdown_from_high_pct
|
||
- excess_drawdown_pctp
|
||
- recovery_ratio_5d
|
||
- recovery_ratio_20d
|
||
- downside_beta
|
||
- rs_ratio_5d
|
||
- rs_ratio_20d
|
||
- rs_ratio_60d
|
||
- rs_line_20d_slope
|
||
- rs_line_60d_slope
|
||
- brt_verdict
|
||
- brt_method
|
||
missing_policy: 필수 KOSPI 또는 종목 수익률 누락 시 brt_verdict=UNKNOWN, LLM 대체 계산 금지.
|
||
ground_truth: harness
|
||
llm_allowed: cite_only
|
||
prohibition:
|
||
- LLM이 excess_drawdown/recovery_ratio/downside_beta/rs_slope를 직접 계산 금지
|
||
- brt_verdict=BROKEN 종목을 낙폭과대 매수 기회로 서술 금지
|
||
version: 2026-05-21_BRT_V1_C2
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- price.ret5D
|
||
- price.ret20D
|
||
- price.ret60D
|
||
- price.close
|
||
- high52w
|
||
- globalKospiRet5D_
|
||
- globalKospiRet20D_
|
||
- globalKospiRet60D_
|
||
- globalKospiDrawdown_
|
||
output_fields: []
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
RS_VERDICT_V2:
|
||
purpose: RS_VERDICT_V1과 BENCHMARK_RELATIVE_TIMESERIES_V1의 brt_verdict를 보수적으로 융합한다.
|
||
applicable: BRT_V1 직후. 기존 rs_verdict 필드명은 최종 V2 결과로 유지하고 rs_verdict_v1_raw를 감사용
|
||
보존.
|
||
inputs:
|
||
- field: rs_verdict_v1_raw
|
||
unit: enum
|
||
- field: brt_verdict
|
||
unit: enum [LEADER,MARKET,LAGGARD,BROKEN,UNKNOWN]
|
||
fusion_logic:
|
||
BROKEN: rs_verdict_v1_raw=BROKEN OR brt_verdict=BROKEN
|
||
LAGGARD: rs_verdict_v1_raw=LAGGARD OR brt_verdict=LAGGARD, 단 BROKEN 아님
|
||
LEADER: rs_verdict_v1_raw=LEADER AND brt_verdict=LEADER
|
||
MARKET: 그 외
|
||
special_cases:
|
||
- brt_verdict=LEADER AND rs_verdict_v1_raw=LAGGARD -> MARKET
|
||
- brt_verdict=BROKEN AND rs_verdict_v1_raw=LEADER -> LAGGARD
|
||
output:
|
||
field: rs_verdict
|
||
additional_fields:
|
||
- rs_verdict_v1_raw
|
||
- rs_verdict_source
|
||
ground_truth: harness
|
||
llm_allowed: cite_only
|
||
version: 2026-05-21_RS_VERDICT_V2
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- rs_verdict_v1_raw
|
||
- brt_verdict
|
||
output_fields:
|
||
- rs_verdict
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
SATELLITE_AGGREGATE_PNL_GATE_V1:
|
||
purpose: 위성 합산 평가손익이 코어 수익을 잠식하는 정도를 추적해 위성 전략 실패를 감지한다.
|
||
inputs:
|
||
- field: position_class
|
||
unit: enum [core,satellite]
|
||
- field: profit_loss
|
||
unit: KRW
|
||
computed:
|
||
core_total_pnl_krw: sum(profit_loss for core)
|
||
satellite_total_pnl_krw: sum(profit_loss for satellite)
|
||
satellite_loss_to_core_gain_ratio: abs(min(0,satellite_total_pnl_krw)) / max(core_total_pnl_krw,1)
|
||
gates:
|
||
PASS: ratio < 0.25
|
||
SAPG_ALERT: 0.25 <= ratio < 0.50
|
||
SAPG_CRITICAL: ratio >= 0.50
|
||
output:
|
||
field: sapg_status
|
||
additional_fields:
|
||
- core_total_pnl_krw
|
||
- satellite_total_pnl_krw
|
||
- satellite_loss_to_core_gain_ratio
|
||
ground_truth: harness
|
||
llm_allowed: cite_only
|
||
version: 2026-05-21_SAPG_V1
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- position_class
|
||
- profit_loss
|
||
output_fields:
|
||
- sapg_status
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
HARNESS_DATA_FRESHNESS_GATE_V1:
|
||
purpose: 'harness_context 주요 입력 데이터의 영업일 기준 신선도를 검증한다. 신선도 부족 시 BRT/SAPG/SAQG
|
||
결과의 신뢰도 등급을 자동 하향하고 STALE_BLOCK 상태에서 HTS 주문표 생성을 차단한다.
|
||
|
||
'
|
||
applicable: buildHarnessContext_ 가장 먼저 실행 (모든 공식 선행).
|
||
inputs:
|
||
- field: metadata.generated_at
|
||
unit: datetime
|
||
- field: metadata.market_date
|
||
unit: date
|
||
- field: today_date
|
||
unit: date
|
||
computed:
|
||
data_age_business_days: business_days_diff(today_date, metadata.market_date)
|
||
freshness_status:
|
||
FRESH:
|
||
condition: data_age_business_days <= 1
|
||
note: 정상
|
||
STALE_1D:
|
||
condition: data_age_business_days == 2
|
||
harness_impact: brt_method에 STALE_1D 태그
|
||
STALE_WARN:
|
||
condition: data_age_business_days IN [3,4]
|
||
harness_impact: brt_verdict LOW, ELIGIBLE -> WATCHLIST_ONLY
|
||
STALE_BLOCK:
|
||
condition: data_age_business_days >= 5
|
||
harness_impact: brt_verdict=DATA_STALE_BLOCKED, HTS 주문표 생성 금지
|
||
output:
|
||
field: data_freshness_status
|
||
additional_fields:
|
||
- data_age_business_days
|
||
- freshness_degraded_gates
|
||
ground_truth: harness
|
||
llm_allowed: cite_only
|
||
prohibition:
|
||
- STALE_BLOCK 상태에서 BRT 결과로 주문 생성 금지
|
||
- LLM이 신선도를 임의 판단하거나 사용 가능으로 완화 금지
|
||
version: 2026-05-21_HDFG_V1
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- metadata.generated_at
|
||
- metadata.market_date
|
||
- today_date
|
||
output_fields:
|
||
- data_freshness_status
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
INTRADAY_ACTION_MATRIX_V1:
|
||
purpose: '장중 시각(capture_time)에 따라 허용·금지 액션을 테이블로 고정한다. 09:31 캡처임에도 전체 주간 전략 출력(E4
|
||
오류) 재발 방지.
|
||
|
||
'
|
||
applicable: DETERMINISTIC_ROUTING_ENGINE_V1 STAGE 1. capture_time 확정 직후.
|
||
inputs:
|
||
- field: capture_time
|
||
unit: HH:MM
|
||
note: account_snapshot에서 자동 추출
|
||
- field: market_date
|
||
unit: date
|
||
time_slot_table:
|
||
09:00-09:30:
|
||
label: OPEN_AUCTION
|
||
allowed_actions:
|
||
- WATCH_ONLY
|
||
blocked_actions:
|
||
- BUY
|
||
- SELL
|
||
- TRIM
|
||
09:30-10:30:
|
||
label: EARLY_SESSION
|
||
allowed_actions:
|
||
- TRIM_ONLY
|
||
blocked_actions:
|
||
- BUY
|
||
- SELL_ALL
|
||
note: OVERSOLD_REBOUND_SELL 제외
|
||
10:30-14:00:
|
||
label: MID_SESSION
|
||
allowed_actions:
|
||
- TRIM
|
||
- STAGED_SELL
|
||
- WATCH
|
||
blocked_actions:
|
||
- BUY_NEW
|
||
- SELL_ALL
|
||
14:00-15:00:
|
||
label: LATE_SESSION
|
||
allowed_actions:
|
||
- TRIM
|
||
- STAGED_SELL
|
||
blocked_actions:
|
||
- BUY_NEW
|
||
- SELL_ALL
|
||
15:00-15:20:
|
||
label: PRE_CLOSE
|
||
allowed_actions:
|
||
- TRIM_ONLY
|
||
blocked_actions:
|
||
- BUY
|
||
- SELL_ALL
|
||
15:20-15:30:
|
||
label: CLOSE_VERIFY
|
||
allowed_actions:
|
||
- ALL_ACTIONS_ALLOWED
|
||
blocked_actions: []
|
||
note: 종가 근처 재검증 후 실행. 모든 액션 허용.
|
||
15:30+:
|
||
label: POST_MARKET
|
||
allowed_actions:
|
||
- REBALANCING_REVIEW
|
||
- NEXT_DAY_PLAYBOOK
|
||
blocked_actions:
|
||
- HTS_IMMEDIATE_EXECUTION
|
||
BEFORE_MARKET:
|
||
label: PRE_MARKET
|
||
allowed_actions:
|
||
- PLAYBOOK_DRAFT
|
||
blocked_actions:
|
||
- HTS_IMMEDIATE_EXECUTION
|
||
output:
|
||
fields:
|
||
- field: time_slot_label
|
||
unit: enum
|
||
- field: allowed_intraday_actions
|
||
unit: list
|
||
- field: blocked_intraday_actions
|
||
unit: list
|
||
ground_truth: harness
|
||
llm_allowed: cite_only
|
||
prohibition:
|
||
- allowed_intraday_actions[]에 없는 주문 유형을 보고서에 생성 금지
|
||
- 09:00-10:30 캡처 시 BUY/SELL_ALL 주문표 생성 금지
|
||
- TRIM_ONLY 구간에서 주간 전략·종가 예측 등 전체 보고서 출력 금지 — 해당 섹션은 '15:20 재실행 예정' 표기
|
||
canonical_ref: AGENTS.md:Direction A3, Direction 0(장중 제약)
|
||
version: 2026-05-22_3RD_HARNESS
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- capture_time
|
||
- market_date
|
||
output_fields: []
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
ANTI_CHASING_VELOCITY_V1:
|
||
purpose: '가격 상승 속도가 국면별 임계값 초과 시 BUY를 결정론적으로 차단한다. N2(거래량 확인)만으로는 막지 못하는 속도 기반
|
||
뒷박 매수 원천 차단.
|
||
|
||
'
|
||
applicable: _addTickerGates_ 내 alpha_lead_score 산출 직후.
|
||
inputs:
|
||
- field: close
|
||
unit: KRW_per_share
|
||
- field: close_1d_ago
|
||
unit: KRW_per_share
|
||
- field: close_5d_ago
|
||
unit: KRW_per_share
|
||
- field: market_regime
|
||
unit: enum
|
||
computed:
|
||
velocity_1d: (close - close_1d_ago) / close_1d_ago * 100
|
||
velocity_5d: (close - close_5d_ago) / close_5d_ago * 100
|
||
thresholds_by_regime:
|
||
EVENT_SHOCK:
|
||
v1d_max: 2
|
||
v5d_max: 5
|
||
verdict: BLOCK_CHASE_SHOCK
|
||
RISK_OFF:
|
||
v1d_max: 3
|
||
v5d_max: 7
|
||
verdict: BLOCK_CHASE_RISKOFF
|
||
NEUTRAL:
|
||
v1d_max: 4
|
||
v5d_max: 9
|
||
verdict: WARN_CHASE_NEUTRAL
|
||
RISK_ON:
|
||
v1d_max: 5
|
||
v5d_max: 12
|
||
verdict: WARN_CHASE_RISKON
|
||
CLA:
|
||
v1d_max: 6
|
||
v5d_max: 15
|
||
verdict: WARN_CHASE_CLA
|
||
actions:
|
||
BLOCK_CHASE: BUY 금지. alpha_lead_score에 -15 페널티 적용.
|
||
WARN_CHASE: BUY 주문표에 '속도 추격 경고 — 풀백 대기 권고' 표기.
|
||
CLEAR: 정상. 속도 기반 차단 없음.
|
||
output:
|
||
field: anti_chasing_velocity_status
|
||
values:
|
||
- BLOCK_CHASE_SHOCK
|
||
- BLOCK_CHASE_RISKOFF
|
||
- WARN_CHASE_NEUTRAL
|
||
- WARN_CHASE_RISKON
|
||
- WARN_CHASE_CLA
|
||
- CLEAR
|
||
additional_fields:
|
||
- velocity_1d
|
||
- velocity_5d
|
||
- velocity_penalty_applied
|
||
ground_truth: harness
|
||
llm_allowed: cite_only
|
||
prohibition:
|
||
- BLOCK_CHASE 상태에서 '분위기 좋으니 추격 매수 괜찮다' 우회 서술 금지
|
||
- LLM이 velocity 직접 계산 금지 — 하네스 산출값만 인용
|
||
canonical_ref: AGENTS.md:Direction B1
|
||
version: 2026-05-22_3RD_HARNESS
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- close
|
||
- close_1d_ago
|
||
- close_5d_ago
|
||
- market_regime
|
||
output_fields:
|
||
- anti_chasing_velocity_status
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
DETERMINISTIC_ROUTING_ENGINE_V1:
|
||
purpose: '"LLM이 먼저 판단 → 하네스가 검증" 구조를 역전. 9단계 라우팅을 고정 순서로 실행하고 LLM은 최종 결과의 보고관으로만
|
||
동작. 라우팅 단계 건너뜀 및 순서 변경 절대 금지.
|
||
|
||
'
|
||
applicable: 모든 분석 보고서 생성 최선행. STAGE 0부터 순서대로 실행.
|
||
inputs:
|
||
- field: harness_context
|
||
unit: json
|
||
note: 전체 하네스 컨텍스트 — 모든 STAGE 결과 포함
|
||
output:
|
||
field: routing_execution_log
|
||
schema:
|
||
- stage: int
|
||
status: PASS|BLOCKED|SKIPPED
|
||
output_key: string
|
||
elapsed_ms: int
|
||
routing_stages:
|
||
STAGE_0:
|
||
name: HARNESS_DATA_FRESHNESS_GATE_V1
|
||
action: STALE_BLOCK → 즉시 중단. 보고서 생성 금지. 데이터 갱신 요청만 출력.
|
||
STAGE_1:
|
||
name: INTRADAY_ACTION_MATRIX_V1
|
||
action: capture_time 기반 허용·금지 액션 테이블 확정. TRIM_ONLY 구간이면 간소화 모드.
|
||
STAGE_2:
|
||
name: PORTFOLIO_HEALTH_SCORE_V1
|
||
action: CRITICAL → 긴급 섹션 필수 출력 후 진행.
|
||
STAGE_3:
|
||
name: RISK_GATE_CHECKLIST (10개 순서 고정)
|
||
gates:
|
||
- cash_floor_status
|
||
- heat_gate_status
|
||
- drawdown_guard_state
|
||
- portfolio_drawdown_gate
|
||
- portfolio_beta_gate+PORTFOLIO_CORRELATION_GATE
|
||
- sector_concentration_gate
|
||
- semiconductor_cluster_gate
|
||
- position_count_gate
|
||
- win_loss_streak_state
|
||
- single_position_weight_gate
|
||
action: BLOCK 있으면 blocked_actions[] 업데이트.
|
||
STAGE_4:
|
||
name: SELL_GATE_CHECKLIST (5개)
|
||
gates:
|
||
- stop_breach_gate
|
||
- tp_trigger_gate
|
||
- DISTRIBUTION_SELL_DETECTOR_V1
|
||
- heat_concentration_gate
|
||
- regime_transition_type
|
||
action: sell_priority_decision_table 생성 (독립 표 필수).
|
||
STAGE_5:
|
||
name: CASH_RECOVERY (OPTIMIZER + WATERFALL)
|
||
action: CASH_RECOVERY_OPTIMIZER_V1 → SELL_WATERFALL_ENGINE_V1 → SELL_PRICE_SANITY_V1.
|
||
STAGE_6:
|
||
name: BUY_SCREENING (6개 순서 고정)
|
||
gates:
|
||
- ANTI_CHASING_VELOCITY_V1
|
||
- PULLBACK_ENTRY_TRIGGER_V1
|
||
- N2_VOLUME_BREAKOUT
|
||
- K1_TRANCHE
|
||
- RAG+SFG+SATELLITE_LIFECYCLE
|
||
- SECTOR_ROTATION+PRE_DISTRIBUTION
|
||
action: buy_candidates_json 확정.
|
||
STAGE_7:
|
||
name: QUANTITY_FINALIZATION
|
||
action: ATR20 기반 atr_qty → regime_size_scale × drawdown_buy_scale → TP_QUANTITY_LADDER
|
||
→ SELL_PRICE_SANITY 재검증.
|
||
STAGE_8:
|
||
name: SHADOW_LEDGER_SEPARATION
|
||
action: PASS → HTS 주문표. 비PASS → Shadow Ledger (I4 컬럼명 규칙).
|
||
STAGE_9:
|
||
name: REPORT_ASSEMBLY (LLM)
|
||
action: 하네스 결과를 정해진 양식으로 서술. 숫자 1원·1주 변경 금지. LLM_SERVING_CONSTRAINT_V1 적용.
|
||
ground_truth: harness
|
||
llm_allowed: STAGE_9 보고서 작성만 허용
|
||
prohibition:
|
||
- STAGE 건너뜀 금지
|
||
- STAGE_0 STALE_BLOCK 시 전체 보고서 생성 금지
|
||
- STAGE_9에서 LLM이 숫자 변경 금지 — 보고관(Clerk)으로만 동작
|
||
canonical_ref: AGENTS.md:Direction D1, Direction Q(QEH)
|
||
version: 2026-05-22_3RD_HARNESS
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- harness_context
|
||
output_fields:
|
||
- routing_execution_log
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
LLM_SERVING_CONSTRAINT_V1:
|
||
purpose: 'LLM이 보고서 작성 시 침범 금지 영역 8개를 명시적으로 잠금. HS011 확장판. 30년 실전 전문가의 정밀도는 자유로운
|
||
해석이 아닌 규칙 준수에서 나온다.
|
||
|
||
'
|
||
applicable: DETERMINISTIC_ROUTING_ENGINE_V1 STAGE_9 진입 직전 검사.
|
||
inputs:
|
||
- field: harness_context
|
||
unit: json
|
||
note: LLM 보고서 생성 전 전체 컨텍스트 검사
|
||
output:
|
||
field: serving_constraint_check
|
||
schema:
|
||
violations_detected: list [FB_code]
|
||
allowed_actions_taken: list [AL_code]
|
||
forbidden_actions:
|
||
FB1: 가격·수량 즉석 계산 → DATA_MISSING 표기만 허용 (HS011)
|
||
FB2: 하네스 판정 '이번만 예외' 번복
|
||
FB3: '''분위기가 좋으니'' 류 감성 서술로 BLOCK 우회'
|
||
FB4: rule_id 없는 판단 서술 (근거 공식 ID 없이 결론 금지)
|
||
FB5: 매수와 매도를 같은 문단에 연결 서술 (BRT3 재투자 연결 금지)
|
||
FB6: 목표 달성률 압박으로 리스크 게이트 완화 서술 (M4 압박 금지)
|
||
FB7: 외부 웹 데이터로 prices_json 덮어쓰기 (G3 외부 격리)
|
||
FB8: 손절가·익절가 null인 종목에 '보유 유지' 단독 서술
|
||
allowed_roles:
|
||
AL1: 하네스 결과의 '왜 이 점수인가?' 배경 설명
|
||
AL2: 뉴스·이벤트·섹터 흐름 질적 리스크 합성
|
||
AL3: '''만약 반도체가 추가 하락하면...'' 시나리오 제시'
|
||
AL4: N4 HOLDING_STALE_REVIEW 연동 보유 근거 재확인
|
||
ground_truth: harness
|
||
llm_allowed: cite_only
|
||
prohibition:
|
||
- 8개 금지 영역은 어떤 조건에서도 침범 불가
|
||
- '위반 항목은 ''[LLM_SERVING_CONSTRAINT: FB{N} 위반]''으로 보고서에 표시'
|
||
canonical_ref: AGENTS.md:Direction D2, Direction Q(QEH), HS011
|
||
version: 2026-05-22_3RD_HARNESS
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- harness_context
|
||
output_fields:
|
||
- serving_constraint_check
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
HORIZON_ALLOCATION_LOCK_V1:
|
||
purpose: 단기/중기/장기 투자 버킷별 비중 상한을 적용해 기간 혼재와 과집중을 차단.
|
||
inputs:
|
||
- field: invest_horizon
|
||
unit: enum
|
||
optional: true
|
||
- field: market_value_krw
|
||
unit: KRW
|
||
optional: true
|
||
- field: total_asset_krw
|
||
unit: KRW
|
||
output:
|
||
field: horizon_allocation_json
|
||
llm_allowed: cite_only
|
||
version: 2026-05-25_PROPOSAL53
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- invest_horizon
|
||
- market_value_krw
|
||
- total_asset_krw
|
||
output_fields:
|
||
- horizon_allocation_json
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
FUNDAMENTAL_MULTI_FACTOR_SCORE_V2:
|
||
purpose: 이익률/성장률/점유율/현금흐름/부채를 종합 점수화해 매수 허용을 잠금.
|
||
inputs:
|
||
- field: roe_pct
|
||
unit: percent
|
||
optional: true
|
||
- field: opm_pct
|
||
unit: percent
|
||
optional: true
|
||
- field: revenue_growth_pct
|
||
unit: percent
|
||
optional: true
|
||
- field: op_income_growth_pct
|
||
unit: percent
|
||
optional: true
|
||
- field: market_share_proxy_pct
|
||
unit: percent
|
||
optional: true
|
||
- field: operating_cf_krw
|
||
unit: KRW
|
||
optional: true
|
||
- field: free_cf_krw
|
||
unit: KRW
|
||
optional: true
|
||
- field: debt_ratio_pct
|
||
unit: percent
|
||
optional: true
|
||
output:
|
||
field: fundamental_multifactor_json
|
||
llm_allowed: cite_only
|
||
version: 2026-05-25_PROPOSAL54
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- roe_pct
|
||
- opm_pct
|
||
- revenue_growth_pct
|
||
- op_income_growth_pct
|
||
- market_share_proxy_pct
|
||
- operating_cf_krw
|
||
- free_cf_krw
|
||
- debt_ratio_pct
|
||
output_fields:
|
||
- fundamental_multifactor_json
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
MARKET_SHARE_MOMENTUM_PROXY_V1:
|
||
purpose: 상대 성장/RS 기반 점유율 모멘텀 프록시를 산출해 공격 매수 여부를 잠금.
|
||
inputs:
|
||
- field: revenue_growth_pct
|
||
unit: percent
|
||
optional: true
|
||
- field: alpha_lead_score
|
||
unit: score
|
||
optional: true
|
||
output:
|
||
field: market_share_proxy_json
|
||
llm_allowed: cite_only
|
||
version: 2026-05-25_PROPOSAL54
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- revenue_growth_pct
|
||
- alpha_lead_score
|
||
output_fields:
|
||
- market_share_proxy_json
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
ROUTING_EXECUTION_LOG_TABLE_V1:
|
||
purpose: 'DETERMINISTIC_ROUTING_ENGINE_V1 11단계(①CV-V2사전검증 ②데이터신선도 ③장중판별 ④포트폴리오상태
|
||
⑤거시이벤트동기화 ⑥선제매도레이더 ⑦매수타이밍게이트 ⑧매도우선순위/현금확보 ⑨RS/위성품질 ⑩가격정규화/검증 ⑪LLM서빙)의 실행 로그를
|
||
표로 강제 출력한다. GAS 미보고 단계는 결정론 fallback으로 보강. 누락 단계 > 0이면 INCOMPLETE_ROUTING_LOG.
|
||
|
||
'
|
||
inputs:
|
||
- field: routing_execution_log
|
||
unit: json
|
||
- field: _harness_context
|
||
unit: json
|
||
output:
|
||
field: routing_execution_log_v1_json
|
||
expected_outputs:
|
||
- gate
|
||
- stage_coverage_pct
|
||
- request_route
|
||
llm_allowed: cite_only
|
||
version: 2026-05-27_PHASE1
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- routing_execution_log
|
||
- _harness_context
|
||
output_fields:
|
||
- routing_execution_log_v1_json
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
FUNDAMENTAL_RAW_INGEST_V1:
|
||
purpose: 'data_feed(Forward_PE/PBR/EPS)와 네이버 금융 fallback을 통해 보유 종목의 펀더멘털 raw 지표를
|
||
수집하고 fundamental_raw_v1.json을 생성한다.
|
||
|
||
'
|
||
output:
|
||
field: fundamental_raw_v1_json
|
||
expected_outputs:
|
||
- gate
|
||
- coverage_pct
|
||
- non_etf_count
|
||
llm_allowed: cite_only
|
||
version: 2026-05-27_PHASE2
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields: []
|
||
output_fields:
|
||
- fundamental_raw_v1_json
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
FUNDAMENTAL_MULTIFACTOR_V3:
|
||
purpose: 'ROE(25) + OPM(20) + OCF(15) + FCF(15) + Debt(10) + Valuation(15) = 100점
|
||
6요소 결정론 공식으로 종목별 펀더멘털 등급을 산출한다. ETF는 별도 분류, 데이터 부족 시 보유 필드 기준 정규화 적용.
|
||
|
||
'
|
||
output:
|
||
field: fundamental_multifactor_v3_json
|
||
expected_outputs:
|
||
- gate
|
||
- grade_diverse
|
||
- non_etf_count
|
||
llm_allowed: cite_only
|
||
version: 2026-05-27_PHASE2
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields: []
|
||
output_fields:
|
||
- fundamental_multifactor_v3_json
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
HORIZON_CLASSIFICATION_V1:
|
||
purpose: '펀더멘털 등급 + 이격도 + ATR% + RSI14 기반으로 종목별 투자 기간을 분류한다. LONG/MID/SHORT/ETF/UNKNOWN
|
||
결정론 트리. HORIZON_ALLOCATION_LOCK_V1에 주입.
|
||
|
||
'
|
||
output:
|
||
field: horizon_classification_v1_json
|
||
expected_outputs:
|
||
- gate
|
||
- classified_pct
|
||
- allocation_pct
|
||
llm_allowed: cite_only
|
||
version: 2026-05-27_PHASE2
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields: []
|
||
output_fields:
|
||
- horizon_classification_v1_json
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
SMART_MONEY_FLOW_SIGNAL_V2:
|
||
purpose: 'Frg_5D/20D + Inst_5D/20D 백분위 기반으로 종목별 스마트머니 흐름을 산출한다. STRONG_INFLOW
|
||
/ INFLOW / NEUTRAL / OUTFLOW / STRONG_OUTFLOW 라벨 분산 강제.
|
||
|
||
'
|
||
output:
|
||
field: smart_money_flow_signal_v2_json
|
||
expected_outputs:
|
||
- gate
|
||
- label_diversity
|
||
- coefficient_of_variation
|
||
llm_allowed: cite_only
|
||
version: 2026-05-27_PHASE3
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields: []
|
||
output_fields:
|
||
- smart_money_flow_signal_v2_json
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
GROWTH_RATE_SIGNAL_V1:
|
||
purpose: 'EPS YoY / 매출 YoY 기반 성장률 시그널을 결정론적으로 산출한다. HYPER_GROWTH/GROWTH/FLAT/DECLINE/DATA_MISSING
|
||
라벨과 단/중/장기 horizon 적합도를 포함한다.
|
||
|
||
'
|
||
output:
|
||
field: growth_rate_signal_v1_json
|
||
expected_outputs:
|
||
- gate
|
||
- label_counts
|
||
- data_missing_pct
|
||
llm_allowed: cite_only
|
||
version: 2026-05-27_PHASE2B
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields: []
|
||
output_fields:
|
||
- growth_rate_signal_v1_json
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
MARKET_SHARE_SIGNAL_V2:
|
||
purpose: '실매출 점유율 데이터 없는 환경에서 AvgTradeValue_20D_M 백분위 + 외인/기관 수급 + 20일 모멘텀 3중
|
||
프록시로 GAINING/STABLE/LOSING/NO_PEER_DATA를 산출한다. confidence는 항상 LOW(proxy 기반).
|
||
실데이터 확보 시 HIGH confidence로 업그레이드 예정.
|
||
|
||
'
|
||
output:
|
||
field: market_share_signal_v2_json
|
||
expected_outputs:
|
||
- gate
|
||
- unique_states
|
||
- non_etf_scored_count
|
||
llm_allowed: cite_only
|
||
version: 2026-05-27_PHASE2B
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields: []
|
||
output_fields:
|
||
- market_share_signal_v2_json
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
PREDICTION_ACCURACY_HARNESS_V2:
|
||
purpose: '운영 T+1/T+5/T+20 일치율을 90/30/7일 회전 윈도로 산출. calibration_state: CALIBRATED/MONITOR/PAE_CALIBRATION_REQUIRED/BUY_PROPOSAL_FROZEN_RECOMMEND.
|
||
|
||
'
|
||
output:
|
||
file: Temp/prediction_accuracy_harness_v2.json
|
||
expected_outputs:
|
||
- calibration_state
|
||
- t5_op_rate
|
||
- t5_sample
|
||
- window_90d_rate
|
||
llm_allowed: cite_only
|
||
version: 2026-05-28_PHASE4
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields: []
|
||
output_fields: []
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
VELOCITY_V1:
|
||
purpose: '1일/5일 가격 속도를 계산해 뒷박 추격 차단과 풀백 트리거의 입력으로 공급한다.
|
||
|
||
'
|
||
inputs:
|
||
- field: close_price
|
||
unit: KRW_per_share
|
||
- field: previous_close_price
|
||
unit: KRW_per_share
|
||
- field: ret5d
|
||
unit: percent
|
||
output:
|
||
field: velocity_1d
|
||
input_fields:
|
||
- close
|
||
- prevClose
|
||
- ret5d
|
||
expected_outputs:
|
||
- velocity_1d
|
||
- velocity_5d
|
||
llm_allowed: cite_only
|
||
version: 2026-05-30_PHASE8
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields:
|
||
- velocity_1d
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
PROFIT_LOCK_STAGE_V1:
|
||
purpose: '수익률 구간을 NORMAL/BREAKEVEN/PROFIT_LOCK/APEX 계열로 분류한다.
|
||
|
||
'
|
||
inputs:
|
||
- field: profit_pct
|
||
unit: percent
|
||
output:
|
||
field: profit_lock_stage
|
||
input_fields:
|
||
- profit_pct
|
||
expected_outputs:
|
||
- stage
|
||
llm_allowed: cite_only
|
||
version: 2026-05-30_PHASE8
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields:
|
||
- profit_lock_stage
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
SEMICONDUCTOR_CLUSTER_GATE_V1:
|
||
purpose: '반도체 클러스터 집중도와 국면별 차단/감축 여부를 판단한다.
|
||
|
||
'
|
||
inputs:
|
||
- field: semiconductor_cluster_json
|
||
unit: json
|
||
- field: market_regime
|
||
unit: enum
|
||
output:
|
||
field: semiconductor_cluster_gate
|
||
input_fields:
|
||
- combined_pct
|
||
- market_regime
|
||
expected_outputs:
|
||
- semiconductor_cluster_gate
|
||
- combined_pct
|
||
llm_allowed: cite_only
|
||
version: 2026-05-30_PHASE8
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields:
|
||
- semiconductor_cluster_gate
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
ANTI_WHIPSAW_GATE_V1:
|
||
purpose: '반등/조정 혼선 구간에서 설거지성 매수와 성급한 매도를 차단한다.
|
||
|
||
'
|
||
inputs:
|
||
- field: close_price
|
||
unit: KRW_per_share
|
||
- field: ma20
|
||
unit: KRW_per_share
|
||
- field: rsi14
|
||
unit: points
|
||
output:
|
||
field: anti_whipsaw_status
|
||
input_fields:
|
||
- close
|
||
- ma20
|
||
- rsi14
|
||
expected_outputs:
|
||
- anti_whipsaw_status
|
||
llm_allowed: cite_only
|
||
version: 2026-05-30_PHASE8
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields:
|
||
- anti_whipsaw_status
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
BREAKEVEN_RATCHET_V1:
|
||
purpose: '손익분기 이상 구간에서 손절선을 평단 이상으로 올리는 래칫을 산출한다.
|
||
|
||
'
|
||
inputs:
|
||
- field: average_cost
|
||
unit: KRW_per_share
|
||
- field: highest_price_since_entry
|
||
unit: KRW_per_share
|
||
output:
|
||
field: breakeven_stop_price
|
||
input_fields:
|
||
- average_cost
|
||
- highest_close
|
||
expected_outputs:
|
||
- breakeven_stop_price
|
||
llm_allowed: cite_only
|
||
version: 2026-05-30_PHASE8
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields:
|
||
- breakeven_stop_price
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
CAPITAL_STYLE_ALLOCATION_V1:
|
||
purpose: '투자성향별 자금 유동성/공격성 가중치와 conviction을 산출한다.
|
||
|
||
'
|
||
inputs:
|
||
- field: smart_money_flow_signal_v2_json
|
||
unit: json
|
||
- field: fundamental_multifactor_v3_json
|
||
unit: json
|
||
- field: macro_event_ticker_impact_v1_json
|
||
unit: json
|
||
- field: liquidity_flow_signal_v1_json
|
||
unit: json
|
||
output:
|
||
field: capital_style_conviction
|
||
input_fields:
|
||
- investor_style
|
||
- liquidity_profile
|
||
expected_outputs:
|
||
- capital_style_conviction
|
||
- capital_style_label
|
||
llm_allowed: cite_only
|
||
version: 2026-05-30_PHASE8
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields:
|
||
- capital_style_conviction
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
ARTIFACT_FRESHNESS_GATE_V1:
|
||
purpose: '하네스 산출물의 타임스탬프를 검증해 신선도 게이트를 산출한다.
|
||
|
||
'
|
||
input_fields:
|
||
- artifact_timestamp
|
||
- max_age_hours
|
||
expected_outputs:
|
||
- freshness_gate
|
||
- stale_artifacts
|
||
llm_allowed: cite_only
|
||
version: 2026-06-03_ORPHAN_RECONCILE
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields: []
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
CANONICAL_ARTIFACT_RESOLVER_V1:
|
||
purpose: '동일 의미의 중복 산출물 중 유일 출처를 지정해 단일 진실원장을 고정한다.
|
||
|
||
'
|
||
input_fields:
|
||
- artifact_key
|
||
- candidate_paths
|
||
expected_outputs:
|
||
- canonical_path
|
||
- duplicate_artifacts
|
||
llm_allowed: cite_only
|
||
version: 2026-06-03_ORPHAN_RECONCILE
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields: []
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
COMPLETION_GAP_V1:
|
||
purpose: 'pass_100 기준 대비 미충족 항목과 격차를 정량화해 완료 갭 보고서를 산출한다.
|
||
|
||
'
|
||
input_fields:
|
||
- pass_100_criteria
|
||
- current_metrics
|
||
expected_outputs:
|
||
- completion_gap_score
|
||
- failed_criteria_list
|
||
llm_allowed: cite_only
|
||
version: 2026-06-03_ORPHAN_RECONCILE
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields: []
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
COMPREHENSIVE_PROPOSAL_V1:
|
||
purpose: '매수·매도·보유·현금확보 전 섹션을 통합한 종합 제안서를 생성한다.
|
||
|
||
'
|
||
input_fields:
|
||
- buy_proposals
|
||
- sell_proposals
|
||
- portfolio_state
|
||
expected_outputs:
|
||
- comprehensive_proposal
|
||
- proposal_id
|
||
llm_allowed: cite_only
|
||
version: 2026-06-03_ORPHAN_RECONCILE
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields: []
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
DATA_INTEGRITY_100_LOCK_V1:
|
||
purpose: '핵심 데이터 필드의 정합성을 검증해 100% 잠금 게이트를 산출한다 (V2로 대체됨).
|
||
|
||
'
|
||
input_fields:
|
||
- harness_context_fields
|
||
expected_outputs:
|
||
- data_integrity_gate
|
||
- integrity_violations
|
||
llm_allowed: cite_only
|
||
version: 2026-06-03_ORPHAN_RECONCILE
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields: []
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
DATA_INTEGRITY_100_LOCK_V2:
|
||
purpose: '전 섹션 수치 일관성·출처 추적 가능성을 검증해 데이터 무결성 잠금을 산출한다.
|
||
|
||
'
|
||
input_fields:
|
||
- report_sections
|
||
- source_paths
|
||
expected_outputs:
|
||
- data_integrity_score
|
||
- integrity_gate
|
||
llm_allowed: cite_only
|
||
version: 2026-06-03_ORPHAN_RECONCILE
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields: []
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
DATA_INTEGRITY_SCORE_V1:
|
||
purpose: '하네스 컨텍스트 전체의 데이터 무결성 점수를 산출한다.
|
||
|
||
'
|
||
input_fields:
|
||
- harness_context
|
||
expected_outputs:
|
||
- data_integrity_score_v1
|
||
llm_allowed: cite_only
|
||
version: 2026-06-03_ORPHAN_RECONCILE
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields: []
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
DATA_MATURITY_TRUTH_GATE_V1:
|
||
purpose: 'type_A(결정론)/type_B(표본 의존) 축을 분리해 진실성 기반 성숙도 게이트를 산출한다.
|
||
|
||
'
|
||
input_fields:
|
||
- type_a_metrics
|
||
- type_b_metrics
|
||
- sample_counts
|
||
expected_outputs:
|
||
- maturity_gate
|
||
- truthful_100_axes
|
||
- pending_evidence_axes
|
||
llm_allowed: cite_only
|
||
version: 2026-06-03_ORPHAN_RECONCILE
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields: []
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
DATA_MATURITY_TRUTH_GATE_VALIDATOR_V1:
|
||
purpose: 'DATA_MATURITY_TRUTH_GATE_V1 산출값의 형식·범위 유효성을 검증한다.
|
||
|
||
'
|
||
input_fields:
|
||
- maturity_gate_output
|
||
expected_outputs:
|
||
- validation_result
|
||
- validation_errors
|
||
llm_allowed: cite_only
|
||
version: 2026-06-03_ORPHAN_RECONCILE
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
output_fields: []
|
||
missing_policy: DATA_MISSING. 계산 결과를 추정하지 않는다.
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|
||
PROFIT_GIVEBACK_RATCHET_FACTOR_V1:
|
||
purpose: 수익금 보전 ATR 기반 동적 래칫 — 번 돈을 지키는 원칙 (Direction E1·L2·R4 확장)
|
||
agents_md_ref: Direction E1(APEX_SUPER), L2(ATR 트레일링), R4(전 보유종목 coverage)
|
||
inputs:
|
||
- field: prev_trail_stop
|
||
unit: KRW_per_share
|
||
- field: high_since_entry
|
||
unit: KRW_per_share
|
||
- field: atr20
|
||
unit: KRW_per_share
|
||
- field: market_regime
|
||
unit: enum
|
||
- field: profit_pct
|
||
unit: percent
|
||
expression: trail_stop = max(prev_trail_stop, high_since_entry - k * atr20)
|
||
components:
|
||
k_regime_map:
|
||
APEX_SUPER_ge_50pct: 1.0
|
||
APEX_TRAILING_ge_40pct: 1.5
|
||
PROFIT_LOCK_30_ge_30pct: 2.0
|
||
PROFIT_LOCK_20_ge_20pct: 2.0
|
||
PROFIT_LOCK_10_ge_10pct: 2.5
|
||
BREAKEVEN_RATCHET_ge_0pct: null
|
||
NORMAL_lt_0pct: null
|
||
calibration_status: EXPERT_PRIOR
|
||
output:
|
||
field: auto_trailing_stop
|
||
unit: KRW_per_share
|
||
gate:
|
||
coverage_check: ratchet_coverage_pct == 100 (Direction R4 CHECK_64)
|
||
fail_action: BLOCK 보고서 발행
|
||
missing_policy: atr20 미확인 시 BREAKEVEN_RATCHET(=avg_cost*1.00) 적용
|
||
implementation: tools/build_ratchet_trailing_general_v1.py:NF5
|
||
calibration_ref: spec/calibration_registry.yaml:NF5 k값 (EXPERT_PRIOR)
|
||
version: 2026-06-04_NF5
|
||
owner: quant_team
|
||
lifecycle_state: active
|
||
input_fields:
|
||
- prev_trail_stop
|
||
- high_since_entry
|
||
- atr20
|
||
- market_regime
|
||
- profit_pct
|
||
output_fields:
|
||
- auto_trailing_stop
|
||
golden_cases: []
|
||
activation_threshold:
|
||
min_t20_sample: 30
|
||
retirement_condition: performance_degradation
|