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>
270 lines
10 KiB
YAML
270 lines
10 KiB
YAML
schema_version: formula_lifecycle_registry.v1
|
|
updated_at: "2026-06-13"
|
|
purpose: >
|
|
모든 ACTIVE 공식의 lifecycle 상태를 단일 레지스트리로 관리한다.
|
|
spec/13_formula_registry.yaml(149개) + spec/13b_harness_formulas.yaml의 핵심 공식이
|
|
여기서 lifecycle_state를 갖는다. 새 공식 추가 시 반드시 이 파일에도 등록한다.
|
|
|
|
# ── 핵심 리스크/포지션 공식 ────────────────────────────────────────────────
|
|
formulas:
|
|
|
|
# --- 리스크 예산 / 열기 관리 ---
|
|
- formula_id: TOTAL_HEAT_V1
|
|
owner: risk_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-01"
|
|
retirement_condition: "Total_Heat 측정 방식 변경 시"
|
|
expected_metric: "total_heat_pct"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
- formula_id: RISK_BUDGET_CASCADE_V1
|
|
owner: risk_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-01"
|
|
retirement_condition: "리스크 예산 계층 구조 변경 시"
|
|
expected_metric: "risk_budget_remaining_krw"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
- formula_id: CASH_RATIOS_V1
|
|
owner: risk_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-01"
|
|
retirement_condition: "현금 비율 산출 방식 변경 시"
|
|
expected_metric: "current_cash_pct"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
- formula_id: TARGET_CASH_PCT_V1
|
|
owner: risk_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-01"
|
|
retirement_condition: "목표 현금 비율 공식 변경 시"
|
|
expected_metric: "target_cash_pct"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
# --- 포지션 사이징 ---
|
|
- formula_id: POSITION_SIZE_V1
|
|
owner: portfolio_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-01"
|
|
retirement_condition: "ATR 기반 사이징 방식 변경 시"
|
|
expected_metric: "final_qty"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
# --- 가격 산출 ---
|
|
- formula_id: STOP_PRICE_CORE_V1
|
|
owner: risk_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-01"
|
|
retirement_condition: "손절가 산출 공식 변경 시"
|
|
expected_metric: "stop_price_krw"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
- formula_id: TRAILING_STOP_PRICE_V1
|
|
owner: risk_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-15"
|
|
retirement_condition: "PROFIT_LOCK_RATCHET_V2 도입 시"
|
|
expected_metric: "trailing_stop_price"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
- formula_id: TAKE_PROFIT_LADDER_V1
|
|
owner: portfolio_manager
|
|
lifecycle_state: DEPRECATED
|
|
activation_date: "2026-04-01"
|
|
retirement_condition: "TAKE_PROFIT_LADDER_V2로 교체됨"
|
|
expected_metric: "tp1_price"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
note: "V2로 대체. 레거시 참조용으로만 유지."
|
|
|
|
- formula_id: TAKE_PROFIT_LADDER_V2
|
|
owner: portfolio_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-05-01"
|
|
retirement_condition: "익절 사다리 구조 변경 시"
|
|
expected_metric: "tp1_price, tp2_price"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
- formula_id: PROFIT_LOCK_RATCHET_V1
|
|
owner: portfolio_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-15"
|
|
retirement_condition: "수익보전 래칫 알고리즘 변경 시"
|
|
expected_metric: "profit_lock_stage"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
- formula_id: TICK_NORMALIZER_V1
|
|
owner: execution_engineer
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-01"
|
|
retirement_condition: "KRX 호가 단위 체계 변경 시"
|
|
expected_metric: "tick_normalized_price"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
# --- 매수 신호 ---
|
|
- formula_id: FLOW_CREDIT_V1
|
|
owner: quant_analyst
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-01"
|
|
retirement_condition: "수급 신호 체계 변경 시"
|
|
expected_metric: "flow_credit_score"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
- formula_id: MARKET_RISK_SCORE_V1
|
|
owner: macro_analyst
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-01"
|
|
retirement_condition: "시장 리스크 스코어링 방식 변경 시"
|
|
expected_metric: "market_risk_score"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
- formula_id: BREAKOUT_QUALITY_GATE_V2
|
|
owner: quant_analyst
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-05-01"
|
|
retirement_condition: "돌파 품질 게이트 V3 도입 시"
|
|
expected_metric: "breakout_quality_score"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
- formula_id: EXPECTED_EDGE_V1
|
|
owner: quant_analyst
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-15"
|
|
retirement_condition: "기대수익 공식 변경 시"
|
|
expected_metric: "expected_edge_pct"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
- formula_id: PEG_SCORE_V1
|
|
owner: fundamental_analyst
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-05-16"
|
|
retirement_condition: "코스닥 밸류에이션 게이트 체계 변경 시"
|
|
expected_metric: "peg_score"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
# --- 매도 우선순위 ---
|
|
- formula_id: SELL_PRIORITY_V1
|
|
owner: portfolio_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-01"
|
|
retirement_condition: "매도 우선순위 엔진 변경 시"
|
|
expected_metric: "sell_priority_score"
|
|
spec_ref: "spec/13_formula_registry.yaml"
|
|
|
|
# ── 하네스 공식 (spec/13b) ───────────────────────────────────────────────
|
|
|
|
- formula_id: TP_VALIDITY_CHECK_V1
|
|
owner: execution_engineer
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-05-18"
|
|
retirement_condition: "익절 유효성 체크 로직 변경 시"
|
|
expected_metric: "tp_validity_status"
|
|
spec_ref: "spec/13b_harness_formulas.yaml"
|
|
|
|
- formula_id: RELATIVE_STOP_SIGNAL_V1
|
|
owner: risk_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-06-06"
|
|
retirement_condition: "KOSPI 대비 초과수익 손절 방식 변경 시"
|
|
expected_metric: "relative_stop_gate"
|
|
spec_ref: "spec/13b_harness_formulas.yaml"
|
|
|
|
- formula_id: SMART_CASH_RAISE_V2
|
|
owner: risk_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-05-10"
|
|
retirement_condition: "현금 확보 알고리즘 V3 도입 시"
|
|
expected_metric: "smart_cash_raise_qty"
|
|
spec_ref: "spec/13b_harness_formulas.yaml"
|
|
|
|
- formula_id: ANTI_WHIPSAW_HOLD_GATE_V1
|
|
owner: quant_analyst
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-05-01"
|
|
retirement_condition: "휩소 방지 게이트 변경 시"
|
|
expected_metric: "anti_whipsaw_gate"
|
|
spec_ref: "spec/13b_harness_formulas.yaml"
|
|
|
|
- formula_id: SELL_WATERFALL_ENGINE_V2
|
|
owner: portfolio_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-05-28"
|
|
retirement_condition: "매도 폭포수 엔진 V3 도입 시"
|
|
expected_metric: "sell_waterfall_rows"
|
|
spec_ref: "spec/13b_harness_formulas.yaml"
|
|
|
|
- formula_id: IMPUTED_DATA_EXPOSURE_GATE_V1
|
|
owner: qa
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-05-31"
|
|
retirement_condition: "임퓨팅 데이터 노출 게이트 방식 변경 시"
|
|
expected_metric: "effective_confidence_honest"
|
|
spec_ref: "spec/13b_harness_formulas.yaml"
|
|
|
|
- formula_id: PORTFOLIO_BETA_V1
|
|
owner: risk_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-04-15"
|
|
retirement_condition: "포트폴리오 베타 계산 방식 변경 시"
|
|
expected_metric: "portfolio_beta"
|
|
spec_ref: "spec/13b_harness_formulas.yaml"
|
|
|
|
# ── 기존 3개 (유지) ────────────────────────────────────────────────────────
|
|
|
|
- formula_id: SMART_CASH_RECOVERY_V9
|
|
owner: risk_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-06-06"
|
|
retirement_condition: "drawdown > 15% or cash floor violation"
|
|
expected_metric: "cash_recovered_krw"
|
|
spec_ref: "spec/13b_harness_formulas.yaml"
|
|
|
|
- formula_id: FINAL_EXECUTION_DECISION_V4
|
|
owner: architect
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-06-06"
|
|
retirement_condition: "manual override count > 5"
|
|
expected_metric: "hts_order_count"
|
|
spec_ref: "spec/13b_harness_formulas.yaml"
|
|
|
|
- formula_id: PREDICTION_ACCURACY_HARNESS_V5
|
|
owner: qa
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-06-06"
|
|
retirement_condition: "prediction_match_rate < 40%"
|
|
expected_metric: "match_rate_pct"
|
|
spec_ref: "spec/13b_harness_formulas.yaml"
|
|
|
|
# ── 데이터 게이트 pending (live data 축적 후 활성화) ────────────────────
|
|
|
|
- formula_id: ALPHA_FEEDBACK_LOOP_V2
|
|
owner: quant_analyst
|
|
lifecycle_state: DATA_GATED
|
|
activation_date: null
|
|
activation_condition: "live_t20_count >= 30 (~2026-07-15)"
|
|
retirement_condition: "알파 피드백 루프 방식 변경 시"
|
|
expected_metric: "alpha_calibration_gate"
|
|
spec_ref: "spec/strategy/predictive_alpha_dialectic_v2.yaml"
|
|
|
|
- formula_id: REBALANCE_ENGINE_V1
|
|
owner: portfolio_manager
|
|
lifecycle_state: ACTIVE
|
|
activation_date: "2026-06-13"
|
|
retirement_condition: "리밸런싱 방법론 변경 또는 버킷 구조 개편 시"
|
|
expected_metric: "rebalance_action"
|
|
spec_ref: "spec/14_raw_workbook_mapping.yaml#rebalance"
|
|
note: >
|
|
bucket drift → 레짐 적응 밴드(P3) → 비용효익 게이트(P4, |drift| > 1.20%p) →
|
|
3단계 분할(P5: 30/30/40%) → ABS_FLOOR/TIME_STOP 강제 매도(P6).
|
|
per_ticker_target_method=equal_weight_within_bucket (V1 근사).
|
|
Python: tools/build_rebalance_engine_v1.py
|
|
GAS: src/gas_adapter_parts/gdf_06_rebalance.gs:runRebalanceSheet_()
|
|
|
|
- formula_id: OUTCOME_LABELS_V1
|
|
owner: qa
|
|
lifecycle_state: DATA_GATED
|
|
activation_date: null
|
|
activation_condition: "GatherTradingData.json 역사 데이터 30건 이상"
|
|
retirement_condition: "아웃컴 레이블링 방식 변경 시"
|
|
expected_metric: "outcome_label_coverage_pct"
|
|
spec_ref: "spec/29_backtest_harness_contract.yaml"
|