meta:
  title: quant_investment_engine_v8_9_portfolio_optimizer_canonical_refactored
  version: 8.9.0
  language: ko-KR
  timezone: Asia/Seoul
  currency: KRW
  generated_at: '2026-06-17T00:00:00+09:00'
  source_file: quant_investment_engine_v8_8_portfolio_optimizer_canonical.yaml
  source_sha256: 5fad7a17cb9156ef44218a68bf92397f0117c99de920719ab3de5ee676e7fc38
  source_top_level_key_count: 99
  source_version: 8.8.0
  target_asset_krw: 500000000
  account_style: 장기 포트폴리오 전환 계좌; 단기 트레이딩 계좌 아님
  default_decision_unit: weekly
  mandatory_cadence:
    weekly_rebalance: 매주 토요일 또는 일요일 리밸런싱 제안 필수
    monthly_mid_check_days:
    - 1
    - 11
    - 21
    d2_cash_rule: D+2 현금은 방어선 충족에는 포함하되 신규매수 가용현금과 분리한다.
  upgrade_from: 8.8.0
  upgrade_thesis: v8.9는 신호 추천 엔진이 아니라 계좌 생존, 목표금액 접근도, 데이터 출처, 세후 비용, 실행 가능성, 섹터 노출, 시뮬레이션 하방위험을 하나의 포트폴리오 전환 최적화 문제로 푼다.
    기본값은 NO_TRADE다.
  legal_notice: 알고리즘 설계 명세이며 개별 투자자문 또는 실시간 주문 지시가 아니다. 실주문은 검증된 런타임 패킷과 사용자 확인을 필요로 한다.
brutal_audit_of_v8_8:
  verdict: 원칙은 강하지만 실행 커널은 아직 비대하고 파편화되어 있다. 좋은 게이트가 많아도 단일 상태 벡터, 단일 산식 레지스트리, 단일 최종 패킷으로 컴파일되지 않으면 실전에서는 서로 다른 모듈이 서로를 무력화한다.
  critical_findings:
  - id: F01_version_accumulation_bloat
    finding: v8.1~v8.8의 과거 섹션이 99개 최상위 키로 누적되어 canonical과 archive의 경계가 흐리다.
    fix: active_runtime_contract와 archived_reference를 분리하고 v8.9 실행 경로만 authoritative로 둔다.
  - id: F02_optimizer_objective_not_executable_enough
    finding: 포트폴리오 전환 최적화 목적함수는 있으나 상태 벡터, 후보 집합, 제약 위반 시 tie-breaker, solver fallback이 부족하다.
    fix: state_vector, candidate_action_schema, hard_veto_order, deterministic_tie_breaker, fallback_no_trade를 명시한다.
  - id: F03_distribution_estimator_missing
    finding: CE70/CE90/CVaR를 요구하지만 어떤 윈도우, 표본, 부트스트랩, 레짐 매칭으로 추정하는지 약하다.
    fix: walk_forward_bootstrap, same_regime_min_samples, residual_stress_overlay, leakage tests를 의무화한다.
  - id: F04_sector_collinearity_not_removed
    finding: AI, 반도체, 전력, 산업재, 방산 등 테마가 서로 다른 이름으로 중복 베타를 만들 수 있다.
    fix: sector factor residualization과 exposure graph covariance penalty를 추가한다.
  - id: F05_cash_defense_vs_buying_power_incomplete
    finding: D+2 현금 방어 인정 원칙은 있으나 캘린더, 미체결 주문, 세금 예약금, 환전 버퍼 반영이 약하다.
    fix: cash ladder를 five-bucket으로 분리하고 deployable_cash를 별도 산식으로 잠근다.
  - id: F06_sell_engine_still_narrative_heavy
    finding: 매도 목적은 분류되어 있지만 현금복구/집중도완화/손실회피/세금최적화 간 우선순위가 완전히 선형화되지 않았다.
    fix: sell waterfall과 Pareto lot selector를 도입한다.
  - id: F07_no_trade_band_not_linked_to_tax_drag
    finding: 리밸런싱 밴드는 있으나 세후 비용과 회전율 예산이 목표함수에 충분히 강제되지 않는다.
    fix: rebalance_trigger를 transition_utility_after_tax가 양수일 때만 통과시키고, 위험 블록 예외만 허용한다.
  - id: F08_execution_reality_needs_broker_tick_calendar
    finding: 분할지정가 원칙은 있으나 종목별 호가단위, 장중 변동성, 호가공백, 휴장/결제 캘린더가 스키마화되지 않았다.
    fix: broker_microstructure_packet을 필수 입력으로 추가한다.
  - id: F09_model_governance_needs_kill_switch
    finding: 승격/강등 기준은 있으나 실시간 성능 악화 시 전체 전략 또는 섹터 모델을 강제 중지하는 kill switch가 약하다.
    fix: drawdown, hit-rate, calibration, slippage, quarantine rate 기반 자동 강등/중지 조건을 추가한다.
  - id: F10_llm_reporter_may_still_soften_blocks
    finding: 숫자 창작 금지는 강하지만 보고서 문장이 BLOCK을 완화하는 표현을 만들 가능성이 남아 있다.
    fix: renderer must copy final_action/reason_code verbatim; narrative cannot upgrade action.
  non_negotiable_upgrade_principle: 좋은 후보를 더 찾는 것보다 나쁜 전환을 확실히 막는 것이 우선이다. 모든 매수·매도는 단일 포트폴리오 전환 패킷에서 재평가한다.
active_runtime_contract_v8_9:
  authoritative_sections:
  - canonical_authority_and_compiler_v8_9
  - runtime_packet_schema_v8_9
  - formula_registry_v8_9
  - portfolio_transition_optimizer_v8_9
  - risk_controls_v8_9
  - rebalancing_engine_v8_9
  - execution_plan_compiler_v8_9
  - decision_output_contract_v8_9
  archived_reference_sections: v8.1~v8.8 historical modules are reference-only. They cannot override v8.9 active_runtime_contract.
  hard_rule: 동일 항목에 대해 v8.9와 과거 섹션이 충돌하면 v8.9가 항상 우선한다.
  default_final_action: NO_TRADE
  llm_role: 계산 금지. canonical packet의 수치와 reason_code를 해석·렌더링하되 새 가격·수량·점수·확률을 만들지 않는다.
