feat: 리밸런싱 엔진 V1 + GAS 버그 수정 (2026-06-13)
주요 변경: - 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>
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
schema_version: operating_cadence.v2
|
||||
updated_at: '2026-06-10T23:29:00+09:00'
|
||||
goal: >
|
||||
주말 리밸런싱과 매월 1/11/21 중간점검 cadence를 release DAG input으로 연결한다.
|
||||
rebalance_required, mid_check_required는 final_decision_packet에 반드시 포함된다.
|
||||
timezone: Asia/Seoul
|
||||
|
||||
cadence:
|
||||
weekly_rebalance:
|
||||
days: [Saturday, Sunday]
|
||||
trigger_field: rebalance_required # final packet에 삽입되는 boolean 필드
|
||||
required_sections:
|
||||
- portfolio_rebalance_playbook
|
||||
- ticker_action_matrix
|
||||
- sell_priority_table # 매도 후보 2개 이상이면 반드시 포함
|
||||
- cash_and_risk_budget_snapshot
|
||||
interim_check:
|
||||
dates: [1, 11, 21]
|
||||
trigger_field: mid_check_required # final packet에 삽입되는 boolean 필드
|
||||
required_sections:
|
||||
- engine_health_card
|
||||
- data_missing_and_harness_update_list
|
||||
- shadow_ledger_review
|
||||
- calibration_drift_report
|
||||
|
||||
release_dag_integration:
|
||||
input_node: build_operating_cadence_signal_v1
|
||||
output_fields:
|
||||
- name: rebalance_required
|
||||
type: bool
|
||||
description: 현재 일자가 Saturday 또는 Sunday이면 true
|
||||
- name: mid_check_required
|
||||
type: bool
|
||||
description: 현재 일자의 day가 1, 11, 21 중 하나이면 true
|
||||
- name: cadence_label
|
||||
type: str
|
||||
enum: [WEEKEND_REBALANCE, MID_MONTH_CHECK, NORMAL]
|
||||
downstream_nodes:
|
||||
- build_final_context # context pack에 cadence 정보 삽입
|
||||
- build_final_decision_packet # packet에 rebalance_required 삽입
|
||||
|
||||
rules:
|
||||
- id: RULE_WEEKEND_REBALANCE_CHECK
|
||||
condition: current_day in [Saturday, Sunday]
|
||||
action: Enforce rebalance review playbook. sell priority table must appear.
|
||||
packet_field: rebalance_required
|
||||
- id: RULE_INTERIM_CHECK
|
||||
condition: current_date.day in [1, 11, 21]
|
||||
action: Enforce interim quality check playbook. shadow ledger review mandatory.
|
||||
packet_field: mid_check_required
|
||||
- id: RULE_CADENCE_IN_PACKET
|
||||
condition: always
|
||||
action: >
|
||||
rebalance_required와 mid_check_required는 final_decision_packet_active에
|
||||
항상 포함된다. 값이 없으면 DATA_MISSING — 하네스 업데이트 필요.
|
||||
|
||||
owner: quant_architect
|
||||
lifecycle_state: active
|
||||
Reference in New Issue
Block a user