canonical_authority_and_compiler_v8_9:
  purpose: 여러 산출물과 문서의 신호를 하나의 deterministic DecisionPacket으로 컴파일한다.
  source_precedence_order:
  - spec/00_execution_contract.yaml
  - runtime/active_artifact_manifest.yaml
  - Temp/final_decision_packet_active.json
  - spec/13_formula_registry.yaml
  - spec/02_data_contract.yaml
  - spec/15_account_snapshot_contract.yaml
  - spec/risk/aggregate_risk.yaml
  - spec/risk/portfolio_exposure.yaml
  - artifacts/canonical/*.json
  - Temp/operational_report.json
  - renderer/report text
  compile_steps:
  - S1_load_and_hash_all_authoritative_sources
  - S2_validate_schema_and_required_fields
  - S3_resolve_entity_aliases_and_sector_ids
  - S4_build_portfolio_state_vector
  - S5_attach_numeric_provenance_to_every_number
  - S6_quarantine_missing_or_conflicting_inputs
  - S7_generate_candidate_actions
  - S8_evaluate_portfolio_transition_sets
  - S9_select_final_transition_or_NO_TRADE
  - S10_emit_immutable_decision_packet_and_renderer_payload
  deterministic_conflict_resolution:
    priority_order:
    - DATA_INVALID
    - EXECUTION_MODE_BLOCK
    - CASH_FLOOR_BLOCK
    - CRISIS_SURVIVAL_BLOCK
    - HARD_CONCENTRATION_BLOCK
    - LIQUIDITY_CAPACITY_BLOCK
    - NEGATIVE_TRANSITION_UTILITY
    - NO_TRADE_BAND
    - WATCH
    - ALLOW
    tie_breaker:
    - higher_survival_score
    - lower_turnover
    - lower_tax_drag
    - lower_marginal_risk_contribution
    - higher_data_quality_score
    - lower_complexity_score
    unknown_or_unmapped_action: BLOCK_AND_QUARANTINE
  prohibited_patterns:
  - renderer_overrides_canonical_action
  - LLM_generates_price_or_quantity
  - missing_required_numeric_treated_as_zero
  - sector_label_used_without_exposure_graph
  - single_candidate_buy_recommended_without_portfolio_transition_utility
runtime_packet_schema_v8_9:
  DecisionPacket_required_top_level_fields:
  - packet_id
  - engine_version
  - generated_at
  - input_hash_bundle
  - execution_mode
  - account_state
  - market_state
  - data_quality
  - portfolio_state_vector
  - candidate_actions
  - transition_set_evaluations
  - selected_transition
  - hard_blocks
  - reason_codes
  - renderer_payload
  account_state_required_fields:
  - total_asset_krw
  - target_asset_krw
  - goal_progress_pct
  - immediate_cash_krw
  - d1_cash_krw
  - d2_cash_krw
  - deployable_cash_krw
  - survival_cash_required_krw
  - open_order_reserve_krw
  - estimated_tax_fee_reserve_krw
  - weekly_external_cashflow_krw
  - weekly_legacy_to_cma_transfer_plan_krw
  portfolio_state_vector_required_fields:
  - positions
  - weights_by_asset
  - weights_by_sector_family
  - weights_by_risk_bucket
  - top3_weight_pct
  - single_name_max_pct
  - semiconductor_direct_plus_etf_pct
  - cash_ladder
  - pre_trade_CVaR95_krw
  - pre_trade_MDD_estimate_krw
  - margin_of_safety_score
  candidate_action_required_fields:
  - candidate_id
  - asset_id
  - action_type
  - trade_intent
  - planned_amount_krw
  - source_signal_ids
  - numeric_provenance_status
  - pre_trade_weight_pct
  - post_trade_weight_pct
  - expected_utility_inputs
  - execution_capacity_inputs
  - tax_lot_inputs
  - reason_codes
  transition_set_required_fields:
  - transition_id
  - included_candidate_ids
  - post_trade_cash_floor_pct
  - post_trade_exposures
  - post_trade_CVaR95_krw
  - transition_utility_krw
  - total_tax_fee_slippage_krw
  - turnover_pct
  - hard_constraint_pass
  - soft_penalty_total_krw
  - selection_rank
  - reject_reason
  null_policy: required numeric field가 null이면 해당 후보 또는 전환은 QUARANTINE. 단, scenario_only 필드는 주문 후보 승격에 사용하지 않는다.
data_provenance_firewall_v8_9:
  purpose: 모든 숫자 입력을 source/formula/asof/unit/hash로 추적하여 홀루시네이션과 stale data를 차단한다.
  numeric_field_contract:
    required_metadata:
    - value
    - unit
    - source_id
    - source_asof
    - formula_id
    - input_hash
    - confidence_score
    - is_runtime_authoritative
    forbidden:
    - value_only_number
    - source_missing
    - formula_missing
    - asof_missing
    - LLM_estimated_number
    on_failure: NUMERIC_QUARANTINE
  freshness_sla:
    price_intraday_minutes_max: 20
    holding_snapshot_hours_max: 24
    cash_snapshot_hours_max: 24
    sector_constituents_days_max: 7
    ETF_NAV_days_max: 2
    fundamental_quarterly_days_max: 120
    macro_daily_days_max: 3
    macro_monthly_days_max: 45
    broker_orderbook_minutes_max: 5
  data_quality_score_formula: DQS = 100 - stale_penalty - missing_penalty - conflict_penalty - lineage_penalty - unit_mismatch_penalty
  grade_action:
    DQS_90_100: ALLOW_FOR_OPTIMIZER
    DQS_75_89: ALLOW_WITH_HAIRCUT
    DQS_60_74: WATCH_ONLY
    DQS_below_60: QUARANTINE
  hard_quarantine_conditions:
  - price_missing_for_traded_asset
  - cash_missing
  - position_quantity_missing
  - source_asof_conflict_material
  - formula_id_not_in_registry
  - ETF_constituents_missing_for_ETF_buy
  - FX_rate_missing_for_foreign_trade
portfolio_policy_v8_9:
  cash_floor:
    normal_min_d2_inclusive_cash_pct: 12.5
    deployable_cash_must_be_positive_for_buy: true
    d2_cash_counts_for_defense_not_for_full_deployment: true
    dynamic_required_cash_pct_by_mode:
      AGGRESSIVE_GROWTH: 10.0
      GROWTH: 12.5
      BALANCED: 20.0
      DEFENSIVE: 35.0
      CAPITAL_PRESERVATION: 50.0
      BLACK_CRISIS: 60_to_80
    hard_block: if d2_inclusive_cash_pct < required_cash_pct then new BUY/STAGED_BUY amount = 0
  concentration_limits:
    single_stock_soft_cap_pct: 15
    single_stock_hard_cap_pct: 20
    single_sector_family_soft_cap_pct: 25
    single_sector_family_hard_cap_pct: 35
    top3_soft_cap_pct: 50
    top3_hard_cap_pct: 65
    semiconductor_direct_plus_etf_hard_cap_pct: 35
    over_cap_action: no_additional_buy; evaluate partial_trim_or_core_ETF_transition_after_tax_cost
  long_term_target_allocation_after_repair:
    index_core_us_kr_global_pct: 45_to_55
    quality_leaders_direct_or_quality_ETF_pct: 20_to_25
    sector_tactical_satellite_pct: 5_to_15
    cash_and_short_duration_defense_pct: 12.5_to_20
    gold_or_defensive_alternative_pct: 0_to_5
    legacy_single_name_overweight_pct: 0_to_20_only_if_tax_and_trend_justify
  operator_cashflow_config:
    monthly_salary_cashflow_krw: 2500000
    weekly_legacy_stock_to_cma_transfer_plan_krw: 4000000
    cashflow_treatment: cashflow는 목표 배분 회복 속도 계산에는 사용하되, 입금 확인 전 주문가능현금으로 계산하지 않는다.
macro_regime_engine_v8_9:
  purpose: 시장 국면을 단일 라벨이 아니라 확률분포로 산출하여 포지션 사이징과 현금 요구치를 조정한다.
  regime_states:
  - RISK_ON_TREND
  - NARROW_AI_MELTUP
  - BOX_RANGE
  - REACCUMULATION
  - DISTRIBUTION
  - RISK_OFF
  - LIQUIDITY_DROUGHT
  - CRISIS_RED
  - CRISIS_BLACK
  required_features:
  - index_trend_20_60_120_200d
  - market_breadth
  - credit_spread
  - usdkrw_trend
  - rates_level_and_change
  - earnings_revision
  - foreign_institutional_flow
  - volatility_term_structure
  - liquidity_proxy
  - event_calendar_risk
  regime_score_formula: REGIME_SCORE = weighted_sum(normalized_features) with weights locked in formula_registry; no ad-hoc
    LLM weights
  hysteresis:
    min_days_to_upgrade_regime: 3
    min_days_to_downgrade_to_risk_off: 1
    crisis_red_override: immediate_when_drawdown_or_liquidity_threshold_breached
    black_crisis_override: immediate_when_gap_or_correlation_or_settlement_stress_breached
  policy_outputs:
  - risk_mode
  - required_cash_pct
  - buy_multiplier
  - sell_urgency_multiplier
  - sector_rotation_permission
  - max_weekly_turnover_pct
sector_graph_engine_v8_9:
  purpose: 섹터 이름 추천이 아니라 경제 노출 그래프, 가치사슬 전파, ETF 구성종목, 대장주 생명주기를 통합한다.
  canonical_sector_id_format: 'L1:L2:L3:L4, 예: EQ:TECH:SEMIS:HBM'
  node_types:
  - asset
  - issuer
  - ETF
  - sector_L1
  - sector_L2
  - sector_L3
  - sector_L4
  - theme
  - value_chain_role
  - macro_driver
  - risk_factor
  edge_types:
  - holds
  - constituent_of
  - revenue_exposure
  - supplier_customer
  - factor_beta
  - theme_overlap
  - currency_exposure
  - policy_exposure
  mandatory_exposure_metrics:
  - direct_weight_pct
  - lookthrough_ETF_weight_pct
  - theme_overlap_pct
  - factor_beta_to_semis
  - factor_beta_to_AI_capex
  - sector_family_total_pct
  - post_trade_exposure_pct
  - stress_correlation_to_top3
  sector_rotation_score_v3:
    formula: SRS100 = 0.20*relative_strength + 0.15*breadth + 0.15*leader_alignment + 0.10*earnings_revision + 0.10*smart_money_flow
      + 0.10*macro_fit + 0.10*ETF_quality + 0.10*valuation_safety - crowding_penalty - overlap_penalty
    hard_rule: SRS는 매수 허가가 아니라 후보 생성 점수다. portfolio_transition_optimizer를 통과해야만 주문 검토 가능하다.
    data_missing_action: WATCH_ONLY
  leader_lifecycle:
    roles:
    - CAPTAIN
    - CORE_LEADER
    - ENABLER
    - CYCLICAL_BETA
    - LAGGARD
    - DISTRIBUTION_RISK
    promotion_requires:
    - relative_strength_leads_sector
    - volume_quality_confirmed
    - above_MA60_or_reclaim_confirmed
    - earnings_revision_positive_or_not_negative
    - institutional_flow_not_distribution
    demotion_triggers:
    - break_MA60_with_distribution
    - underperform_sector_20d
    - earnings_revision_negative
    - gap_up_failure
    - crowded_flow_reversal
  ETF_quality_gate:
    required:
    - NAV_asof_valid
    - constituents_asof_valid
    - top10_weight_known
    - tracking_error_known
    - spread_and_volume_capacity_pass
    block_if:
    - constituents_missing
    - NAV_stale
    - top_holdings_conflict_with_direct_exposure_cap
    - tracking_error_extreme
  sector_buy_permissions_by_regime:
    RISK_ON_TREND: core_ETF_and_quality_leader_allowed_if_transition_utility_positive
    NARROW_AI_MELTUP: only_leaders_after_pullback_or_reclaim; no_chase_breakout_day
    BOX_RANGE: mean_reversion_small_size_only; prefer_no_trade
    REACCUMULATION: staged_entry_allowed_after_breadth_and_leader_confirm
    DISTRIBUTION: new_buy_blocked_except_defense
    RISK_OFF: new_buy_blocked; cash_repair_and_risk_exit_review
    CRISIS_RED: survival_priority; risk_exit_allowed
    CRISIS_BLACK: liquidity_and_cash_only
forecast_and_simulation_engine_v8_9:
  purpose: 점 하나의 기대수익률이 아니라 레짐별 분포, 하방 꼬리, 비용 스트레스, 포트폴리오 상관을 추정한다.
  allowed_estimators:
  - walk_forward_bootstrap
  - regime_matched_bootstrap
  - factor_residual_model
  - quantile_regression_if_validated
  - scenario_shock_matrix
  - Bayesian_model_average_if_calibrated
  forbidden_estimators:
  - LLM_guess_return
  - single_point_target_price_without_distribution
  - backtest_without_cost_or_leakage_test
  - survivorship_biased_sample
  distribution_outputs_required:
  - mean_net_profit_krw
  - median_net_profit_krw
  - CE70_net_profit_krw
  - CE90_net_profit_krw
  - CVaR95_loss_krw
  - probability_loss_pct
  - payoff_ratio
  - sample_count_total
  - sample_count_same_regime
  - calibration_error
  - brier_score
  - implementation_shortfall_stress_krw
  simulation_grid:
    base_case: current_regime_probability_weighted
    adverse_case: volatility_up_and_breadth_down
    liquidity_drought_case: spread_widening_and_capacity_down
    crisis_case: correlation_to_one_and_gap_down
    fx_shock_case: USDKRW adverse movement for foreign assets
    tax_cost_case: realized_gain_tax_and_reentry_cost_stress
  minimum_sample_rules:
    AUDIT_ONLY: no minimum; report missing samples
    SHADOW:
      sample_count_total_min: 30
      sample_count_same_regime_min: 10
    PILOT:
      sample_count_total_min: 80
      sample_count_same_regime_min: 20
    LIVE_LIMITED:
      sample_count_total_min: 150
      sample_count_same_regime_min: 30
    LIVE_FULL:
      sample_count_total_min: 300
      sample_count_same_regime_min: 50
  leakage_controls:
  - asof_join_required
  - future_constituent_exclusion
  - delisted_name_inclusion_where_available
  - corporate_action_adjustment
  - calendar_alignment
  - rebalance_delay_modeling
portfolio_transition_optimizer_v8_9:
  purpose: 개별 매수/매도 팁이 아니라 전체 포트폴리오의 사후 상태를 비교하여 최선의 전환 또는 NO_TRADE를 선택한다.
  default_action: NO_TRADE
  state_vector:
  - cash_ladder
  - positions
  - sector_exposure_graph
  - factor_exposures
  - tax_lots
  - risk_bucket_weights
  - macro_regime_probabilities
  - data_quality_scores
  - execution_capacity
  - goal_progress_pct
  candidate_action_types:
  - BUY_CORE_ETF
  - BUY_QUALITY_LEADER
  - BUY_SECTOR_SATELLITE
  - SELL_CASH_REPAIR
  - SELL_RISK_EXIT
  - SELL_PROFIT_LOCK
  - SELL_DECONCENTRATION
  - HOLD
  - WATCH_ONLY
  objective: maximize PORTFOLIO_TRANSITION_UTILITY_V8_9 subject to hard constraints
  hard_constraints:
  - numeric_provenance_pass == true
  - execution_mode_allows_action == true
  - post_trade_cash_floor_pct >= required_cash_floor_pct
  - deployable_cash_krw_after_buy >= 0
  - survival_cash_bucket_used_for_buy == false
  - single_stock_hard_cap_pass == true
  - sector_family_hard_cap_pass == true
  - top3_hard_cap_pass == true
  - semiconductor_direct_plus_etf_cap_pass == true
  - post_trade_CVaR95_not_worse_beyond_budget == true
  - execution_capacity_pass == true
  - ETF_quality_pass_for_ETF_buy == true
  - no_black_crisis_new_buy == true
  soft_penalties:
  - turnover_penalty
  - tax_drag_penalty
  - slippage_penalty
  - liquidity_penalty
  - data_uncertainty_penalty
  - crowding_penalty
  - factor_overlap_penalty
  - opportunity_cost_penalty
  - complexity_penalty
  selection_algorithm:
  - 1_generate_candidate_actions_from_sector_factor_cash_sell_engines
  - 2_apply_hard_vetoes_to_each_candidate
  - 3_construct_transition_sets_with_cash_balanced_buys_and_sells
  - 4_simulate_each_transition_across_base_adverse_liquidity_crisis_fx_tax_scenarios
  - 5_compute_transition_utility_and_acceptance_margin
  - 6_reject_if_any_hard_constraint_fails_or_acceptance_margin_non_positive
  - 7_select_highest_robust_utility_transition
  - 8_if_utility_gap_between_rank1_and_rank2_below_noise_threshold_choose_lower_turnover
  - 9_if_all_rejected_emit_NO_TRADE_with_required_data_and_repair_actions
  minimum_acceptance_margin_by_mode:
    AUDIT_ONLY: documentation_only_no_live_order
    SHADOW: transition_utility_krw > 0 and no_live_order
    PILOT: transition_utility_krw > max(100000, 3*estimated_total_cost_krw)
    LIVE_LIMITED: transition_utility_krw > max(300000, 4*estimated_total_cost_krw) and CE70_positive
    LIVE_FULL: transition_utility_krw > max(500000, 5*estimated_total_cost_krw) and CE90_non_negative_for_new_buy
  deterministic_fallbacks:
    missing_optimizer_inputs: NO_TRADE_AND_QUARANTINE
    solver_failure: NO_TRADE_AND_LOG_SOLVER_FAILURE
    rank_tie: choose_lower_turnover_lower_tax_lower_MRC
    conflicting_runtime_packets: BLOCK_AND_REQUIRE_MANIFEST_REPAIR
cash_ladder_engine_v8_9:
  purpose: 방어현금, 결제예정현금, 전술현금, 기회현금, 환전버퍼를 분리하여 매수 가능 금액을 과대평가하지 않는다.
  cash_buckets:
    survival_cash_krw: never_deploy_for_new_buy
    settlement_cash_d1_d2_krw: counts_for_defensive_floor_with_haircut; not full buying_power
    tactical_cash_krw: deploy_only_after_regime_confirmation
    opportunity_cash_krw: deploy_only_when_transition_utility_positive
    fx_buffer_cash_krw: reserved_for_foreign_asset_and_usdkrw_shock
  deployable_cash_formula: deployable_cash_krw = immediate_cash_krw + d1_cash_krw*d1_haircut + d2_cash_krw*d2_haircut - survival_cash_required_krw
    - open_order_reserve_krw - estimated_tax_fee_reserve_krw - fx_buffer_required_krw
  haircuts:
    KR_T_PLUS_2: 0.7
    US_T_PLUS_1: 0.85
    UNKNOWN_SETTLEMENT: 0.0
  hard_rules:
  - if deployable_cash_krw <= 0 then BUY_BLOCKED_DEPLOYABLE_CASH
  - if d2_inclusive_cash_floor_pct < required_cash_pct then BUY_BLOCKED_CASH_FLOOR
  - if open_order_reserve_missing then BUY_BLOCKED_CASH_UNCERTAIN
  - survival_cash cannot be used for averaging_down_or_theme_chasing
sell_and_cash_repair_optimizer_v8_9:
  purpose: 매도를 감정적 손절/익절이 아니라 현금복구, 집중도완화, 꼬리위험회피, 세후 효율의 선형 waterfall로 처리한다.
  sell_intents_priority_order:
  - SELL_RISK_EXIT
  - SELL_CASH_REPAIR
  - SELL_DECONCENTRATION
  - SELL_PROFIT_LOCK
  - SELL_TAX_LOSS_HARVEST
  - HOLD
  candidate_lot_scoring: LOT_SELL_SCORE = avoided_tail_loss + cash_repair_benefit + concentration_reduction_benefit + tax_loss_benefit
    - tax_fee_slippage - missed_upside_penalty - reentry_cost
  waterfall_rules:
  - risk_exit can override profit hurdle when avoided_tail_loss > exit_cost and crisis gate active
  - cash_repair can sell profitable overweight lots when cash_floor_broken and value_damage_cap_pass
  - deconcentration trims only excess exposure first; do not sell core below target unless crisis_black
  - profit_lock uses partial ladder; full exit only for structural_break, data_error_exit, crisis_black, or thesis_invalidated
  - tax_loss_harvest never creates wash-like immediate reentry unless allowed by local tax rules and compliance packet
  partial_trim_ladder_pct:
  - 10
  - 20
  - 33
  - 50
  value_damage_cap:
    normal: do not realize high-quality long-term holding loss merely to meet tactical cash if survival not threatened
    defensive: allow moderate value damage only when cash_floor_broken_or_concentration_hard_cap_breached
    crisis_black: survival overrides value damage cap
  output_required:
  - sell_priority_table
  - lot_ids
  - expected_cash_created_krw
  - tax_fee_slippage_krw
  - post_sell_cash_floor_pct
  - post_sell_exposure_pct
  - reason_code
rebalancing_engine_v8_9:
  purpose: 주간/월중 점검을 단순 비중 맞추기가 아니라 세후 전환 효용이 양수인 경우에만 실행하는 최적화 절차로 만든다.
  mandatory_schedule:
    weekly_rebalance_required: true
    weekly_days:
    - SATURDAY
    - SUNDAY
    monthly_mid_check_days:
    - 1
    - 11
    - 21
    event_driven_rebalance_triggers:
    - cash_floor_break
    - crisis_score_red_or_black
    - hard_concentration_breach
    - data_quarantine_material
    - major_macro_event
    - drawdown_gate_breach
    - execution_slippage_breach
  no_trade_bands:
    core_index_etf_pct: 5.0
    quality_leaders_pct: 3.0
    sector_satellite_pct: 2.0
    cash_floor_pct: 0.0
    legacy_overweight_sector_pct: 0.0
  rebalance_trigger_formula: trigger = hard_risk_block_active OR (abs(current_weight-target_weight)>band AND transition_utility_after_tax_cost>hurdle)
  turnover_budget:
    normal_weekly_turnover_cap_pct: 5
    defensive_weekly_turnover_cap_pct: 15
    crisis_turnover_cap_pct: no_cap_for_survival_sell_but_market_order_ban_remains
    tax_aware_rule: prefer low tax drag lots unless risk_exit overrides
  long_term_transition_path:
    phase_0_repair: cash floor >= 12.5 and hard concentration below cap
    phase_1_core_build: increase index core toward 45~55% using new cashflow and risk-reducing switches
    phase_2_quality_overlay: quality leaders/ETF 20~25% only after data and transition utility pass
    phase_3_sector_satellite: sector tactical 5~15% with strict stop/go and shadow validation
    phase_4_maintenance: rebalance only when after-cost utility positive or risk block active
execution_plan_compiler_v8_9:
  purpose: 승인된 전환만 주문 문법으로 변환하며, 체결 전·중·후 재검증을 강제한다.
  order_policy:
    default_order_type: LIMIT_SPLIT
    market_order_default: FORBIDDEN
    market_order_exception: only_user_confirmed_survival_exit_with_liquidity_check
    breakout_day_buy: BLOCKED_UNTIL_NEXT_SESSION_VWAP_HOLD_CONFIRM
    gap_up_rule: if open_gap_pct > 3 then block_new_buy_until_vwap_hold_confirmed
    averaging_down_rule: blocked below MA120 unless validated rescue plan and survival cash intact
  broker_microstructure_packet_required:
  - tick_size
  - daily_price_limit
  - avg_trade_value_20d_krw
  - intraday_trade_value_krw
  - spread_bps
  - orderbook_top3_depth_krw
  - halt_status
  - short_sale_or_margin_restriction
  - settlement_calendar
  capacity_formula: order_capacity_krw = min(planned_order_amount_krw, avg_trade_value_20d_krw*0.003, intraday_trade_value_krw*0.01,
    orderbook_top3_depth_krw*0.30)
  split_order_template:
    slice_1_pct: 30
    slice_2_pct: 30
    slice_3_pct: 40
    requires_revalidation_before_each_slice: true
  cancel_remaining_if:
  - captain_reverses_intraday
  - index_drop_exceeds_threshold
  - spread_widens_beyond_limit
  - cash_floor_after_fill_breached
  - data_quarantine_after_slice
  - orderbook_capacity_collapses
  post_fill_recompute_required:
  - cash_floor
  - deployable_cash
  - sector_exposure_graph
  - MRC
  - transition_utility
  - remaining_capacity
  - tax_fee_reserve
risk_controls_v8_9:
  purpose: 수익률 극대화보다 계좌 생존과 목표금액 접근도를 우선한다.
  risk_layers_order:
  - data_integrity
  - execution_mode
  - cash_floor
  - crisis_state
  - concentration
  - CVaR_and_drawdown
  - liquidity_capacity
  - tax_cost
  - model_confidence
  - expected_utility
  drawdown_gates:
    account_MDD_warning_pct: 5
    account_MDD_defensive_pct: 8
    account_MDD_crisis_pct: 12
    single_position_MAE_review_pct: 7
    sector_family_drawdown_review_pct: 10
  CVaR_policy:
    portfolio_CVaR95_budget_pct_of_asset:
      growth: 8
      balanced: 6
      defensive: 4
      capital_preservation: 2
    hard_rule: post_trade_CVaR95 cannot worsen beyond budget unless sell_risk_exit reduces larger tail risk
  kill_switches:
  - data_quarantine_rate_above_5pct
  - implementation_shortfall_above_2x_expected_for_10_trades
  - T5_hit_rate_below_50pct_for_30_shadow_or_live_trades
  - calibration_error_above_limit_for_20_trades
  - unexpected_drawdown_breach
  - renderer_contract_violation
  risk_mode_actions:
    GROWTH: normal optimizer; cash floor 12.5%
    BALANCED: reduced size; prefer core ETF; satellite capped
    DEFENSIVE: new satellite buys blocked; cash repair and core risk reduction
    CAPITAL_PRESERVATION: new buys blocked except treasury/defense if validated
    CRISIS_BLACK: survival-only sell and liquidity management
formula_registry_v8_9:
  PORTFOLIO_TRANSITION_UTILITY_V8_9: sum(CE70_net_profit_krw - tax_fee_slippage_krw - CVaR_penalty_krw - drawdown_penalty_krw
    - liquidity_penalty_krw - data_uncertainty_penalty_krw - factor_overlap_penalty_krw) + cash_repair_benefit_krw + concentration_reduction_benefit_krw
    + goal_progress_benefit_krw - turnover_penalty_krw - complexity_penalty_krw
  TRANSITION_ACCEPTANCE_MARGIN_V8_9: transition_utility_krw - max(mode_absolute_hurdle_krw, hurdle_multiple * estimated_total_cost_krw)
  CE70_NET_PROFIT_KRW_V8_9: quantile(net_profit_distribution_after_tax_fee_slippage, 0.30)
  CE90_NET_PROFIT_KRW_V8_9: quantile(net_profit_distribution_after_tax_fee_slippage, 0.10)
  CVaR95_LOSS_KRW_V8_9: mean(losses beyond 95th percentile loss threshold in simulated net_profit_distribution)
  DATA_UNCERTAINTY_PENALTY_KRW_V8_9: planned_order_amount_krw * max(0, 75 - data_quality_score)/100 * uncertainty_penalty_rate
  CONCENTRATION_PENALTY_KRW_V8_9: sum(max(0, exposure_pct - cap_pct)^2 * exposure_penalty_rate_krw)
  FACTOR_OVERLAP_PENALTY_KRW_V8_9: planned_order_amount_krw * max(0, post_trade_factor_beta - factor_beta_cap) * factor_overlap_rate
  CASH_REPAIR_BENEFIT_KRW_V8_9: max(0, required_survival_cash_krw - current_d2_inclusive_cash_krw) * cash_shortfall_penalty_rate
    * crisis_multiplier
  SELL_NET_BENEFIT_KRW_V8_9: avoided_tail_loss_krw + concentration_reduction_benefit_krw + cash_repair_benefit_krw + tax_loss_benefit_krw
    - tax_fee_slippage_krw - reentry_cost_krw - missed_upside_penalty_krw
  DEPLOYABLE_CASH_KRW_V8_9: immediate_cash_krw + d1_cash_krw*d1_haircut + d2_cash_krw*d2_haircut - survival_cash_required_krw
    - open_order_reserve_krw - estimated_tax_fee_reserve_krw - fx_buffer_required_krw
  GOAL_PROGRESS_PCT_V8_9: total_asset_krw / target_asset_krw * 100
  GOAL_DISTANCE_RISK_MULTIPLIER_V8_9: if goal_progress_pct < 70 then 1.0 elif goal_progress_pct < 85 then 0.8 elif goal_progress_pct
    < 95 then 0.6 else 0.4
  POSITION_SIZE_CAP_KRW_V8_9: min(risk_budget_krw, deployable_cash_krw, execution_capacity_krw, exposure_capacity_krw, fractional_kelly_guardrail_krw)
  SECTOR_ROTATION_SCORE_V8_9: 0.20*relative_strength + 0.15*breadth + 0.15*leader_alignment + 0.10*earnings_revision + 0.10*smart_money_flow
    + 0.10*macro_fit + 0.10*ETF_quality + 0.10*valuation_safety - crowding_penalty - overlap_penalty
decision_output_contract_v8_9:
  purpose: 보고서와 주문 후보가 canonical DecisionPacket을 그대로 반영하도록 강제한다.
  required_for_every_report:
  - portfolio_health_summary
  - global_execution_mode
  - global_final_action
  - top_hard_blocks
  - cash_floor_status
  - concentration_status
  - data_quality_status
  - allowed_reviews
  - forbidden_actions
  - required_next_data
  - decision_trace_id
  required_for_every_transition:
  - transition_id
  - final_action
  - transition_utility_krw
  - acceptance_margin_krw
  - hard_constraint_pass
  - post_trade_cash_floor_pct
  - post_trade_exposure_graph
  - total_tax_fee_slippage_krw
  - turnover_pct
  - reason_codes
  - execution_plan_status
  required_for_every_trade_candidate:
  - candidate_id
  - asset_id
  - action_type
  - trade_intent
  - planned_amount_krw
  - source_signal_ids
  - CE70_net_profit_krw
  - CE90_net_profit_krw
  - CVaR95_loss_krw
  - sell_or_buy_net_benefit_krw
  - post_trade_weight_pct
  - numeric_provenance_status
  - final_status
  - veto_reason
  allowed_final_actions:
  - NO_TRADE
  - WATCH_ONLY
  - SHADOW_LEDGER_ONLY
  - CASH_REPAIR_SELL_REVIEW
  - DECONCENTRATION_REVIEW
  - PROFIT_LOCK_REVIEW
  - RISK_EXIT_REVIEW
  - PILOT_ORDER_REVIEW
  - LIVE_ORDER_REVIEW
  forbidden_outputs:
  - BUY_NOW_without_transition_utility
  - price_target_without_provenance
  - quantity_without_order_capacity
  - sector_recommendation_without_exposure_graph
  - renderer_softening_BLOCK_to_consider_buy
  - hidden_blocked_candidates
harness_validation_suite_v8_9:
  purpose: v8.9가 데이터 창작, 단일종목 팁, 비용 무시, 위기 취약성, 리밸런싱 과잉을 차단하는지 검증한다.
  minimum_required_pass_rate_pct: 100
  golden_cases:
  - id: V89_001_yaml_parse
    given: YAML loads with no duplicate active authoritative sections
    expect: PASS
  - id: V89_002_no_trade_default
    given: complete transition utility missing
    expect: NO_TRADE
  - id: V89_003_no_numeric_provenance
    given: candidate has price/score/quantity without source/formula/asof
    expect: NUMERIC_QUARANTINE
  - id: V89_004_cash_floor_broken
    given: d2-inclusive cash ratio below required cash floor
    expect: all new buys blocked
  - id: V89_005_deployable_cash_negative
    given: defense cash passes using D+2 but deployable cash <= 0
    expect: BUY_BLOCKED_DEPLOYABLE_CASH
  - id: V89_006_semiconductor_over_cap
    given: semiconductor direct+ETF exposure above cap
    expect: semiconductor/HBM add-buy amount 0
  - id: V89_007_top3_hard_cap
    given: top3 exposure > hard cap
    expect: new concentration-increasing buy blocked
  - id: V89_008_single_stock_hard_cap
    given: post-trade single stock weight > hard cap
    expect: transition rejected
  - id: V89_009_sector_family_hard_cap
    given: post-trade sector family exposure > hard cap
    expect: transition rejected
  - id: V89_010_candidate_good_portfolio_bad
    given: CE70 positive but post-trade CVaR and concentration worsen
    expect: transition rejected
  - id: V89_011_small_edge_high_cost
    given: positive CE70 but below cost multiple hurdle
    expect: NO_TRADE
  - id: V89_012_CE90_negative_live_full
    given: LIVE_FULL candidate CE90 below zero for new buy
    expect: new buy blocked
  - id: V89_013_missing_CVaR
    given: distribution lacks CVaR95
    expect: NUMERIC_QUARANTINE
  - id: V89_014_same_regime_sample_low
    given: same-regime sample below minimum
    expect: WATCH_ONLY or SHADOW_ONLY
  - id: V89_015_calibration_error_high
    given: model calibration error above limit
    expect: model demoted or candidate blocked
  - id: V89_016_ETF_constituents_missing
    given: ETF buy lacks constituents
    expect: ETF buy blocked
  - id: V89_017_ETF_NAV_stale
    given: ETF NAV stale beyond SLA
    expect: ETF buy blocked
  - id: V89_018_fx_missing
    given: foreign asset trade lacks FX data
    expect: trade blocked
  - id: V89_019_broker_packet_missing
    given: no tick/spread/orderbook/settlement packet
    expect: execution plan blocked
  - id: V89_020_capacity_too_low
    given: capacity formula below planned order
    expect: order size capped or blocked
  - id: V89_021_partial_fill
    given: first slice filled
    expect: recompute cash/exposure/MRC/utility before next slice
  - id: V89_022_spread_widens
    given: spread exceeds limit after slice
    expect: cancel remaining
  - id: V89_023_gap_up_chase
    given: open gap > 3%
    expect: new buy blocked until VWAP hold confirm
  - id: V89_024_breakout_day
    given: breakout day immediate buy
    expect: blocked until next-session confirmation
  - id: V89_025_crisis_red
    given: crisis red regime
    expect: new buys blocked and risk exits allowed
  - id: V89_026_crisis_black
    given: crisis black regime
    expect: survival-only liquidity policy
  - id: V89_027_risk_exit_loss_position
    given: loss position has avoided tail loss > exit cost
    expect: SELL_RISK_EXIT_REVIEW allowed
  - id: V89_028_cash_repair_sell
    given: cash floor broken and profitable overweight lot exists
    expect: SELL_CASH_REPAIR_REVIEW allowed
  - id: V89_029_deconcentration_trim
    given: trend intact but concentration above soft/hard cap
    expect: partial trim review
  - id: V89_030_profit_lock
    given: winner extended and sell net benefit above hurdle
    expect: partial PROFIT_LOCK_REVIEW
  - id: V89_031_tax_drag_too_high
    given: sell benefit lower than tax/cost/reentry penalty
    expect: HOLD_OR_PARTIAL_ONLY
  - id: V89_032_no_trade_band
    given: weight deviation inside band and no hard block
    expect: NO_TRADE
  - id: V89_033_hard_block_overrides_band
    given: inside band but cash floor broken
    expect: rebalance/cash repair trigger allowed
  - id: V89_034_turnover_cap
    given: normal regime turnover > cap
    expect: transition rejected or resized
  - id: V89_035_model_kill_switch_hit_rate
    given: T5 hit rate below threshold for 30 trades
    expect: automatic demotion
  - id: V89_036_model_kill_switch_slippage
    given: implementation shortfall > 2x expected
    expect: automatic demotion
  - id: V89_037_data_quarantine_rate
    given: data quarantine rate > 5%
    expect: kill switch or demotion
  - id: V89_038_renderer_violation
    given: report text upgrades BLOCK to buy language
    expect: renderer invalid
  - id: V89_039_operator_override
    given: human override present
    expect: immutable log required
  - id: V89_040_shadow_mode
    given: execution mode SHADOW
    expect: no live order generated
  - id: V89_041_audit_only_mode
    given: execution mode AUDIT_ONLY
    expect: documentation only
  - id: V89_042_pilot_requirements_missing
    given: insufficient shadow decisions
    expect: cannot promote to PILOT
  - id: V89_043_live_requirements_missing
    given: insufficient pilot/live sample
    expect: cannot promote to LIVE
  - id: V89_044_sector_overlap
    given: AI power buy increases hidden semiconductor beta over cap
    expect: transition rejected or resized
  - id: V89_045_ETF_direct_overlap
    given: ETF top holdings duplicate direct overweight exposure
    expect: buy blocked or resized
  - id: V89_046_leader_distribution
    given: captain breaks MA60 with distribution
    expect: leader demoted; buy blocked
  - id: V89_047_reaccumulation_confirmed
    given: breadth and leader reclaim confirmed but cash broken
    expect: still no buy until cash repair
  - id: V89_048_solver_failure
    given: optimizer fails to solve
    expect: NO_TRADE_AND_LOG_SOLVER_FAILURE
  - id: V89_049_rank_tie
    given: two transitions have similar utility
    expect: choose lower turnover/lower tax/lower MRC
  - id: V89_050_conflicting_packets
    given: runtime packets conflict materially
    expect: BLOCK_AND_REQUIRE_MANIFEST_REPAIR
  - id: V89_051_goal_near_target
    given: goal progress >= 95%
    expect: risk multiplier reduced
  - id: V89_052_goal_far_from_target
    given: goal progress <70% but risk gates fail
    expect: risk gates still override growth desire
  - id: V89_053_weekly_rebalance_required
    given: Saturday/Sunday review
    expect: rebalance review emitted even if NO_TRADE
  - id: V89_054_mid_check_required
    given: day is 1/11/21
    expect: mid-check emitted
  - id: V89_055_current_account_policy
    given: current account has cash/concentration repair needs
    expect: NO_NEW_BUY; repair reviews only
model_governance_v8_9:
  immutable_decision_log_required_fields:
  - decision_id
  - timestamp
  - engine_version
  - input_hash_bundle
  - execution_mode
  - candidate_ids
  - selected_transition_id
  - hard_blocks
  - expected_distribution_snapshot
  - transition_utility_krw
  - operator_override
  - order_ids
  - fill_prices
  - slippage
  - T1_return
  - T5_return
  - T20_return
  - MAE
  - MFE
  - post_trade_attribution
  promotion_ladder:
    AUDIT_ONLY_to_SHADOW:
    - yaml_parse_pass
    - schema_validation_pass
    - golden_cases_100pct_pass
    - no_live_order_generated
    SHADOW_to_PILOT:
    - min_shadow_decisions_50
    - min_same_regime_samples_20
    - calibration_error_within_limit
    - rule_violation_rate_below_5pct
    PILOT_to_LIVE_LIMITED:
    - min_pilot_orders_50
    - after_cost_profit_positive
    - T5_hit_rate_ge_58pct
    - T20_hit_rate_ge_55pct
    - payoff_ratio_ge_1_3
    - implementation_shortfall_below_limit
    LIVE_LIMITED_to_LIVE_FULL:
    - min_live_limited_orders_100
    - max_drawdown_within_budget
    - tail_loss_within_CVaR_model
    - manual_override_rate_below_10pct
  automatic_demotion:
  - kill_switch_triggered
  - data_quarantine_rate_above_5pct
  - T5_hit_rate_below_50pct_for_30_trades
  - implementation_shortfall_above_2x_expected
  - renderer_contract_violation
  - unexpected_drawdown_breach
  change_control: Any formula, threshold, feature, or authority change requires version bump, migration note, golden case
    replay, and shadow comparison against prior version.
implementation_todo_v8_9:
  P0_stop_the_bleeding_before_any_live_order:
  - Archive v8.1~v8.8 historical blocks outside active runtime path.
  - Implement DecisionPacket schema and reject packets missing source/formula/asof/unit/hash.
  - Implement cash_ladder_engine_v8_9 and block all new buys when deployable_cash_krw <= 0 or d2-inclusive cash floor < 12.5%.
  - Implement portfolio_transition_optimizer_v8_9 with deterministic NO_TRADE fallback.
  - Implement renderer contract so narrative cannot upgrade canonical final_action.
  P1_optimizer_and_simulation:
  - Build state_vector constructor from holdings, cash, tax lots, sector graph, factor exposures, and macro regime probabilities.
  - Implement walk-forward and regime-matched bootstrap for CE70/CE90/CVaR outputs.
  - Add scenario shock matrix for adverse, liquidity drought, crisis, FX, and tax-cost cases.
  - Add transition-set enumeration with solver failure fallback and tie-breaker.
  - Compute post-trade MRC, CVaR, concentration, and cash floor for every candidate set.
  P2_sector_and_factor_cleanliness:
  - Create canonical sector IDs and ETF lookthrough exposure graph.
  - Residualize overlapping AI/semiconductor/power/industrial/defense betas to avoid double-counted conviction.
  - Add leader lifecycle promotion/demotion based on relative strength, volume quality, earnings revision, and distribution
    signals.
  - Block ETF buys when NAV, constituents, tracking error, or direct overlap data is missing.
  - Create sector_family cap checks pre-trade and post-trade.
  P3_sell_and_rebalance:
  - 'Implement sell waterfall: risk_exit -> cash_repair -> deconcentration -> profit_lock -> tax_loss_harvest -> hold.'
  - Implement Pareto lot selector with tax/cost/reentry/missed-upside penalties.
  - Make weekly and 1/11/21 checks mandatory but execute only if transition utility after tax/cost is positive or hard risk
    block is active.
  - Add weekly legacy-stock-to-CMA transfer plan as a planning input, not deployable cash before confirmation.
  - Separate cash repair review from new-buy review in output.
  P4_execution_and_feedback:
  - 'Add broker microstructure packet: tick size, spread, orderbook depth, trading halt, price limit, settlement calendar.'
  - Compile only LIMIT_SPLIT orders by default and revalidate before each slice.
  - Record every shadow/live decision in immutable ledger with T1/T5/T20 and MAE/MFE.
  - Add automatic kill switches for slippage, calibration, hit-rate, drawdown, and data quarantine.
  - Run golden cases before promoting any strategy state.
final_decision_policy_for_current_account_v8_9:
  basis: 원본 v8.8 파일 자체가 현재 계좌를 AUDIT_ONLY_OR_SHADOW_LEDGER_ONLY로 두고, 현금방어선/반도체 집중도/데이터 검증 문제를 우선 복구해야 한다고 명시한다.
  default_mode: AUDIT_ONLY_OR_SHADOW_LEDGER_ONLY
  global_final_action_now: NO_NEW_BUY
  allowed_reviews_now:
  - CASH_REPAIR_SELL_REVIEW
  - SEMICONDUCTOR_DECONCENTRATION_REVIEW
  - PROFIT_LOCK_REVIEW
  - WATCHLIST_SHADOW_ONLY
  forbidden_actions_now:
  - LIVE_BUY
  - SEMICONDUCTOR_ADD_BUY
  - AVERAGING_DOWN_BELOW_MA120
  - ETF_BUY_WITH_NAV_OR_CONSTITUENTS_MISSING
  - TRADE_WITHOUT_NUMERIC_PROVENANCE
  - TRADE_WITH_NEGATIVE_TRANSITION_UTILITY
  priority_order_now:
  - Recover D+2-inclusive cash floor to at least 12.5%.
  - Do not add semiconductor/HBM exposure while direct+ETF exposure is above cap or unverified.
  - Use sell waterfall only for cash repair, deconcentration, profit lock, or risk exit after tax/cost review.
  - Keep sector opportunities in SHADOW until data provenance, CE70/CE90/CVaR, ETF quality, and transition utility pass.
  - After repair, transition gradually toward 45~55% index core and diversified long-term allocation.
  plain_language_policy: 계좌 구조를 먼저 살리고, 그 다음에 수익을 노린다. 현금·집중도·데이터·실행 게이트가 통과되기 전 신규매수는 엔진 차원에서 차단한다.
migration_plan_from_v8_8_to_v8_9:
  step_1: Keep original v8.8 file as archived reference with source_sha256.
  step_2: Move only v8.9 active_runtime_contract sections into runtime canonical spec path.
  step_3: Map old reason codes to v8.9 reason codes and fail closed for unmapped codes.
  step_4: Replay v8.8 golden cases and add v8.9 cases for optimizer, simulation, sector overlap, and sell waterfall.
  step_5: Run shadow comparison for at least 50 decisions before any pilot/live promotion.
  rollback_condition: schema validation fail, golden case fail, renderer violation, or optimizer produces live order while
    execution_mode is AUDIT_ONLY/SHADOW
archived_v8_8_section_map:
  note: 원본 파일의 과거 섹션은 아래 범주로만 참조한다. 실행 우선권은 없다.
  source_top_level_keys:
  - meta
  - source_of_truth_and_governance
  - top_level_architecture
  - portfolio_policy
  - data_integrity_contract
  - execution_modes
  - engines
  - stress_tests_and_golden_cases
  - implementation_todo
  - final_decision_policy_for_current_account
  - brutal_audit_of_v8_1
  - decision_output_contract_v8_2
  - harness_validation_suite_v8_2
  - formula_registry_additions_v8_2
  - brutal_audit_of_v8_2
  - canonical_schema_contract_v8_3
  - data_reconciliation_and_quarantine_engine_v1
  - numeric_provenance_firewall_v3
  - trade_intent_taxonomy_v3
  - decision_dag_v8_3
  - reason_code_registry_v8_3
  - decision_output_contract_v8_3
  - formula_registry_additions_v8_3
  - harness_validation_suite_v8_3
  - implementation_todo_v8_3
  - brutal_audit_of_v8_3
  - canonical_decision_authority_matrix_v8_4
  - formula_first_numeric_contract_v8_4
  - edge_distribution_engine_v4
  - conflict_resolution_kernel_v1
  - canonical_entity_resolution_v1
  - data_quality_scorecard_v8_4
  - state_machine_invariants_v8_4
  - backtest_reality_and_leakage_harness_v2
  - portfolio_risk_budget_optimizer_v1
  - goal_proximity_hurdle_adjuster_v1
  - decision_dag_v8_4
  - decision_output_contract_v8_4
  - harness_validation_suite_v8_4
  - implementation_todo_v8_4
  - final_decision_policy_for_current_account_v8_4
  - brutal_audit_of_v8_4
  - sector_ontology_v8_5
  - sector_scoring_formula_registry_v8_5
  - sector_exposure_graph_engine_v8_5
  - sector_regime_playbook_v8_5
  - sector_data_integrity_firewall_v8_5
  - sector_conflict_resolution_kernel_v8_5
  - decision_dag_v8_5
  - decision_output_contract_v8_5
  - harness_validation_suite_v8_5
  - implementation_todo_v8_5
  - final_decision_policy_for_current_account_v8_5
  - brutal_audit_of_v8_5
  - sector_data_contract_v8_6
  - sector_ontology_v8_6
  - value_chain_propagation_engine_v8_6
  - leader_role_lifecycle_engine_v8_6
  - sector_scoring_formula_registry_v8_6
  - sector_edge_surface_engine_v8_6
  - sector_exposure_graph_engine_v8_6
  - sector_state_machine_v8_6
  - sector_conflict_resolution_kernel_v8_6
  - sector_regime_playbook_v8_6
  - decision_output_contract_v8_6
  - final_decision_policy_for_current_account_v8_6
  - harness_validation_suite_v8_6
  - implementation_todo_v8_6
  - brutal_audit_of_v8_6
  - investment_kernel_v8_7
  - portfolio_expected_utility_objective_v8_7
  - trade_vs_hold_decision_engine_v8_7
  - position_sizing_optimizer_v8_7
  - portfolio_construction_optimizer_v8_7
  - goal_distance_risk_dial_v8_7
  - tax_cost_aware_rebalance_engine_v8_7
  - regime_aware_investment_playbook_v8_7
  - sector_investment_overlay_v8_7
  - model_risk_and_overfit_control_v8_7
  - decision_output_contract_v8_7
  - harness_validation_suite_v8_7
  - implementation_todo_v8_7
  - final_decision_policy_for_current_account_v8_7
  - brutal_audit_of_v8_7
  - canonical_compiler_v8_8
  - portfolio_transition_optimizer_v8_8
  - expected_utility_surface_v8_8
  - dynamic_risk_budget_allocator_v8_8
  - cash_ladder_and_liquidity_reserve_engine_v8_8
  - sell_vs_hold_opportunity_cost_engine_v8_8
  - rebalancing_as_optimizer_v8_8
  - execution_plan_compiler_v8_8
  - learning_and_model_governance_v8_8
  - parsimony_budget_and_rule_pruning_engine_v8_8
  - formula_registry_additions_v8_8
  - decision_output_contract_v8_8
  - harness_validation_suite_v8_8
  - implementation_todo_v8_8
  - final_decision_policy_for_current_account_v8_8
  v8_8_active_sections_superseded:
  - canonical_compiler_v8_8
  - portfolio_transition_optimizer_v8_8
  - expected_utility_surface_v8_8
  - dynamic_risk_budget_allocator_v8_8
  - cash_ladder_and_liquidity_reserve_engine_v8_8
  - sell_vs_hold_opportunity_cost_engine_v8_8
  - rebalancing_as_optimizer_v8_8
  - execution_plan_compiler_v8_8
  - learning_and_model_governance_v8_8
  - decision_output_contract_v8_8
