From fee8131d5d1b21d60c3f94f93c107fb34195d26d Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Thu, 18 Jun 2026 01:48:00 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=B5=EC=8B=9D=20=EB=A0=88=EC=A7=80?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=EB=A6=AC=EC=99=80=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=EB=AC=BC=20=EB=8F=99=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../generated/absolute_risk_stop_v1.py | 4 +- .../generated/algorithm_guidance_proof_v1.py | 4 +- .../generated/alpha_evaluation_window_v1.py | 4 +- .../generated/alpha_feedback_loop_v1.py | 4 +- .../core/formulas/generated/anti_chase_v1.py | 4 +- .../generated/anti_chasing_velocity_v1.py | 4 +- .../generated/anti_late_entry_gate_v2.py | 4 +- .../generated/anti_whipsaw_gate_v1.py | 4 +- .../generated/artifact_freshness_gate_v1.py | 4 +- .../generated/audit_replay_snapshot_v1.py | 4 +- .../benchmark_relative_timeseries_v1.py | 4 +- .../formulas/generated/blank_cell_audit_v1.py | 4 +- .../generated/breakeven_ratchet_v1.py | 4 +- .../generated/breakout_failure_stop_v1.py | 10 + .../generated/breakout_quality_gate_v2.py | 4 +- .../canonical_artifact_resolver_v1.py | 4 +- .../generated/canonical_metrics_v1.py | 4 +- .../generated/capital_style_allocation_v1.py | 4 +- .../cash_creation_purpose_lock_v1.py | 4 +- .../core/formulas/generated/cash_floor_v1.py | 4 +- .../cash_raise_pareto_executor_v2.py | 4 +- .../cash_raise_value_optimizer_v3.py | 4 +- .../core/formulas/generated/cash_ratios_v1.py | 4 +- .../generated/cash_recovery_optimizer_v1.py | 4 +- .../generated/cash_recovery_optimizer_v4.py | 4 +- .../formulas/generated/cash_recovery_v1.py | 4 +- .../generated/cashflow_quality_signal_v1.py | 4 +- .../generated/cashflow_stability_gate_v1.py | 4 +- .../generated/cla_regime_exit_condition_v1.py | 4 +- .../formulas/generated/completion_gap_v1.py | 4 +- .../generated/composite_verdict_v1.py | 4 +- .../generated/comprehensive_proposal_v1.py | 4 +- .../generated/consecutive_streak_v1.py | 10 + .../continuous_evaluation_dashboard_v1.py | 4 +- .../generated/cross_section_consistency_v1.py | 4 +- .../generated/data_integrity_100_lock_v1.py | 4 +- .../generated/data_integrity_100_lock_v2.py | 4 +- .../generated/data_integrity_score_v1.py | 4 +- .../generated/data_maturity_truth_gate_v1.py | 4 +- .../data_maturity_truth_gate_validator_v1.py | 4 +- .../generated/data_quality_gate_v2_py.py | 4 +- .../generated/data_quality_gate_v3.py | 4 +- .../deterministic_routing_engine_v1.py | 4 +- .../distribution_sell_detector_v1.py | 4 +- .../formulas/generated/divergence_score_v1.py | 4 +- .../formulas/generated/drawdown_guard_v1.py | 4 +- .../generated/dynamic_heat_gate_v1.py | 4 +- .../earnings_growth_quality_gate_v1.py | 4 +- .../generated/earnings_quality_signal_v1.py | 4 +- .../formulas/generated/ecp_risk_scale_v1.py | 4 +- .../generated/ejce_divergence_audit_v1.py | 4 +- .../generated/ejce_view_renderer_v1.py | 4 +- .../entry_timing_decile_factor_v1.py | 4 +- .../generated/execution_capacity_ladder_v1.py | 10 + .../generated/execution_method_ladder_v1.py | 4 +- .../generated/execution_plan_compiler_v1.py | 10 + .../generated/execution_quality_score_v1.py | 4 +- .../formulas/generated/expected_edge_v1.py | 4 +- .../fifty_two_week_high_trigger_v1.py | 10 + .../generated/final_judgment_gate_v1.py | 4 +- .../generated/financial_health_score_v1.py | 4 +- .../generated/flow_acceleration_v1.py | 4 +- .../core/formulas/generated/flow_credit_v1.py | 4 +- .../follow_through_day_confirm_v1.py | 4 +- .../forecast_simulation_engine_v1.py | 10 + .../fundamental_multi_factor_score_v2.py | 4 +- .../generated/fundamental_multifactor_v3.py | 4 +- .../generated/fundamental_quality_gate_v1.py | 4 +- .../generated/fundamental_raw_ingest_v1.py | 4 +- .../generated/golden_cross_signal_v1.py | 10 + .../generated/growth_rate_signal_v1.py | 4 +- .../harness_data_freshness_gate_v1.py | 4 +- .../generated/heat_concentration_alert_v1.py | 4 +- .../generated/horizon_allocation_lock_v1.py | 4 +- .../generated/horizon_classification_v1.py | 4 +- .../generated/immutable_decision_ledger_v1.py | 10 + .../generated/intraday_action_matrix_v1.py | 4 +- .../investment_quality_headline_v1.py | 4 +- .../generated/k2_staged_rebound_sell_v1.py | 4 +- .../generated/leader_lifecycle_gate_v1.py | 10 + .../leader_position_weight_cap_v1.py | 4 +- .../generated/liquidity_flow_signal_v1.py | 4 +- .../llm_narrative_template_lock_v1.py | 4 +- .../generated/llm_serving_constraint_v1.py | 4 +- .../generated/macro_event_ticker_impact_v1.py | 4 +- .../generated/market_risk_score_v1.py | 4 +- .../market_share_momentum_proxy_v1.py | 4 +- .../generated/market_share_signal_v2.py | 4 +- .../market_weight_aware_cluster_gate_v1.py | 4 +- .../generated/mean_reversion_gate_v1.py | 4 +- .../model_governance_kill_switch_v1.py | 10 + .../generated/overhang_pressure_v1.py | 4 +- .../formulas/generated/oversold_delay_v1.py | 4 +- .../generated/pattern_blacklist_auto_v1.py | 4 +- .../core/formulas/generated/peg_score_v1.py | 4 +- ...ortfolio_alpha_confidence_per_ticker_v1.py | 4 +- .../generated/portfolio_band_status_v1.py | 4 +- .../formulas/generated/portfolio_beta_v1.py | 4 +- .../portfolio_correlation_gate_v1.py | 4 +- .../generated/portfolio_drawdown_gate_v1.py | 4 +- .../portfolio_transition_utility_v1.py | 10 + .../generated/position_count_limit_v1.py | 4 +- .../position_size_regime_scale_v1.py | 4 +- .../formulas/generated/position_size_v1.py | 4 +- .../prediction_accuracy_harness_v2.py | 4 +- .../predictive_alpha_report_lock_v2.py | 4 +- .../profit_giveback_ratchet_factor_v1.py | 4 +- .../generated/profit_lock_ratchet_v1.py | 4 +- .../generated/profit_lock_stage_v1.py | 4 +- .../generated/profit_ratchet_tiered_v2.py | 4 +- .../generated/pullback_entry_trigger_v1.py | 4 +- .../generated/ratchet_trailing_general_v1.py | 4 +- .../generated/rebalance_cadence_gate_v1.py | 10 + .../rebound_capture_thesis_factor_v1.py | 4 +- .../generated/regime_cash_uplift_v1.py | 4 +- .../regime_conditional_macro_factor_v1.py | 4 +- .../generated/regime_trim_guidance_v1.py | 4 +- .../generated/relative_underperf_alert_v1.py | 4 +- .../generated/replacement_alpha_gate_v1.py | 4 +- .../generated/risk_budget_cascade_v1.py | 4 +- .../routing_decision_explain_lock_v1.py | 4 +- .../routing_execution_log_table_v1.py | 4 +- .../routing_serving_decision_trace_v2.py | 4 +- .../core/formulas/generated/rs_momentum_v1.py | 4 +- .../core/formulas/generated/rs_ratio_v1.py | 4 +- .../core/formulas/generated/rs_verdict_v1.py | 4 +- .../core/formulas/generated/rs_verdict_v2.py | 4 +- .../satellite_aggregate_pnl_gate_v1.py | 4 +- .../satellite_alpha_quality_gate_v1.py | 4 +- .../generated/satellite_failure_gate_v1.py | 4 +- .../generated/satellite_lifecycle_gate_v1.py | 4 +- .../generated/scenario_shock_matrix_v1.py | 10 + .../core/formulas/generated/sea_timing_v1.py | 4 +- .../sector_concentration_limit_v1.py | 4 +- .../generated/sector_exposure_graph_v1.py | 10 + .../generated/sector_rotation_momentum_v1.py | 4 +- .../generated/sector_rotation_radar_v1.py | 4 +- .../generated/sell_execution_timing_v1.py | 4 +- .../generated/sell_lot_pareto_selector_v1.py | 10 + .../generated/sell_price_sanity_v1.py | 4 +- .../sell_slippage_budget_factor_v1.py | 4 +- .../sell_value_preservation_tiered_v2.py | 4 +- .../generated/sell_waterfall_engine_v1.py | 4 +- .../generated/sell_waterfall_engine_v2.py | 4 +- .../semiconductor_cluster_gate_v1.py | 4 +- .../single_position_weight_cap_v1.py | 4 +- .../generated/smart_cash_recovery_v3.py | 4 +- .../generated/smart_money_flow_signal_v2.py | 4 +- .../smart_money_liquidity_gate_v1.py | 4 +- .../generated/state_vector_constructor_v1.py | 10 + .../generated/stop_action_ladder_v1.py | 4 +- .../generated/stop_breach_alert_v1.py | 4 +- .../formulas/generated/stop_price_core_v1.py | 4 +- .../generated/stop_proposal_ladder_v1.py | 4 +- .../generated/strong_close_signal_v1.py | 10 + .../generated/take_profit_ladder_v1.py | 4 +- .../generated/take_profit_ladder_v2.py | 4 +- .../formulas/generated/target_cash_pct_v1.py | 4 +- .../formulas/generated/tick_normalizer_v1.py | 4 +- .../core/formulas/generated/total_heat_v1.py | 4 +- .../generated/trade_quality_from_t5_v1.py | 4 +- .../generated/trade_quality_scorer_v1.py | 4 +- .../generated/trailing_stop_price_v1.py | 4 +- .../generated/transition_set_enumerator_v1.py | 10 + .../generated/trend_filter_gate_v1.py | 10 + .../generated/value_preservation_scorer_v1.py | 4 +- .../core/formulas/generated/velocity_v1.py | 4 +- .../generated/verdict_consistency_lock_v1.py | 4 +- .../volatility_expansion_breakout_v1.py | 10 + .../generated/walk_forward_bootstrap_v1.py | 10 + .../weekly_legacy_transfer_plan_v1.py | 10 + runtime/refactor_baseline_v1.yaml | 8 +- .../breakout_failure_stop_v1.schema.json | 42 ++- .../consecutive_streak_v1.schema.json | 40 +- .../execution_capacity_ladder_v1.schema.json | 4 +- .../execution_plan_compiler_v1.schema.json | 42 ++- ...fifty_two_week_high_trigger_v1.schema.json | 41 ++- .../forecast_simulation_engine_v1.schema.json | 43 +++ .../golden_cross_signal_v1.schema.json | 43 ++- .../immutable_decision_ledger_v1.schema.json | 44 ++- .../leader_lifecycle_gate_v1.schema.json | 45 +++ ...odel_governance_kill_switch_v1.schema.json | 6 +- ...ortfolio_transition_utility_v1.schema.json | 44 +++ .../rebalance_cadence_gate_v1.schema.json | 42 ++- .../scenario_shock_matrix_v1.schema.json | 41 ++- .../sector_exposure_graph_v1.schema.json | 7 +- .../sell_lot_pareto_selector_v1.schema.json | 46 +++ .../state_vector_constructor_v1.schema.json | 47 ++- .../strong_close_signal_v1.schema.json | 42 ++- .../transition_set_enumerator_v1.schema.json | 41 ++- .../trend_filter_gate_v1.schema.json | 42 ++- ...latility_expansion_breakout_v1.schema.json | 42 ++- .../walk_forward_bootstrap_v1.schema.json | 42 ++- ...weekly_legacy_transfer_plan_v1.schema.json | 42 ++- .../formula_registry.normalized.yaml | 134 ++++++- spec/13_formula_registry.yaml | 342 ++++++++++++++++++ .../compile_formula_registry_v1.py | 4 +- ...reakout_failure_stop_v1_schema.schema.json | 42 ++- .../consecutive_streak_v1_schema.schema.json | 40 +- ...tion_capacity_ladder_v1_schema.schema.json | 4 +- ...cution_plan_compiler_v1_schema.schema.json | 42 ++- ...wo_week_high_trigger_v1_schema.schema.json | 41 ++- .../forecast_simulation_engine_v1_schema.py | 33 ++ ...st_simulation_engine_v1_schema.schema.json | 43 +++ .../golden_cross_signal_v1_schema.schema.json | 43 ++- ...able_decision_ledger_v1_schema.schema.json | 44 ++- .../leader_lifecycle_gate_v1_schema.py | 33 ++ ...eader_lifecycle_gate_v1_schema.schema.json | 45 +++ ...vernance_kill_switch_v1_schema.schema.json | 6 +- .../portfolio_transition_utility_v1_schema.py | 33 ++ ...o_transition_utility_v1_schema.schema.json | 44 +++ ...balance_cadence_gate_v1_schema.schema.json | 42 ++- ...cenario_shock_matrix_v1_schema.schema.json | 41 ++- ...ector_exposure_graph_v1_schema.schema.json | 7 +- .../sell_lot_pareto_selector_v1_schema.py | 33 ++ ..._lot_pareto_selector_v1_schema.schema.json | 46 +++ ...e_vector_constructor_v1_schema.schema.json | 47 ++- .../strong_close_signal_v1_schema.schema.json | 42 ++- ...ition_set_enumerator_v1_schema.schema.json | 41 ++- .../trend_filter_gate_v1_schema.schema.json | 42 ++- ...y_expansion_breakout_v1_schema.schema.json | 42 ++- ...lk_forward_bootstrap_v1_schema.schema.json | 42 ++- ...legacy_transfer_plan_v1_schema.schema.json | 42 ++- .../breakout_failure_stop_v1_golden.py | 40 +- .../generated/consecutive_streak_v1_golden.py | 42 +-- .../execution_capacity_ladder_v1_golden.py | 66 +--- .../execution_plan_compiler_v1_golden.py | 57 +-- .../fifty_two_week_high_trigger_v1_golden.py | 36 +- .../forecast_simulation_engine_v1_golden.py | 67 +--- .../golden_cross_signal_v1_golden.py | 36 +- .../immutable_decision_ledger_v1_golden.py | 65 +--- .../leader_lifecycle_gate_v1_golden.py | 9 + .../model_governance_kill_switch_v1_golden.py | 61 +--- .../portfolio_transition_utility_v1_golden.py | 9 + .../rebalance_cadence_gate_v1_golden.py | 62 +--- .../scenario_shock_matrix_v1_golden.py | 52 +-- .../sector_exposure_graph_v1_golden.py | 69 +--- .../sell_lot_pareto_selector_v1_golden.py | 9 + .../state_vector_constructor_v1_golden.py | 51 +-- .../strong_close_signal_v1_golden.py | 41 +-- .../transition_set_enumerator_v1_golden.py | 68 +--- .../generated/trend_filter_gate_v1_golden.py | 41 +-- ...volatility_expansion_breakout_v1_golden.py | 40 +- .../walk_forward_bootstrap_v1_golden.py | 65 +--- .../weekly_legacy_transfer_plan_v1_golden.py | 46 +-- tools/validate_formula_owner_coverage_v1.py | 27 +- tools/validate_formula_registry.py | 8 +- 247 files changed, 2690 insertions(+), 1469 deletions(-) create mode 100644 runtime/python/core/formulas/generated/breakout_failure_stop_v1.py create mode 100644 runtime/python/core/formulas/generated/consecutive_streak_v1.py create mode 100644 runtime/python/core/formulas/generated/execution_capacity_ladder_v1.py create mode 100644 runtime/python/core/formulas/generated/execution_plan_compiler_v1.py create mode 100644 runtime/python/core/formulas/generated/fifty_two_week_high_trigger_v1.py create mode 100644 runtime/python/core/formulas/generated/forecast_simulation_engine_v1.py create mode 100644 runtime/python/core/formulas/generated/golden_cross_signal_v1.py create mode 100644 runtime/python/core/formulas/generated/immutable_decision_ledger_v1.py create mode 100644 runtime/python/core/formulas/generated/leader_lifecycle_gate_v1.py create mode 100644 runtime/python/core/formulas/generated/model_governance_kill_switch_v1.py create mode 100644 runtime/python/core/formulas/generated/portfolio_transition_utility_v1.py create mode 100644 runtime/python/core/formulas/generated/rebalance_cadence_gate_v1.py create mode 100644 runtime/python/core/formulas/generated/scenario_shock_matrix_v1.py create mode 100644 runtime/python/core/formulas/generated/sector_exposure_graph_v1.py create mode 100644 runtime/python/core/formulas/generated/sell_lot_pareto_selector_v1.py create mode 100644 runtime/python/core/formulas/generated/state_vector_constructor_v1.py create mode 100644 runtime/python/core/formulas/generated/strong_close_signal_v1.py create mode 100644 runtime/python/core/formulas/generated/transition_set_enumerator_v1.py create mode 100644 runtime/python/core/formulas/generated/trend_filter_gate_v1.py create mode 100644 runtime/python/core/formulas/generated/volatility_expansion_breakout_v1.py create mode 100644 runtime/python/core/formulas/generated/walk_forward_bootstrap_v1.py create mode 100644 runtime/python/core/formulas/generated/weekly_legacy_transfer_plan_v1.py create mode 100644 schemas/generated/forecast_simulation_engine_v1.schema.json create mode 100644 schemas/generated/leader_lifecycle_gate_v1.schema.json create mode 100644 schemas/generated/portfolio_transition_utility_v1.schema.json create mode 100644 schemas/generated/sell_lot_pareto_selector_v1.schema.json create mode 100644 src/quant_engine/models/generated/forecast_simulation_engine_v1_schema.py create mode 100644 src/quant_engine/models/generated/forecast_simulation_engine_v1_schema.schema.json create mode 100644 src/quant_engine/models/generated/leader_lifecycle_gate_v1_schema.py create mode 100644 src/quant_engine/models/generated/leader_lifecycle_gate_v1_schema.schema.json create mode 100644 src/quant_engine/models/generated/portfolio_transition_utility_v1_schema.py create mode 100644 src/quant_engine/models/generated/portfolio_transition_utility_v1_schema.schema.json create mode 100644 src/quant_engine/models/generated/sell_lot_pareto_selector_v1_schema.py create mode 100644 src/quant_engine/models/generated/sell_lot_pareto_selector_v1_schema.schema.json create mode 100644 tests/golden/generated/leader_lifecycle_gate_v1_golden.py create mode 100644 tests/golden/generated/portfolio_transition_utility_v1_golden.py create mode 100644 tests/golden/generated/sell_lot_pareto_selector_v1_golden.py diff --git a/runtime/python/core/formulas/generated/absolute_risk_stop_v1.py b/runtime/python/core/formulas/generated/absolute_risk_stop_v1.py index cc2c530..c09eb0e 100644 --- a/runtime/python/core/formulas/generated/absolute_risk_stop_v1.py +++ b/runtime/python/core/formulas/generated/absolute_risk_stop_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ABSOLUTE_RISK_STOP_V1.""" FORMULA_ID = 'ABSOLUTE_RISK_STOP_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['holdings', 'df_map'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/algorithm_guidance_proof_v1.py b/runtime/python/core/formulas/generated/algorithm_guidance_proof_v1.py index c92ef2d..ed58e61 100644 --- a/runtime/python/core/formulas/generated/algorithm_guidance_proof_v1.py +++ b/runtime/python/core/formulas/generated/algorithm_guidance_proof_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ALGORITHM_GUIDANCE_PROOF_V1.""" FORMULA_ID = 'ALGORITHM_GUIDANCE_PROOF_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/alpha_evaluation_window_v1.py b/runtime/python/core/formulas/generated/alpha_evaluation_window_v1.py index badf392..698a0c5 100644 --- a/runtime/python/core/formulas/generated/alpha_evaluation_window_v1.py +++ b/runtime/python/core/formulas/generated/alpha_evaluation_window_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ALPHA_EVALUATION_WINDOW_V1.""" FORMULA_ID = 'ALPHA_EVALUATION_WINDOW_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['entry_date', 'position_class', 't20_return_pct', 't60_return_pct', 'benchmark_core_return_pct'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/alpha_feedback_loop_v1.py b/runtime/python/core/formulas/generated/alpha_feedback_loop_v1.py index a278233..60ca9f7 100644 --- a/runtime/python/core/formulas/generated/alpha_feedback_loop_v1.py +++ b/runtime/python/core/formulas/generated/alpha_feedback_loop_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ALPHA_FEEDBACK_LOOP_V1.""" FORMULA_ID = 'ALPHA_FEEDBACK_LOOP_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['alpha_evaluation_window_json', 'saqg_v1', 'brt_verdict', 'market_regime'] FORMULA_OUTPUT_FIELDS = [{'field': 'alpha_feedback_json', 'subfields': ['eligible_t20_fail_rate', 'eligible_t60_fail_rate', 'recommended_filter_adjustments', 'cases_analyzed']}] diff --git a/runtime/python/core/formulas/generated/anti_chase_v1.py b/runtime/python/core/formulas/generated/anti_chase_v1.py index b379871..f39e849 100644 --- a/runtime/python/core/formulas/generated/anti_chase_v1.py +++ b/runtime/python/core/formulas/generated/anti_chase_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ANTI_CHASE_V1.""" FORMULA_ID = 'ANTI_CHASE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/anti_chasing_velocity_v1.py b/runtime/python/core/formulas/generated/anti_chasing_velocity_v1.py index f65045f..8773e2b 100644 --- a/runtime/python/core/formulas/generated/anti_chasing_velocity_v1.py +++ b/runtime/python/core/formulas/generated/anti_chasing_velocity_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ANTI_CHASING_VELOCITY_V1.""" FORMULA_ID = 'ANTI_CHASING_VELOCITY_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['close', 'close_1d_ago', 'close_5d_ago', 'market_regime'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/anti_late_entry_gate_v2.py b/runtime/python/core/formulas/generated/anti_late_entry_gate_v2.py index 2c9ce6c..0c46526 100644 --- a/runtime/python/core/formulas/generated/anti_late_entry_gate_v2.py +++ b/runtime/python/core/formulas/generated/anti_late_entry_gate_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ANTI_LATE_ENTRY_GATE_V2.""" FORMULA_ID = 'ANTI_LATE_ENTRY_GATE_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/anti_whipsaw_gate_v1.py b/runtime/python/core/formulas/generated/anti_whipsaw_gate_v1.py index b5e16c9..dda9925 100644 --- a/runtime/python/core/formulas/generated/anti_whipsaw_gate_v1.py +++ b/runtime/python/core/formulas/generated/anti_whipsaw_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ANTI_WHIPSAW_GATE_V1.""" FORMULA_ID = 'ANTI_WHIPSAW_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['close_price', 'ma20', 'rsi14'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/artifact_freshness_gate_v1.py b/runtime/python/core/formulas/generated/artifact_freshness_gate_v1.py index 0f4a755..b313b45 100644 --- a/runtime/python/core/formulas/generated/artifact_freshness_gate_v1.py +++ b/runtime/python/core/formulas/generated/artifact_freshness_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ARTIFACT_FRESHNESS_GATE_V1.""" FORMULA_ID = 'ARTIFACT_FRESHNESS_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/audit_replay_snapshot_v1.py b/runtime/python/core/formulas/generated/audit_replay_snapshot_v1.py index be914a7..8474a15 100644 --- a/runtime/python/core/formulas/generated/audit_replay_snapshot_v1.py +++ b/runtime/python/core/formulas/generated/audit_replay_snapshot_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for AUDIT_REPLAY_SNAPSHOT_V1.""" FORMULA_ID = 'AUDIT_REPLAY_SNAPSHOT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/benchmark_relative_timeseries_v1.py b/runtime/python/core/formulas/generated/benchmark_relative_timeseries_v1.py index 5160102..dfff573 100644 --- a/runtime/python/core/formulas/generated/benchmark_relative_timeseries_v1.py +++ b/runtime/python/core/formulas/generated/benchmark_relative_timeseries_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for BENCHMARK_RELATIVE_TIMESERIES_V1.""" FORMULA_ID = 'BENCHMARK_RELATIVE_TIMESERIES_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['price.ret5D', 'price.ret20D', 'price.ret60D', 'price.close', 'high52w', 'globalKospiRet5D_', 'globalKospiRet20D_', 'globalKospiRet60D_', 'globalKospiDrawdown_'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/blank_cell_audit_v1.py b/runtime/python/core/formulas/generated/blank_cell_audit_v1.py index dc7d8a8..19342a9 100644 --- a/runtime/python/core/formulas/generated/blank_cell_audit_v1.py +++ b/runtime/python/core/formulas/generated/blank_cell_audit_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for BLANK_CELL_AUDIT_V1.""" FORMULA_ID = 'BLANK_CELL_AUDIT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['operational_report_json'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/breakeven_ratchet_v1.py b/runtime/python/core/formulas/generated/breakeven_ratchet_v1.py index eedb1fd..2247e7c 100644 --- a/runtime/python/core/formulas/generated/breakeven_ratchet_v1.py +++ b/runtime/python/core/formulas/generated/breakeven_ratchet_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for BREAKEVEN_RATCHET_V1.""" FORMULA_ID = 'BREAKEVEN_RATCHET_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['average_cost', 'highest_price_since_entry'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/breakout_failure_stop_v1.py b/runtime/python/core/formulas/generated/breakout_failure_stop_v1.py new file mode 100644 index 0000000..f912ba7 --- /dev/null +++ b/runtime/python/core/formulas/generated/breakout_failure_stop_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for BREAKOUT_FAILURE_STOP_V1.""" + +FORMULA_ID = 'BREAKOUT_FAILURE_STOP_V1' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['prior_high', 'close_price', 'days_since_breakout'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('BREAKOUT_FAILURE_STOP_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/breakout_quality_gate_v2.py b/runtime/python/core/formulas/generated/breakout_quality_gate_v2.py index d3bce5f..768345d 100644 --- a/runtime/python/core/formulas/generated/breakout_quality_gate_v2.py +++ b/runtime/python/core/formulas/generated/breakout_quality_gate_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for BREAKOUT_QUALITY_GATE_V2.""" FORMULA_ID = 'BREAKOUT_QUALITY_GATE_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['close', 'ma20', 'ret_3d', 'ret_1d', 'disparity', 'rsi14', 'volume', 'avg_volume_5d', 'timing_score_exit', 'distribution_risk_score', 'late_chase_risk_score'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/canonical_artifact_resolver_v1.py b/runtime/python/core/formulas/generated/canonical_artifact_resolver_v1.py index e182adb..0346593 100644 --- a/runtime/python/core/formulas/generated/canonical_artifact_resolver_v1.py +++ b/runtime/python/core/formulas/generated/canonical_artifact_resolver_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CANONICAL_ARTIFACT_RESOLVER_V1.""" FORMULA_ID = 'CANONICAL_ARTIFACT_RESOLVER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/canonical_metrics_v1.py b/runtime/python/core/formulas/generated/canonical_metrics_v1.py index 800c308..93572d2 100644 --- a/runtime/python/core/formulas/generated/canonical_metrics_v1.py +++ b/runtime/python/core/formulas/generated/canonical_metrics_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CANONICAL_METRICS_V1.""" FORMULA_ID = 'CANONICAL_METRICS_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/capital_style_allocation_v1.py b/runtime/python/core/formulas/generated/capital_style_allocation_v1.py index 43e9f10..94128a1 100644 --- a/runtime/python/core/formulas/generated/capital_style_allocation_v1.py +++ b/runtime/python/core/formulas/generated/capital_style_allocation_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CAPITAL_STYLE_ALLOCATION_V1.""" FORMULA_ID = 'CAPITAL_STYLE_ALLOCATION_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['smart_money_flow_signal_v2_json', 'fundamental_multifactor_v3_json', 'macro_event_ticker_impact_v1_json', 'liquidity_flow_signal_v1_json'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/cash_creation_purpose_lock_v1.py b/runtime/python/core/formulas/generated/cash_creation_purpose_lock_v1.py index 9611d34..4c2d2f6 100644 --- a/runtime/python/core/formulas/generated/cash_creation_purpose_lock_v1.py +++ b/runtime/python/core/formulas/generated/cash_creation_purpose_lock_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CASH_CREATION_PURPOSE_LOCK_V1.""" FORMULA_ID = 'CASH_CREATION_PURPOSE_LOCK_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['composite_verdict', 'rs_verdict', 'brt_verdict', 'excess_drawdown_pctp', 'recovery_ratio_20d', 'sfg_v1'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/cash_floor_v1.py b/runtime/python/core/formulas/generated/cash_floor_v1.py index 9c574fa..d47643e 100644 --- a/runtime/python/core/formulas/generated/cash_floor_v1.py +++ b/runtime/python/core/formulas/generated/cash_floor_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CASH_FLOOR_V1.""" FORMULA_ID = 'CASH_FLOOR_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['total_asset', 'settlement_cash_d2_krw', 'market_risk_score'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/cash_raise_pareto_executor_v2.py b/runtime/python/core/formulas/generated/cash_raise_pareto_executor_v2.py index 7394d18..c2e362a 100644 --- a/runtime/python/core/formulas/generated/cash_raise_pareto_executor_v2.py +++ b/runtime/python/core/formulas/generated/cash_raise_pareto_executor_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CASH_RAISE_PARETO_EXECUTOR_V2.""" FORMULA_ID = 'CASH_RAISE_PARETO_EXECUTOR_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/cash_raise_value_optimizer_v3.py b/runtime/python/core/formulas/generated/cash_raise_value_optimizer_v3.py index 01f4c10..1a01af8 100644 --- a/runtime/python/core/formulas/generated/cash_raise_value_optimizer_v3.py +++ b/runtime/python/core/formulas/generated/cash_raise_value_optimizer_v3.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CASH_RAISE_VALUE_OPTIMIZER_V3.""" FORMULA_ID = 'CASH_RAISE_VALUE_OPTIMIZER_V3' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/cash_ratios_v1.py b/runtime/python/core/formulas/generated/cash_ratios_v1.py index 175a987..835841c 100644 --- a/runtime/python/core/formulas/generated/cash_ratios_v1.py +++ b/runtime/python/core/formulas/generated/cash_ratios_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CASH_RATIOS_V1.""" FORMULA_ID = 'CASH_RATIOS_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['settlement_cash', 'reserved_order_amount', 'planned_buy_amount', 'sell_cash_proceeds_d2', 'total_asset'] FORMULA_OUTPUT_FIELDS = {'settlement_cash_ratio': 'settlement_cash / total_asset * 100', 'total_cash_ratio': 'settlement_cash / total_asset * 100', 'buy_power_cash': 'settlement_cash - reserved_order_amount', 'buy_power_ratio': '(settlement_cash - reserved_order_amount) / total_asset * 100', 'post_trade_total_cash_ratio': '(settlement_cash - planned_buy_amount + sell_cash_proceeds_d2) / total_asset * 100'} diff --git a/runtime/python/core/formulas/generated/cash_recovery_optimizer_v1.py b/runtime/python/core/formulas/generated/cash_recovery_optimizer_v1.py index 887a48d..44bf0ba 100644 --- a/runtime/python/core/formulas/generated/cash_recovery_optimizer_v1.py +++ b/runtime/python/core/formulas/generated/cash_recovery_optimizer_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CASH_RECOVERY_OPTIMIZER_V1.""" FORMULA_ID = 'CASH_RECOVERY_OPTIMIZER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['cash_shortfall_target_krw', 'cash_shortfall_min_krw', 'sell_candidates_json', 'immediate_sell_qty', 'sell_limit_price', 'holding_qty'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/cash_recovery_optimizer_v4.py b/runtime/python/core/formulas/generated/cash_recovery_optimizer_v4.py index 26bec59..034466c 100644 --- a/runtime/python/core/formulas/generated/cash_recovery_optimizer_v4.py +++ b/runtime/python/core/formulas/generated/cash_recovery_optimizer_v4.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CASH_RECOVERY_OPTIMIZER_V4.""" FORMULA_ID = 'CASH_RECOVERY_OPTIMIZER_V4' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/cash_recovery_v1.py b/runtime/python/core/formulas/generated/cash_recovery_v1.py index 4d12f42..83f133f 100644 --- a/runtime/python/core/formulas/generated/cash_recovery_v1.py +++ b/runtime/python/core/formulas/generated/cash_recovery_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CASH_RECOVERY_V1.""" FORMULA_ID = 'CASH_RECOVERY_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/cashflow_quality_signal_v1.py b/runtime/python/core/formulas/generated/cashflow_quality_signal_v1.py index 98e122b..8f28875 100644 --- a/runtime/python/core/formulas/generated/cashflow_quality_signal_v1.py +++ b/runtime/python/core/formulas/generated/cashflow_quality_signal_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CASHFLOW_QUALITY_SIGNAL_V1.""" FORMULA_ID = 'CASHFLOW_QUALITY_SIGNAL_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/cashflow_stability_gate_v1.py b/runtime/python/core/formulas/generated/cashflow_stability_gate_v1.py index 7015773..02fc63f 100644 --- a/runtime/python/core/formulas/generated/cashflow_stability_gate_v1.py +++ b/runtime/python/core/formulas/generated/cashflow_stability_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CASHFLOW_STABILITY_GATE_V1.""" FORMULA_ID = 'CASHFLOW_STABILITY_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['operating_cf_krw', 'free_cf_krw', 'accrual_ratio_pct'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/cla_regime_exit_condition_v1.py b/runtime/python/core/formulas/generated/cla_regime_exit_condition_v1.py index 8dfcbf8..8a3cb00 100644 --- a/runtime/python/core/formulas/generated/cla_regime_exit_condition_v1.py +++ b/runtime/python/core/formulas/generated/cla_regime_exit_condition_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CLA_REGIME_EXIT_CONDITION_V1.""" FORMULA_ID = 'CLA_REGIME_EXIT_CONDITION_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['ticker', 'rs_verdict', 'brt_verdict', 'frg_5d_sh', 'volume', 'avg_volume_5d', 'market_regime'] FORMULA_OUTPUT_FIELDS = [{'field': 'cla_exit_status', 'unit': 'enum [CLA_ACTIVE,CLA_EXIT_WARNING,CLA_EXIT_CONFIRMED]'}, {'field': 'cla_exit_signals_triggered', 'unit': 'list'}, {'field': 'cla_exit_total_weight', 'unit': 'int'}] diff --git a/runtime/python/core/formulas/generated/completion_gap_v1.py b/runtime/python/core/formulas/generated/completion_gap_v1.py index 5998fd8..737b2f6 100644 --- a/runtime/python/core/formulas/generated/completion_gap_v1.py +++ b/runtime/python/core/formulas/generated/completion_gap_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for COMPLETION_GAP_V1.""" FORMULA_ID = 'COMPLETION_GAP_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/composite_verdict_v1.py b/runtime/python/core/formulas/generated/composite_verdict_v1.py index 011d01a..690d425 100644 --- a/runtime/python/core/formulas/generated/composite_verdict_v1.py +++ b/runtime/python/core/formulas/generated/composite_verdict_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for COMPOSITE_VERDICT_V1.""" FORMULA_ID = 'COMPOSITE_VERDICT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['ss001_grade', 'rs_verdict'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/comprehensive_proposal_v1.py b/runtime/python/core/formulas/generated/comprehensive_proposal_v1.py index 8cd85de..e668972 100644 --- a/runtime/python/core/formulas/generated/comprehensive_proposal_v1.py +++ b/runtime/python/core/formulas/generated/comprehensive_proposal_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for COMPREHENSIVE_PROPOSAL_V1.""" FORMULA_ID = 'COMPREHENSIVE_PROPOSAL_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/consecutive_streak_v1.py b/runtime/python/core/formulas/generated/consecutive_streak_v1.py new file mode 100644 index 0000000..a9c492c --- /dev/null +++ b/runtime/python/core/formulas/generated/consecutive_streak_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for CONSECUTIVE_STREAK_V1.""" + +FORMULA_ID = 'CONSECUTIVE_STREAK_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['daily_close_changes'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('CONSECUTIVE_STREAK_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/continuous_evaluation_dashboard_v1.py b/runtime/python/core/formulas/generated/continuous_evaluation_dashboard_v1.py index 9badcc4..62d5310 100644 --- a/runtime/python/core/formulas/generated/continuous_evaluation_dashboard_v1.py +++ b/runtime/python/core/formulas/generated/continuous_evaluation_dashboard_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CONTINUOUS_EVALUATION_DASHBOARD_V1.""" FORMULA_ID = 'CONTINUOUS_EVALUATION_DASHBOARD_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/cross_section_consistency_v1.py b/runtime/python/core/formulas/generated/cross_section_consistency_v1.py index 69c90fc..ab83f1d 100644 --- a/runtime/python/core/formulas/generated/cross_section_consistency_v1.py +++ b/runtime/python/core/formulas/generated/cross_section_consistency_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for CROSS_SECTION_CONSISTENCY_V1.""" FORMULA_ID = 'CROSS_SECTION_CONSISTENCY_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/data_integrity_100_lock_v1.py b/runtime/python/core/formulas/generated/data_integrity_100_lock_v1.py index 674a58d..ea14f98 100644 --- a/runtime/python/core/formulas/generated/data_integrity_100_lock_v1.py +++ b/runtime/python/core/formulas/generated/data_integrity_100_lock_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DATA_INTEGRITY_100_LOCK_V1.""" FORMULA_ID = 'DATA_INTEGRITY_100_LOCK_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/data_integrity_100_lock_v2.py b/runtime/python/core/formulas/generated/data_integrity_100_lock_v2.py index 5c98364..0c2c011 100644 --- a/runtime/python/core/formulas/generated/data_integrity_100_lock_v2.py +++ b/runtime/python/core/formulas/generated/data_integrity_100_lock_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DATA_INTEGRITY_100_LOCK_V2.""" FORMULA_ID = 'DATA_INTEGRITY_100_LOCK_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/data_integrity_score_v1.py b/runtime/python/core/formulas/generated/data_integrity_score_v1.py index c612b49..2cb9d8d 100644 --- a/runtime/python/core/formulas/generated/data_integrity_score_v1.py +++ b/runtime/python/core/formulas/generated/data_integrity_score_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DATA_INTEGRITY_SCORE_V1.""" FORMULA_ID = 'DATA_INTEGRITY_SCORE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/data_maturity_truth_gate_v1.py b/runtime/python/core/formulas/generated/data_maturity_truth_gate_v1.py index f047700..e5d8627 100644 --- a/runtime/python/core/formulas/generated/data_maturity_truth_gate_v1.py +++ b/runtime/python/core/formulas/generated/data_maturity_truth_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DATA_MATURITY_TRUTH_GATE_V1.""" FORMULA_ID = 'DATA_MATURITY_TRUTH_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/data_maturity_truth_gate_validator_v1.py b/runtime/python/core/formulas/generated/data_maturity_truth_gate_validator_v1.py index 60d7e9a..f34128a 100644 --- a/runtime/python/core/formulas/generated/data_maturity_truth_gate_validator_v1.py +++ b/runtime/python/core/formulas/generated/data_maturity_truth_gate_validator_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DATA_MATURITY_TRUTH_GATE_VALIDATOR_V1.""" FORMULA_ID = 'DATA_MATURITY_TRUTH_GATE_VALIDATOR_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/data_quality_gate_v2_py.py b/runtime/python/core/formulas/generated/data_quality_gate_v2_py.py index e57d987..e7d1897 100644 --- a/runtime/python/core/formulas/generated/data_quality_gate_v2_py.py +++ b/runtime/python/core/formulas/generated/data_quality_gate_v2_py.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DATA_QUALITY_GATE_V2_PY.""" FORMULA_ID = 'DATA_QUALITY_GATE_V2_PY' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/data_quality_gate_v3.py b/runtime/python/core/formulas/generated/data_quality_gate_v3.py index 8b6d598..5b3cc04 100644 --- a/runtime/python/core/formulas/generated/data_quality_gate_v3.py +++ b/runtime/python/core/formulas/generated/data_quality_gate_v3.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DATA_QUALITY_GATE_V3.""" FORMULA_ID = 'DATA_QUALITY_GATE_V3' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/deterministic_routing_engine_v1.py b/runtime/python/core/formulas/generated/deterministic_routing_engine_v1.py index 3e5ca2f..a689c5b 100644 --- a/runtime/python/core/formulas/generated/deterministic_routing_engine_v1.py +++ b/runtime/python/core/formulas/generated/deterministic_routing_engine_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DETERMINISTIC_ROUTING_ENGINE_V1.""" FORMULA_ID = 'DETERMINISTIC_ROUTING_ENGINE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['harness_context'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/distribution_sell_detector_v1.py b/runtime/python/core/formulas/generated/distribution_sell_detector_v1.py index a521f82..f547022 100644 --- a/runtime/python/core/formulas/generated/distribution_sell_detector_v1.py +++ b/runtime/python/core/formulas/generated/distribution_sell_detector_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DISTRIBUTION_SELL_DETECTOR_V1.""" FORMULA_ID = 'DISTRIBUTION_SELL_DETECTOR_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['close', 'high52w', 'avg_volume_5d', 'volume', 'ret5d', 'flow_credit', 'frg_5d_sh', 'inst_5d_sh', 'rsi14', 'obv_slope_20d'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/divergence_score_v1.py b/runtime/python/core/formulas/generated/divergence_score_v1.py index 689074d..2525bcd 100644 --- a/runtime/python/core/formulas/generated/divergence_score_v1.py +++ b/runtime/python/core/formulas/generated/divergence_score_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DIVERGENCE_SCORE_V1.""" FORMULA_ID = 'DIVERGENCE_SCORE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['close_price', 'ma20', 'frg_5d_sh', 'inst_5d_sh', 'flow_credit', 'frg_20d_sh'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/drawdown_guard_v1.py b/runtime/python/core/formulas/generated/drawdown_guard_v1.py index a290b41..c642ab0 100644 --- a/runtime/python/core/formulas/generated/drawdown_guard_v1.py +++ b/runtime/python/core/formulas/generated/drawdown_guard_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DRAWDOWN_GUARD_V1.""" FORMULA_ID = 'DRAWDOWN_GUARD_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['win_loss_streak_state', 'win_loss_streak_buy_scale'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/dynamic_heat_gate_v1.py b/runtime/python/core/formulas/generated/dynamic_heat_gate_v1.py index 1b6548e..de9f619 100644 --- a/runtime/python/core/formulas/generated/dynamic_heat_gate_v1.py +++ b/runtime/python/core/formulas/generated/dynamic_heat_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for DYNAMIC_HEAT_GATE_V1.""" FORMULA_ID = 'DYNAMIC_HEAT_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['market_regime', 'total_heat_pct'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/earnings_growth_quality_gate_v1.py b/runtime/python/core/formulas/generated/earnings_growth_quality_gate_v1.py index 9b5bfa8..e161a24 100644 --- a/runtime/python/core/formulas/generated/earnings_growth_quality_gate_v1.py +++ b/runtime/python/core/formulas/generated/earnings_growth_quality_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for EARNINGS_GROWTH_QUALITY_GATE_V1.""" FORMULA_ID = 'EARNINGS_GROWTH_QUALITY_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['eps_growth_qoq_pct', 'eps_growth_yoy_pct'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/earnings_quality_signal_v1.py b/runtime/python/core/formulas/generated/earnings_quality_signal_v1.py index ec13ad7..13f92b6 100644 --- a/runtime/python/core/formulas/generated/earnings_quality_signal_v1.py +++ b/runtime/python/core/formulas/generated/earnings_quality_signal_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for EARNINGS_QUALITY_SIGNAL_V1.""" FORMULA_ID = 'EARNINGS_QUALITY_SIGNAL_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/ecp_risk_scale_v1.py b/runtime/python/core/formulas/generated/ecp_risk_scale_v1.py index 5346552..37a3d9e 100644 --- a/runtime/python/core/formulas/generated/ecp_risk_scale_v1.py +++ b/runtime/python/core/formulas/generated/ecp_risk_scale_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ECP_RISK_SCALE_V1.""" FORMULA_ID = 'ECP_RISK_SCALE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['total_asset', 'total_asset_ma10'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/ejce_divergence_audit_v1.py b/runtime/python/core/formulas/generated/ejce_divergence_audit_v1.py index c123dd1..c35d9d6 100644 --- a/runtime/python/core/formulas/generated/ejce_divergence_audit_v1.py +++ b/runtime/python/core/formulas/generated/ejce_divergence_audit_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for EJCE_DIVERGENCE_AUDIT_V1.""" FORMULA_ID = 'EJCE_DIVERGENCE_AUDIT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/ejce_view_renderer_v1.py b/runtime/python/core/formulas/generated/ejce_view_renderer_v1.py index ae0b48a..104110c 100644 --- a/runtime/python/core/formulas/generated/ejce_view_renderer_v1.py +++ b/runtime/python/core/formulas/generated/ejce_view_renderer_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for EJCE_VIEW_RENDERER_V1.""" FORMULA_ID = 'EJCE_VIEW_RENDERER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['ejce_json', 'alpha_lead_json', 'breakout_quality_gate_json', 'anti_chasing_velocity_json', 'heat_concentration_json', 'portfolio_alpha_confidence'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/entry_timing_decile_factor_v1.py b/runtime/python/core/formulas/generated/entry_timing_decile_factor_v1.py index 72b7db5..f5d2f93 100644 --- a/runtime/python/core/formulas/generated/entry_timing_decile_factor_v1.py +++ b/runtime/python/core/formulas/generated/entry_timing_decile_factor_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ENTRY_TIMING_DECILE_FACTOR_V1.""" FORMULA_ID = 'ENTRY_TIMING_DECILE_FACTOR_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['buy_timing_score', 't5_ledger', 'cut_decile'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/execution_capacity_ladder_v1.py b/runtime/python/core/formulas/generated/execution_capacity_ladder_v1.py new file mode 100644 index 0000000..9fa49b9 --- /dev/null +++ b/runtime/python/core/formulas/generated/execution_capacity_ladder_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for EXECUTION_CAPACITY_LADDER_V1.""" + +FORMULA_ID = 'EXECUTION_CAPACITY_LADDER_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['planned_order_amount_krw', 'avg_trade_value_20d_krw', 'intraday_trade_value_krw', 'orderbook_top3_depth_krw', 'spread_bps'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('EXECUTION_CAPACITY_LADDER_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/execution_method_ladder_v1.py b/runtime/python/core/formulas/generated/execution_method_ladder_v1.py index 52cfb1d..3834087 100644 --- a/runtime/python/core/formulas/generated/execution_method_ladder_v1.py +++ b/runtime/python/core/formulas/generated/execution_method_ladder_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for EXECUTION_METHOD_LADDER_V1.""" FORMULA_ID = 'EXECUTION_METHOD_LADDER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['sell_timing_verdict', 'sell_waterfall_gate', 'smart_cash_recovery_gate'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/execution_plan_compiler_v1.py b/runtime/python/core/formulas/generated/execution_plan_compiler_v1.py new file mode 100644 index 0000000..eafceac --- /dev/null +++ b/runtime/python/core/formulas/generated/execution_plan_compiler_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for EXECUTION_PLAN_COMPILER_V1.""" + +FORMULA_ID = 'EXECUTION_PLAN_COMPILER_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['order_capacity_krw', 'revalidation_snapshot', 'baseline_snapshot'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('EXECUTION_PLAN_COMPILER_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/execution_quality_score_v1.py b/runtime/python/core/formulas/generated/execution_quality_score_v1.py index b353701..e87e2bd 100644 --- a/runtime/python/core/formulas/generated/execution_quality_score_v1.py +++ b/runtime/python/core/formulas/generated/execution_quality_score_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for EXECUTION_QUALITY_SCORE_V1.""" FORMULA_ID = 'EXECUTION_QUALITY_SCORE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/expected_edge_v1.py b/runtime/python/core/formulas/generated/expected_edge_v1.py index 677ee5a..32f572d 100644 --- a/runtime/python/core/formulas/generated/expected_edge_v1.py +++ b/runtime/python/core/formulas/generated/expected_edge_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for EXPECTED_EDGE_V1.""" FORMULA_ID = 'EXPECTED_EDGE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['target_price', 'entry_price', 'stop_price', 'bayesian_confidence_multiplier', 'execution_cost_rate'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/fifty_two_week_high_trigger_v1.py b/runtime/python/core/formulas/generated/fifty_two_week_high_trigger_v1.py new file mode 100644 index 0000000..ac5ed38 --- /dev/null +++ b/runtime/python/core/formulas/generated/fifty_two_week_high_trigger_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for FIFTY_TWO_WEEK_HIGH_TRIGGER_V1.""" + +FORMULA_ID = 'FIFTY_TWO_WEEK_HIGH_TRIGGER_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['close_price', 'high52w'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('FIFTY_TWO_WEEK_HIGH_TRIGGER_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/final_judgment_gate_v1.py b/runtime/python/core/formulas/generated/final_judgment_gate_v1.py index 69b2e40..6bab94a 100644 --- a/runtime/python/core/formulas/generated/final_judgment_gate_v1.py +++ b/runtime/python/core/formulas/generated/final_judgment_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for FINAL_JUDGMENT_GATE_V1.""" FORMULA_ID = 'FINAL_JUDGMENT_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/financial_health_score_v1.py b/runtime/python/core/formulas/generated/financial_health_score_v1.py index 18b6344..a939adf 100644 --- a/runtime/python/core/formulas/generated/financial_health_score_v1.py +++ b/runtime/python/core/formulas/generated/financial_health_score_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for FINANCIAL_HEALTH_SCORE_V1.""" FORMULA_ID = 'FINANCIAL_HEALTH_SCORE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['roe_pct', 'operating_margin_pct', 'debt_to_equity', 'fcf_b', 'sector_type'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/flow_acceleration_v1.py b/runtime/python/core/formulas/generated/flow_acceleration_v1.py index 5b320ed..7cef3ca 100644 --- a/runtime/python/core/formulas/generated/flow_acceleration_v1.py +++ b/runtime/python/core/formulas/generated/flow_acceleration_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for FLOW_ACCELERATION_V1.""" FORMULA_ID = 'FLOW_ACCELERATION_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['frg_5d_sh', 'frg_20d_sh', 'close_price', 'ma20'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/flow_credit_v1.py b/runtime/python/core/formulas/generated/flow_credit_v1.py index 70a7fd4..d1f3a1b 100644 --- a/runtime/python/core/formulas/generated/flow_credit_v1.py +++ b/runtime/python/core/formulas/generated/flow_credit_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for FLOW_CREDIT_V1.""" FORMULA_ID = 'FLOW_CREDIT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['close_price', 'open_price', 'previous_close_price', 'volume', 'avg_volume_5d', 'frg_5d_sh', 'inst_5d_sh', 'flow_ok'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/follow_through_day_confirm_v1.py b/runtime/python/core/formulas/generated/follow_through_day_confirm_v1.py index a28fea2..ab968ae 100644 --- a/runtime/python/core/formulas/generated/follow_through_day_confirm_v1.py +++ b/runtime/python/core/formulas/generated/follow_through_day_confirm_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for FOLLOW_THROUGH_DAY_CONFIRM_V1.""" FORMULA_ID = 'FOLLOW_THROUGH_DAY_CONFIRM_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['days_since_breakout', 'ret_since_breakout', 'vol_today', 'vol_breakout_day', 'close', 'ma20'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/forecast_simulation_engine_v1.py b/runtime/python/core/formulas/generated/forecast_simulation_engine_v1.py new file mode 100644 index 0000000..a98bc5e --- /dev/null +++ b/runtime/python/core/formulas/generated/forecast_simulation_engine_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for FORECAST_SIMULATION_ENGINE_V1.""" + +FORMULA_ID = 'FORECAST_SIMULATION_ENGINE_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['net_profit_distribution_after_tax_fee_slippage', 'sample_count_total', 'sample_count_same_regime', 'execution_mode'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('FORECAST_SIMULATION_ENGINE_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/fundamental_multi_factor_score_v2.py b/runtime/python/core/formulas/generated/fundamental_multi_factor_score_v2.py index 9e73cc0..6a9b27c 100644 --- a/runtime/python/core/formulas/generated/fundamental_multi_factor_score_v2.py +++ b/runtime/python/core/formulas/generated/fundamental_multi_factor_score_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for FUNDAMENTAL_MULTI_FACTOR_SCORE_V2.""" FORMULA_ID = 'FUNDAMENTAL_MULTI_FACTOR_SCORE_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_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'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/fundamental_multifactor_v3.py b/runtime/python/core/formulas/generated/fundamental_multifactor_v3.py index fa99b61..12756ca 100644 --- a/runtime/python/core/formulas/generated/fundamental_multifactor_v3.py +++ b/runtime/python/core/formulas/generated/fundamental_multifactor_v3.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for FUNDAMENTAL_MULTIFACTOR_V3.""" FORMULA_ID = 'FUNDAMENTAL_MULTIFACTOR_V3' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/fundamental_quality_gate_v1.py b/runtime/python/core/formulas/generated/fundamental_quality_gate_v1.py index 912810a..615272d 100644 --- a/runtime/python/core/formulas/generated/fundamental_quality_gate_v1.py +++ b/runtime/python/core/formulas/generated/fundamental_quality_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for FUNDAMENTAL_QUALITY_GATE_V1.""" FORMULA_ID = 'FUNDAMENTAL_QUALITY_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['roe_pct', 'op_income_growth_pct', 'debt_ratio_pct', 'operating_cf_krw', 'pe_ttm'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/fundamental_raw_ingest_v1.py b/runtime/python/core/formulas/generated/fundamental_raw_ingest_v1.py index 27e7100..2fc1a8e 100644 --- a/runtime/python/core/formulas/generated/fundamental_raw_ingest_v1.py +++ b/runtime/python/core/formulas/generated/fundamental_raw_ingest_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for FUNDAMENTAL_RAW_INGEST_V1.""" FORMULA_ID = 'FUNDAMENTAL_RAW_INGEST_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/golden_cross_signal_v1.py b/runtime/python/core/formulas/generated/golden_cross_signal_v1.py new file mode 100644 index 0000000..a70e814 --- /dev/null +++ b/runtime/python/core/formulas/generated/golden_cross_signal_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for GOLDEN_CROSS_SIGNAL_V1.""" + +FORMULA_ID = 'GOLDEN_CROSS_SIGNAL_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['ma20', 'ma20_prev', 'ma60', 'ma60_prev'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('GOLDEN_CROSS_SIGNAL_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/growth_rate_signal_v1.py b/runtime/python/core/formulas/generated/growth_rate_signal_v1.py index a52ee6d..25faaf3 100644 --- a/runtime/python/core/formulas/generated/growth_rate_signal_v1.py +++ b/runtime/python/core/formulas/generated/growth_rate_signal_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for GROWTH_RATE_SIGNAL_V1.""" FORMULA_ID = 'GROWTH_RATE_SIGNAL_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/harness_data_freshness_gate_v1.py b/runtime/python/core/formulas/generated/harness_data_freshness_gate_v1.py index 717c942..6740859 100644 --- a/runtime/python/core/formulas/generated/harness_data_freshness_gate_v1.py +++ b/runtime/python/core/formulas/generated/harness_data_freshness_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for HARNESS_DATA_FRESHNESS_GATE_V1.""" FORMULA_ID = 'HARNESS_DATA_FRESHNESS_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['metadata.generated_at', 'metadata.market_date', 'today_date'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/heat_concentration_alert_v1.py b/runtime/python/core/formulas/generated/heat_concentration_alert_v1.py index 255d5a4..85ded12 100644 --- a/runtime/python/core/formulas/generated/heat_concentration_alert_v1.py +++ b/runtime/python/core/formulas/generated/heat_concentration_alert_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for HEAT_CONCENTRATION_ALERT_V1.""" FORMULA_ID = 'HEAT_CONCENTRATION_ALERT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['heat_share_pct'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/horizon_allocation_lock_v1.py b/runtime/python/core/formulas/generated/horizon_allocation_lock_v1.py index 5916684..1f45d68 100644 --- a/runtime/python/core/formulas/generated/horizon_allocation_lock_v1.py +++ b/runtime/python/core/formulas/generated/horizon_allocation_lock_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for HORIZON_ALLOCATION_LOCK_V1.""" FORMULA_ID = 'HORIZON_ALLOCATION_LOCK_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['invest_horizon', 'market_value_krw', 'total_asset_krw'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/horizon_classification_v1.py b/runtime/python/core/formulas/generated/horizon_classification_v1.py index e36458c..3e4e09b 100644 --- a/runtime/python/core/formulas/generated/horizon_classification_v1.py +++ b/runtime/python/core/formulas/generated/horizon_classification_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for HORIZON_CLASSIFICATION_V1.""" FORMULA_ID = 'HORIZON_CLASSIFICATION_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/immutable_decision_ledger_v1.py b/runtime/python/core/formulas/generated/immutable_decision_ledger_v1.py new file mode 100644 index 0000000..67a6b90 --- /dev/null +++ b/runtime/python/core/formulas/generated/immutable_decision_ledger_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for IMMUTABLE_DECISION_LEDGER_V1.""" + +FORMULA_ID = 'IMMUTABLE_DECISION_LEDGER_V1' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['decision_id', 'input_hash_bundle', 'execution_mode', 'candidate_ids', 'selected_transition_id'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('IMMUTABLE_DECISION_LEDGER_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/intraday_action_matrix_v1.py b/runtime/python/core/formulas/generated/intraday_action_matrix_v1.py index 534e500..ff4ecfc 100644 --- a/runtime/python/core/formulas/generated/intraday_action_matrix_v1.py +++ b/runtime/python/core/formulas/generated/intraday_action_matrix_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for INTRADAY_ACTION_MATRIX_V1.""" FORMULA_ID = 'INTRADAY_ACTION_MATRIX_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['capture_time', 'market_date'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/investment_quality_headline_v1.py b/runtime/python/core/formulas/generated/investment_quality_headline_v1.py index a68e071..918ad0b 100644 --- a/runtime/python/core/formulas/generated/investment_quality_headline_v1.py +++ b/runtime/python/core/formulas/generated/investment_quality_headline_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for INVESTMENT_QUALITY_HEADLINE_V1.""" FORMULA_ID = 'INVESTMENT_QUALITY_HEADLINE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/k2_staged_rebound_sell_v1.py b/runtime/python/core/formulas/generated/k2_staged_rebound_sell_v1.py index 767e229..a33c9db 100644 --- a/runtime/python/core/formulas/generated/k2_staged_rebound_sell_v1.py +++ b/runtime/python/core/formulas/generated/k2_staged_rebound_sell_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for K2_STAGED_REBOUND_SELL_V1.""" FORMULA_ID = 'K2_STAGED_REBOUND_SELL_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['base_sell_qty', 'previous_close_price', 'atr20'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/leader_lifecycle_gate_v1.py b/runtime/python/core/formulas/generated/leader_lifecycle_gate_v1.py new file mode 100644 index 0000000..43e4af8 --- /dev/null +++ b/runtime/python/core/formulas/generated/leader_lifecycle_gate_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for LEADER_LIFECYCLE_GATE_V1.""" + +FORMULA_ID = 'LEADER_LIFECYCLE_GATE_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['relative_strength_leads_sector', 'volume_quality_confirmed', 'above_ma60_or_reclaim_confirmed', 'earnings_revision_status', 'institutional_flow_status', 'current_role'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('LEADER_LIFECYCLE_GATE_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/leader_position_weight_cap_v1.py b/runtime/python/core/formulas/generated/leader_position_weight_cap_v1.py index 91c7aa2..e07dd97 100644 --- a/runtime/python/core/formulas/generated/leader_position_weight_cap_v1.py +++ b/runtime/python/core/formulas/generated/leader_position_weight_cap_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for LEADER_POSITION_WEIGHT_CAP_V1.""" FORMULA_ID = 'LEADER_POSITION_WEIGHT_CAP_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['single_position_weight_json', 'market_regime'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/liquidity_flow_signal_v1.py b/runtime/python/core/formulas/generated/liquidity_flow_signal_v1.py index 8679f7a..23f5e92 100644 --- a/runtime/python/core/formulas/generated/liquidity_flow_signal_v1.py +++ b/runtime/python/core/formulas/generated/liquidity_flow_signal_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for LIQUIDITY_FLOW_SIGNAL_V1.""" FORMULA_ID = 'LIQUIDITY_FLOW_SIGNAL_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/llm_narrative_template_lock_v1.py b/runtime/python/core/formulas/generated/llm_narrative_template_lock_v1.py index 376a395..3a9f759 100644 --- a/runtime/python/core/formulas/generated/llm_narrative_template_lock_v1.py +++ b/runtime/python/core/formulas/generated/llm_narrative_template_lock_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for LLM_NARRATIVE_TEMPLATE_LOCK_V1.""" FORMULA_ID = 'LLM_NARRATIVE_TEMPLATE_LOCK_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/llm_serving_constraint_v1.py b/runtime/python/core/formulas/generated/llm_serving_constraint_v1.py index 5fa9c7f..3a6667d 100644 --- a/runtime/python/core/formulas/generated/llm_serving_constraint_v1.py +++ b/runtime/python/core/formulas/generated/llm_serving_constraint_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for LLM_SERVING_CONSTRAINT_V1.""" FORMULA_ID = 'LLM_SERVING_CONSTRAINT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['harness_context'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/macro_event_ticker_impact_v1.py b/runtime/python/core/formulas/generated/macro_event_ticker_impact_v1.py index 25116f9..5501b3c 100644 --- a/runtime/python/core/formulas/generated/macro_event_ticker_impact_v1.py +++ b/runtime/python/core/formulas/generated/macro_event_ticker_impact_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for MACRO_EVENT_TICKER_IMPACT_V1.""" FORMULA_ID = 'MACRO_EVENT_TICKER_IMPACT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/market_risk_score_v1.py b/runtime/python/core/formulas/generated/market_risk_score_v1.py index 8493658..bd75f57 100644 --- a/runtime/python/core/formulas/generated/market_risk_score_v1.py +++ b/runtime/python/core/formulas/generated/market_risk_score_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for MARKET_RISK_SCORE_V1.""" FORMULA_ID = 'MARKET_RISK_SCORE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['vix_close', 'kospi_close', 'kospi_ma20', 'usd_krw', 'usd_jpy_2d_change_pct', 'credit_stress_status'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/market_share_momentum_proxy_v1.py b/runtime/python/core/formulas/generated/market_share_momentum_proxy_v1.py index c02ddb7..385e319 100644 --- a/runtime/python/core/formulas/generated/market_share_momentum_proxy_v1.py +++ b/runtime/python/core/formulas/generated/market_share_momentum_proxy_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for MARKET_SHARE_MOMENTUM_PROXY_V1.""" FORMULA_ID = 'MARKET_SHARE_MOMENTUM_PROXY_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['revenue_growth_pct', 'alpha_lead_score'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/market_share_signal_v2.py b/runtime/python/core/formulas/generated/market_share_signal_v2.py index 6fbe06f..81c1e1d 100644 --- a/runtime/python/core/formulas/generated/market_share_signal_v2.py +++ b/runtime/python/core/formulas/generated/market_share_signal_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for MARKET_SHARE_SIGNAL_V2.""" FORMULA_ID = 'MARKET_SHARE_SIGNAL_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/market_weight_aware_cluster_gate_v1.py b/runtime/python/core/formulas/generated/market_weight_aware_cluster_gate_v1.py index 336fc67..399d4dd 100644 --- a/runtime/python/core/formulas/generated/market_weight_aware_cluster_gate_v1.py +++ b/runtime/python/core/formulas/generated/market_weight_aware_cluster_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for MARKET_WEIGHT_AWARE_CLUSTER_GATE_V1.""" FORMULA_ID = 'MARKET_WEIGHT_AWARE_CLUSTER_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['semiconductor_cluster_json', 'market_regime'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/mean_reversion_gate_v1.py b/runtime/python/core/formulas/generated/mean_reversion_gate_v1.py index c2f4896..974e298 100644 --- a/runtime/python/core/formulas/generated/mean_reversion_gate_v1.py +++ b/runtime/python/core/formulas/generated/mean_reversion_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for MEAN_REVERSION_GATE_V1.""" FORMULA_ID = 'MEAN_REVERSION_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['close_price', 'ma20'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/model_governance_kill_switch_v1.py b/runtime/python/core/formulas/generated/model_governance_kill_switch_v1.py new file mode 100644 index 0000000..370fef3 --- /dev/null +++ b/runtime/python/core/formulas/generated/model_governance_kill_switch_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for MODEL_GOVERNANCE_KILL_SWITCH_V1.""" + +FORMULA_ID = 'MODEL_GOVERNANCE_KILL_SWITCH_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['data_quarantine_rate_pct', 'implementation_shortfall_ratio', 't5_hit_rate_pct', 't5_sample_count', 'calibration_error', 'calibration_error_limit', 'account_mdd_pct', 'account_mdd_budget_pct'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('MODEL_GOVERNANCE_KILL_SWITCH_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/overhang_pressure_v1.py b/runtime/python/core/formulas/generated/overhang_pressure_v1.py index 93e62ae..425636c 100644 --- a/runtime/python/core/formulas/generated/overhang_pressure_v1.py +++ b/runtime/python/core/formulas/generated/overhang_pressure_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for OVERHANG_PRESSURE_V1.""" FORMULA_ID = 'OVERHANG_PRESSURE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['frg_5d_sh', 'frg_20d_sh', 'volume', 'avg_volume_5d', 'flow_credit'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/oversold_delay_v1.py b/runtime/python/core/formulas/generated/oversold_delay_v1.py index eb8e85f..cea17c0 100644 --- a/runtime/python/core/formulas/generated/oversold_delay_v1.py +++ b/runtime/python/core/formulas/generated/oversold_delay_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for OVERSOLD_DELAY_V1.""" FORMULA_ID = 'OVERSOLD_DELAY_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['rsi_14', 'current_price', 'cash_shortfall_krw'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/pattern_blacklist_auto_v1.py b/runtime/python/core/formulas/generated/pattern_blacklist_auto_v1.py index e49bf6d..8299c8c 100644 --- a/runtime/python/core/formulas/generated/pattern_blacklist_auto_v1.py +++ b/runtime/python/core/formulas/generated/pattern_blacklist_auto_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PATTERN_BLACKLIST_AUTO_V1.""" FORMULA_ID = 'PATTERN_BLACKLIST_AUTO_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['trade_quality_json', 'monthly_history'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/peg_score_v1.py b/runtime/python/core/formulas/generated/peg_score_v1.py index 41f7f3b..4ac76f0 100644 --- a/runtime/python/core/formulas/generated/peg_score_v1.py +++ b/runtime/python/core/formulas/generated/peg_score_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PEG_SCORE_V1.""" FORMULA_ID = 'PEG_SCORE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['forward_pe', 'eps_growth_3y_cagr_pct', 'sector_median_forward_pe'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/portfolio_alpha_confidence_per_ticker_v1.py b/runtime/python/core/formulas/generated/portfolio_alpha_confidence_per_ticker_v1.py index 7c86996..43d3c0a 100644 --- a/runtime/python/core/formulas/generated/portfolio_alpha_confidence_per_ticker_v1.py +++ b/runtime/python/core/formulas/generated/portfolio_alpha_confidence_per_ticker_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PORTFOLIO_ALPHA_CONFIDENCE_PER_TICKER_V1.""" FORMULA_ID = 'PORTFOLIO_ALPHA_CONFIDENCE_PER_TICKER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/portfolio_band_status_v1.py b/runtime/python/core/formulas/generated/portfolio_band_status_v1.py index 87fc095..1c352a3 100644 --- a/runtime/python/core/formulas/generated/portfolio_band_status_v1.py +++ b/runtime/python/core/formulas/generated/portfolio_band_status_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PORTFOLIO_BAND_STATUS_V1.""" FORMULA_ID = 'PORTFOLIO_BAND_STATUS_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['current_weight_pct', 'target_band_min_pct', 'target_band_max_pct'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/portfolio_beta_v1.py b/runtime/python/core/formulas/generated/portfolio_beta_v1.py index 2cda33e..3db18cf 100644 --- a/runtime/python/core/formulas/generated/portfolio_beta_v1.py +++ b/runtime/python/core/formulas/generated/portfolio_beta_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PORTFOLIO_BETA_V1.""" FORMULA_ID = 'PORTFOLIO_BETA_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['beta_i', 'market_value_i', 'total_equity_value'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/portfolio_correlation_gate_v1.py b/runtime/python/core/formulas/generated/portfolio_correlation_gate_v1.py index 7802351..e0786c3 100644 --- a/runtime/python/core/formulas/generated/portfolio_correlation_gate_v1.py +++ b/runtime/python/core/formulas/generated/portfolio_correlation_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PORTFOLIO_CORRELATION_GATE_V1.""" FORMULA_ID = 'PORTFOLIO_CORRELATION_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['ticker', 'price.ret20D', 'beta_proxy', 'weight_pct'] FORMULA_OUTPUT_FIELDS = [{'field': 'satellite_cluster_beta'}, {'field': 'effective_portfolio_beta'}, {'field': 'high_corr_pairs', 'unit': 'list [{ticker1,ticker2,corr_coef}]'}, {'field': 'correlation_gate_status', 'unit': 'enum [CORRELATION_PASS,CORRELATION_WARN,CORRELATION_BLOCK]'}] diff --git a/runtime/python/core/formulas/generated/portfolio_drawdown_gate_v1.py b/runtime/python/core/formulas/generated/portfolio_drawdown_gate_v1.py index 427d909..9cd4ed9 100644 --- a/runtime/python/core/formulas/generated/portfolio_drawdown_gate_v1.py +++ b/runtime/python/core/formulas/generated/portfolio_drawdown_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PORTFOLIO_DRAWDOWN_GATE_V1.""" FORMULA_ID = 'PORTFOLIO_DRAWDOWN_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['portfolio_peak_krw', 'total_asset_krw'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/portfolio_transition_utility_v1.py b/runtime/python/core/formulas/generated/portfolio_transition_utility_v1.py new file mode 100644 index 0000000..34247eb --- /dev/null +++ b/runtime/python/core/formulas/generated/portfolio_transition_utility_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for PORTFOLIO_TRANSITION_UTILITY_V1.""" + +FORMULA_ID = 'PORTFOLIO_TRANSITION_UTILITY_V1' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['ce70_net_profit_krw', 'tax_fee_slippage_krw', 'cash_repair_benefit_krw', 'concentration_reduction_benefit_krw', 'turnover_penalty_krw'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('PORTFOLIO_TRANSITION_UTILITY_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/position_count_limit_v1.py b/runtime/python/core/formulas/generated/position_count_limit_v1.py index 05f49ba..dd52398 100644 --- a/runtime/python/core/formulas/generated/position_count_limit_v1.py +++ b/runtime/python/core/formulas/generated/position_count_limit_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for POSITION_COUNT_LIMIT_V1.""" FORMULA_ID = 'POSITION_COUNT_LIMIT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['position_count', 'market_regime'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/position_size_regime_scale_v1.py b/runtime/python/core/formulas/generated/position_size_regime_scale_v1.py index 2812c9e..b7c56e7 100644 --- a/runtime/python/core/formulas/generated/position_size_regime_scale_v1.py +++ b/runtime/python/core/formulas/generated/position_size_regime_scale_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for POSITION_SIZE_REGIME_SCALE_V1.""" FORMULA_ID = 'POSITION_SIZE_REGIME_SCALE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['market_regime'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/position_size_v1.py b/runtime/python/core/formulas/generated/position_size_v1.py index b2b8dd1..a9c4331 100644 --- a/runtime/python/core/formulas/generated/position_size_v1.py +++ b/runtime/python/core/formulas/generated/position_size_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for POSITION_SIZE_V1.""" FORMULA_ID = 'POSITION_SIZE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['total_asset', 'final_risk_budget', 'atr20', 'atr_multiplier', 'available_cash', 'entry_price', 'target_weight_limit_amount', 'sector_limit_amount', 'liquidity_limit_amount'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/prediction_accuracy_harness_v2.py b/runtime/python/core/formulas/generated/prediction_accuracy_harness_v2.py index aa46c6c..c0d1159 100644 --- a/runtime/python/core/formulas/generated/prediction_accuracy_harness_v2.py +++ b/runtime/python/core/formulas/generated/prediction_accuracy_harness_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PREDICTION_ACCURACY_HARNESS_V2.""" FORMULA_ID = 'PREDICTION_ACCURACY_HARNESS_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'data_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/predictive_alpha_report_lock_v2.py b/runtime/python/core/formulas/generated/predictive_alpha_report_lock_v2.py index 8fa471a..a7253f4 100644 --- a/runtime/python/core/formulas/generated/predictive_alpha_report_lock_v2.py +++ b/runtime/python/core/formulas/generated/predictive_alpha_report_lock_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PREDICTIVE_ALPHA_REPORT_LOCK_V2.""" FORMULA_ID = 'PREDICTIVE_ALPHA_REPORT_LOCK_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/profit_giveback_ratchet_factor_v1.py b/runtime/python/core/formulas/generated/profit_giveback_ratchet_factor_v1.py index 0e27a9a..1edf436 100644 --- a/runtime/python/core/formulas/generated/profit_giveback_ratchet_factor_v1.py +++ b/runtime/python/core/formulas/generated/profit_giveback_ratchet_factor_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PROFIT_GIVEBACK_RATCHET_FACTOR_V1.""" FORMULA_ID = 'PROFIT_GIVEBACK_RATCHET_FACTOR_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['prev_trail_stop', 'high_since_entry', 'atr20', 'market_regime', 'profit_pct'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/profit_lock_ratchet_v1.py b/runtime/python/core/formulas/generated/profit_lock_ratchet_v1.py index 0d4feb5..4ba71c4 100644 --- a/runtime/python/core/formulas/generated/profit_lock_ratchet_v1.py +++ b/runtime/python/core/formulas/generated/profit_lock_ratchet_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PROFIT_LOCK_RATCHET_V1.""" FORMULA_ID = 'PROFIT_LOCK_RATCHET_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['average_cost', 'tier_completed', 'highest_price_since_entry', 'atr20'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/profit_lock_stage_v1.py b/runtime/python/core/formulas/generated/profit_lock_stage_v1.py index 0a62c81..4f1230c 100644 --- a/runtime/python/core/formulas/generated/profit_lock_stage_v1.py +++ b/runtime/python/core/formulas/generated/profit_lock_stage_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PROFIT_LOCK_STAGE_V1.""" FORMULA_ID = 'PROFIT_LOCK_STAGE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['profit_pct'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/profit_ratchet_tiered_v2.py b/runtime/python/core/formulas/generated/profit_ratchet_tiered_v2.py index 779e975..9403b1c 100644 --- a/runtime/python/core/formulas/generated/profit_ratchet_tiered_v2.py +++ b/runtime/python/core/formulas/generated/profit_ratchet_tiered_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PROFIT_RATCHET_TIERED_V2.""" FORMULA_ID = 'PROFIT_RATCHET_TIERED_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['profit_pct', 'profit_lock_stage', 'highest_close', 'atr20', 'average_cost', 'quantity', 'secular_leader_gate_active'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/pullback_entry_trigger_v1.py b/runtime/python/core/formulas/generated/pullback_entry_trigger_v1.py index 71d627e..8d32bef 100644 --- a/runtime/python/core/formulas/generated/pullback_entry_trigger_v1.py +++ b/runtime/python/core/formulas/generated/pullback_entry_trigger_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for PULLBACK_ENTRY_TRIGGER_V1.""" FORMULA_ID = 'PULLBACK_ENTRY_TRIGGER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['velocity_1d', 'close', 'ma20', 'volume', 'avg_volume_5d', 'alpha_lead_score', 'anti_chasing_status'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/ratchet_trailing_general_v1.py b/runtime/python/core/formulas/generated/ratchet_trailing_general_v1.py index 69bec06..2dd3af7 100644 --- a/runtime/python/core/formulas/generated/ratchet_trailing_general_v1.py +++ b/runtime/python/core/formulas/generated/ratchet_trailing_general_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for RATCHET_TRAILING_GENERAL_V1.""" FORMULA_ID = 'RATCHET_TRAILING_GENERAL_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['Profit_Pct', 'Close', 'ATR20', 'High52W', 'Stop_Price_Est', 'Account_Avg_Cost'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/rebalance_cadence_gate_v1.py b/runtime/python/core/formulas/generated/rebalance_cadence_gate_v1.py new file mode 100644 index 0000000..d022480 --- /dev/null +++ b/runtime/python/core/formulas/generated/rebalance_cadence_gate_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for REBALANCE_CADENCE_GATE_V1.""" + +FORMULA_ID = 'REBALANCE_CADENCE_GATE_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['today_date', 'transition_utility_after_tax_cost_krw', 'hard_risk_block_active'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('REBALANCE_CADENCE_GATE_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/rebound_capture_thesis_factor_v1.py b/runtime/python/core/formulas/generated/rebound_capture_thesis_factor_v1.py index 5b24379..c6fabcb 100644 --- a/runtime/python/core/formulas/generated/rebound_capture_thesis_factor_v1.py +++ b/runtime/python/core/formulas/generated/rebound_capture_thesis_factor_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for REBOUND_CAPTURE_THESIS_FACTOR_V1.""" FORMULA_ID = 'REBOUND_CAPTURE_THESIS_FACTOR_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['rsi14', 'current_price', 'ma20', 'flow_credit', 'down_streak'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/regime_cash_uplift_v1.py b/runtime/python/core/formulas/generated/regime_cash_uplift_v1.py index 01d014d..ce3a980 100644 --- a/runtime/python/core/formulas/generated/regime_cash_uplift_v1.py +++ b/runtime/python/core/formulas/generated/regime_cash_uplift_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for REGIME_CASH_UPLIFT_V1.""" FORMULA_ID = 'REGIME_CASH_UPLIFT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['market_regime', 'market_risk_score'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/regime_conditional_macro_factor_v1.py b/runtime/python/core/formulas/generated/regime_conditional_macro_factor_v1.py index 7e81afe..a0474b6 100644 --- a/runtime/python/core/formulas/generated/regime_conditional_macro_factor_v1.py +++ b/runtime/python/core/formulas/generated/regime_conditional_macro_factor_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for REGIME_CONDITIONAL_MACRO_FACTOR_V1.""" FORMULA_ID = 'REGIME_CONDITIONAL_MACRO_FACTOR_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['base_macro_score', 'ticker', 'ticker_type'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/regime_trim_guidance_v1.py b/runtime/python/core/formulas/generated/regime_trim_guidance_v1.py index 417dcd7..84a16aa 100644 --- a/runtime/python/core/formulas/generated/regime_trim_guidance_v1.py +++ b/runtime/python/core/formulas/generated/regime_trim_guidance_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for REGIME_TRIM_GUIDANCE_V1.""" FORMULA_ID = 'REGIME_TRIM_GUIDANCE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['regime_adjusted_sell_priority_json', 'market_regime'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/relative_underperf_alert_v1.py b/runtime/python/core/formulas/generated/relative_underperf_alert_v1.py index f44f0f7..96a650e 100644 --- a/runtime/python/core/formulas/generated/relative_underperf_alert_v1.py +++ b/runtime/python/core/formulas/generated/relative_underperf_alert_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for RELATIVE_UNDERPERF_ALERT_V1.""" FORMULA_ID = 'RELATIVE_UNDERPERF_ALERT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['holdings', 'df_map', 'kospi_ret20d'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/replacement_alpha_gate_v1.py b/runtime/python/core/formulas/generated/replacement_alpha_gate_v1.py index ea04dd7..0337d7a 100644 --- a/runtime/python/core/formulas/generated/replacement_alpha_gate_v1.py +++ b/runtime/python/core/formulas/generated/replacement_alpha_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for REPLACEMENT_ALPHA_GATE_V1.""" FORMULA_ID = 'REPLACEMENT_ALPHA_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['rs_verdict', 'ss001_grade', 'excess_ret_10d', 'portfolioStats.coreAvgSS001'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/risk_budget_cascade_v1.py b/runtime/python/core/formulas/generated/risk_budget_cascade_v1.py index 51e1806..cac4fdc 100644 --- a/runtime/python/core/formulas/generated/risk_budget_cascade_v1.py +++ b/runtime/python/core/formulas/generated/risk_budget_cascade_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for RISK_BUDGET_CASCADE_V1.""" FORMULA_ID = 'RISK_BUDGET_CASCADE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['base_risk_budget', 'net_return_feedback_multiplier', 'performance_brake_multiplier', 'regime_reset_multiplier', 'bayesian_confidence_multiplier', 'kelly_brake_multiplier'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/routing_decision_explain_lock_v1.py b/runtime/python/core/formulas/generated/routing_decision_explain_lock_v1.py index f04b955..8eaa400 100644 --- a/runtime/python/core/formulas/generated/routing_decision_explain_lock_v1.py +++ b/runtime/python/core/formulas/generated/routing_decision_explain_lock_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ROUTING_DECISION_EXPLAIN_LOCK_V1.""" FORMULA_ID = 'ROUTING_DECISION_EXPLAIN_LOCK_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['export_gate_json'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/routing_execution_log_table_v1.py b/runtime/python/core/formulas/generated/routing_execution_log_table_v1.py index 6cbe8d0..51c9359 100644 --- a/runtime/python/core/formulas/generated/routing_execution_log_table_v1.py +++ b/runtime/python/core/formulas/generated/routing_execution_log_table_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ROUTING_EXECUTION_LOG_TABLE_V1.""" FORMULA_ID = 'ROUTING_EXECUTION_LOG_TABLE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['routing_execution_log', '_harness_context'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/routing_serving_decision_trace_v2.py b/runtime/python/core/formulas/generated/routing_serving_decision_trace_v2.py index 2619d5d..8055caa 100644 --- a/runtime/python/core/formulas/generated/routing_serving_decision_trace_v2.py +++ b/runtime/python/core/formulas/generated/routing_serving_decision_trace_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for ROUTING_SERVING_DECISION_TRACE_V2.""" FORMULA_ID = 'ROUTING_SERVING_DECISION_TRACE_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['routing_trace_json', 'export_gate_json'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/rs_momentum_v1.py b/runtime/python/core/formulas/generated/rs_momentum_v1.py index b36c778..bf172a1 100644 --- a/runtime/python/core/formulas/generated/rs_momentum_v1.py +++ b/runtime/python/core/formulas/generated/rs_momentum_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for RS_MOMENTUM_V1.""" FORMULA_ID = 'RS_MOMENTUM_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['close_price', 'ma20', 'avg_trade_value_5d', 'avg_trade_value_20d', 'relative_strength_1m_percentile'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/rs_ratio_v1.py b/runtime/python/core/formulas/generated/rs_ratio_v1.py index 9309a5a..9397f02 100644 --- a/runtime/python/core/formulas/generated/rs_ratio_v1.py +++ b/runtime/python/core/formulas/generated/rs_ratio_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for RS_RATIO_V1.""" FORMULA_ID = 'RS_RATIO_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['stock_close_5d_return', 'kospi_close_5d_return'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/rs_verdict_v1.py b/runtime/python/core/formulas/generated/rs_verdict_v1.py index 629b06a..cb28999 100644 --- a/runtime/python/core/formulas/generated/rs_verdict_v1.py +++ b/runtime/python/core/formulas/generated/rs_verdict_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for RS_VERDICT_V1.""" FORMULA_ID = 'RS_VERDICT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['price.ret10D', 'globalKospiRet10D_', 'rw_partial', 'flow_credit'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/rs_verdict_v2.py b/runtime/python/core/formulas/generated/rs_verdict_v2.py index c3e9b11..f52b845 100644 --- a/runtime/python/core/formulas/generated/rs_verdict_v2.py +++ b/runtime/python/core/formulas/generated/rs_verdict_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for RS_VERDICT_V2.""" FORMULA_ID = 'RS_VERDICT_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['rs_verdict_v1_raw', 'brt_verdict'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/satellite_aggregate_pnl_gate_v1.py b/runtime/python/core/formulas/generated/satellite_aggregate_pnl_gate_v1.py index 41800ec..4eb4769 100644 --- a/runtime/python/core/formulas/generated/satellite_aggregate_pnl_gate_v1.py +++ b/runtime/python/core/formulas/generated/satellite_aggregate_pnl_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SATELLITE_AGGREGATE_PNL_GATE_V1.""" FORMULA_ID = 'SATELLITE_AGGREGATE_PNL_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['position_class', 'profit_loss'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/satellite_alpha_quality_gate_v1.py b/runtime/python/core/formulas/generated/satellite_alpha_quality_gate_v1.py index ad828c5..51e1556 100644 --- a/runtime/python/core/formulas/generated/satellite_alpha_quality_gate_v1.py +++ b/runtime/python/core/formulas/generated/satellite_alpha_quality_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SATELLITE_ALPHA_QUALITY_GATE_V1.""" FORMULA_ID = 'SATELLITE_ALPHA_QUALITY_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['position_class', 'ss001_grade', 'price.ret20D', 'globalKospiRet20D_', 'recovery_ratio_20d', 'recovery_ratio_5d', 'excess_drawdown_pctp', 'frg_5d_sh', 'inst_5d_sh', 'rs_verdict'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/satellite_failure_gate_v1.py b/runtime/python/core/formulas/generated/satellite_failure_gate_v1.py index 27339c8..0969653 100644 --- a/runtime/python/core/formulas/generated/satellite_failure_gate_v1.py +++ b/runtime/python/core/formulas/generated/satellite_failure_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SATELLITE_FAILURE_GATE_V1.""" FORMULA_ID = 'SATELLITE_FAILURE_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['satellite_holdings[].composite_verdict', 'satellite_holdings[].rs_verdict', 'satellite_holdings[].ret20d', 'satellite_holdings[].excess_ret_10d'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/satellite_lifecycle_gate_v1.py b/runtime/python/core/formulas/generated/satellite_lifecycle_gate_v1.py index 7a21b81..f25a418 100644 --- a/runtime/python/core/formulas/generated/satellite_lifecycle_gate_v1.py +++ b/runtime/python/core/formulas/generated/satellite_lifecycle_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SATELLITE_LIFECYCLE_GATE_V1.""" FORMULA_ID = 'SATELLITE_LIFECYCLE_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['ticker', 'composite_verdict', 'brt_verdict', 'excess_drawdown_pctp', 'entry_date', 'alpha_evaluation_window_json'] FORMULA_OUTPUT_FIELDS = [{'field': 'satellite_lifecycle_stage', 'unit': 'enum [WATCH,PILOT,CONFIRMED,REVIEW,EXIT]'}, {'field': 'lifecycle_transition_reason', 'unit': 'string'}, {'field': 'lifecycle_days_in_stage', 'unit': 'int'}] diff --git a/runtime/python/core/formulas/generated/scenario_shock_matrix_v1.py b/runtime/python/core/formulas/generated/scenario_shock_matrix_v1.py new file mode 100644 index 0000000..54f61ab --- /dev/null +++ b/runtime/python/core/formulas/generated/scenario_shock_matrix_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for SCENARIO_SHOCK_MATRIX_V1.""" + +FORMULA_ID = 'SCENARIO_SHOCK_MATRIX_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['net_profit_distribution_after_tax_fee_slippage', 'scenario_id'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('SCENARIO_SHOCK_MATRIX_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/sea_timing_v1.py b/runtime/python/core/formulas/generated/sea_timing_v1.py index 430491f..cc8414d 100644 --- a/runtime/python/core/formulas/generated/sea_timing_v1.py +++ b/runtime/python/core/formulas/generated/sea_timing_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SEA_TIMING_V1.""" FORMULA_ID = 'SEA_TIMING_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['current_price', 'vwap', 'rsi_15m', 'volume_climax'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/sector_concentration_limit_v1.py b/runtime/python/core/formulas/generated/sector_concentration_limit_v1.py index 0eecbd2..d0c84a2 100644 --- a/runtime/python/core/formulas/generated/sector_concentration_limit_v1.py +++ b/runtime/python/core/formulas/generated/sector_concentration_limit_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SECTOR_CONCENTRATION_LIMIT_V1.""" FORMULA_ID = 'SECTOR_CONCENTRATION_LIMIT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['sector_concentration_json', 'market_regime'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/sector_exposure_graph_v1.py b/runtime/python/core/formulas/generated/sector_exposure_graph_v1.py new file mode 100644 index 0000000..4ab3da6 --- /dev/null +++ b/runtime/python/core/formulas/generated/sector_exposure_graph_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for SECTOR_EXPOSURE_GRAPH_V1.""" + +FORMULA_ID = 'SECTOR_EXPOSURE_GRAPH_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['direct_weight_pct', 'etf_constituents_json', 'etf_weight_pct', 'sector_id', 'peer_sector_betas'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('SECTOR_EXPOSURE_GRAPH_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/sector_rotation_momentum_v1.py b/runtime/python/core/formulas/generated/sector_rotation_momentum_v1.py index a371a81..f28f7b2 100644 --- a/runtime/python/core/formulas/generated/sector_rotation_momentum_v1.py +++ b/runtime/python/core/formulas/generated/sector_rotation_momentum_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SECTOR_ROTATION_MOMENTUM_V1.""" FORMULA_ID = 'SECTOR_ROTATION_MOMENTUM_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['sector', 'momentum_state'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/sector_rotation_radar_v1.py b/runtime/python/core/formulas/generated/sector_rotation_radar_v1.py index e898ec0..e974a4a 100644 --- a/runtime/python/core/formulas/generated/sector_rotation_radar_v1.py +++ b/runtime/python/core/formulas/generated/sector_rotation_radar_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SECTOR_ROTATION_RADAR_V1.""" FORMULA_ID = 'SECTOR_ROTATION_RADAR_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['sector_smartmoney_5d', 'sector_rank', 'sector_top2_names'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/sell_execution_timing_v1.py b/runtime/python/core/formulas/generated/sell_execution_timing_v1.py index b473589..7594491 100644 --- a/runtime/python/core/formulas/generated/sell_execution_timing_v1.py +++ b/runtime/python/core/formulas/generated/sell_execution_timing_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SELL_EXECUTION_TIMING_V1.""" FORMULA_ID = 'SELL_EXECUTION_TIMING_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['gap_down_pct', 'intraday_drop', 'rsi14', 'intraday_change', 'time_slot_label'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/sell_lot_pareto_selector_v1.py b/runtime/python/core/formulas/generated/sell_lot_pareto_selector_v1.py new file mode 100644 index 0000000..1a52db7 --- /dev/null +++ b/runtime/python/core/formulas/generated/sell_lot_pareto_selector_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for SELL_LOT_PARETO_SELECTOR_V1.""" + +FORMULA_ID = 'SELL_LOT_PARETO_SELECTOR_V1' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['avoided_tail_loss_krw', 'cash_repair_benefit_krw', 'concentration_reduction_benefit_krw', 'tax_loss_benefit_krw', 'tax_fee_slippage_krw', 'reentry_cost_krw', 'missed_upside_penalty_krw'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('SELL_LOT_PARETO_SELECTOR_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/sell_price_sanity_v1.py b/runtime/python/core/formulas/generated/sell_price_sanity_v1.py index 045c1f2..7d5971e 100644 --- a/runtime/python/core/formulas/generated/sell_price_sanity_v1.py +++ b/runtime/python/core/formulas/generated/sell_price_sanity_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SELL_PRICE_SANITY_V1.""" FORMULA_ID = 'SELL_PRICE_SANITY_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['sell_limit_price', 'stop_loss_price', 'current_price', 'tick_unit'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/sell_slippage_budget_factor_v1.py b/runtime/python/core/formulas/generated/sell_slippage_budget_factor_v1.py index 22eeed3..f8b4580 100644 --- a/runtime/python/core/formulas/generated/sell_slippage_budget_factor_v1.py +++ b/runtime/python/core/formulas/generated/sell_slippage_budget_factor_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SELL_SLIPPAGE_BUDGET_FACTOR_V1.""" FORMULA_ID = 'SELL_SLIPPAGE_BUDGET_FACTOR_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['adv20', 'current_price', 'sell_qty', 'emergency_full_sell'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/sell_value_preservation_tiered_v2.py b/runtime/python/core/formulas/generated/sell_value_preservation_tiered_v2.py index f4188f8..42411eb 100644 --- a/runtime/python/core/formulas/generated/sell_value_preservation_tiered_v2.py +++ b/runtime/python/core/formulas/generated/sell_value_preservation_tiered_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SELL_VALUE_PRESERVATION_TIERED_V2.""" FORMULA_ID = 'SELL_VALUE_PRESERVATION_TIERED_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['emergency_full_sell', 'oversold_gate', 'rsi14', 'profit_lock_stage', 'velocity_5d', 'h2_priority_rank', 'rs_verdict', 'cash_shortfall_min_krw', 'waterfall_plan_json'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/sell_waterfall_engine_v1.py b/runtime/python/core/formulas/generated/sell_waterfall_engine_v1.py index 9cdd9ac..833d1d8 100644 --- a/runtime/python/core/formulas/generated/sell_waterfall_engine_v1.py +++ b/runtime/python/core/formulas/generated/sell_waterfall_engine_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SELL_WATERFALL_ENGINE_V1.""" FORMULA_ID = 'SELL_WATERFALL_ENGINE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['cash_recovery_plan_json', 'emergency_full_sell', 'oversold_gate', 'rsi14', 'close', 'prev_close', 'atr20'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/sell_waterfall_engine_v2.py b/runtime/python/core/formulas/generated/sell_waterfall_engine_v2.py index 36b2cbb..4225f32 100644 --- a/runtime/python/core/formulas/generated/sell_waterfall_engine_v2.py +++ b/runtime/python/core/formulas/generated/sell_waterfall_engine_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SELL_WATERFALL_ENGINE_V2.""" FORMULA_ID = 'SELL_WATERFALL_ENGINE_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/semiconductor_cluster_gate_v1.py b/runtime/python/core/formulas/generated/semiconductor_cluster_gate_v1.py index 3e09760..04bf3ee 100644 --- a/runtime/python/core/formulas/generated/semiconductor_cluster_gate_v1.py +++ b/runtime/python/core/formulas/generated/semiconductor_cluster_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SEMICONDUCTOR_CLUSTER_GATE_V1.""" FORMULA_ID = 'SEMICONDUCTOR_CLUSTER_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['semiconductor_cluster_json', 'market_regime'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/single_position_weight_cap_v1.py b/runtime/python/core/formulas/generated/single_position_weight_cap_v1.py index 30f6a16..8e29ffa 100644 --- a/runtime/python/core/formulas/generated/single_position_weight_cap_v1.py +++ b/runtime/python/core/formulas/generated/single_position_weight_cap_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SINGLE_POSITION_WEIGHT_CAP_V1.""" FORMULA_ID = 'SINGLE_POSITION_WEIGHT_CAP_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['single_position_weight_json', 'market_regime'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/smart_cash_recovery_v3.py b/runtime/python/core/formulas/generated/smart_cash_recovery_v3.py index b4204a6..78840cc 100644 --- a/runtime/python/core/formulas/generated/smart_cash_recovery_v3.py +++ b/runtime/python/core/formulas/generated/smart_cash_recovery_v3.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SMART_CASH_RECOVERY_V3.""" FORMULA_ID = 'SMART_CASH_RECOVERY_V3' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['value_preservation_scorer_v1_json', 'scrs_v2_json', 'market_regime_state', 'macro_risk_regime', 'ATR20', 'AvgTradeValue_5D_M', 'Spread_Pct'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/smart_money_flow_signal_v2.py b/runtime/python/core/formulas/generated/smart_money_flow_signal_v2.py index 284de14..ebee141 100644 --- a/runtime/python/core/formulas/generated/smart_money_flow_signal_v2.py +++ b/runtime/python/core/formulas/generated/smart_money_flow_signal_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SMART_MONEY_FLOW_SIGNAL_V2.""" FORMULA_ID = 'SMART_MONEY_FLOW_SIGNAL_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/smart_money_liquidity_gate_v1.py b/runtime/python/core/formulas/generated/smart_money_liquidity_gate_v1.py index 59a94dd..4039860 100644 --- a/runtime/python/core/formulas/generated/smart_money_liquidity_gate_v1.py +++ b/runtime/python/core/formulas/generated/smart_money_liquidity_gate_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for SMART_MONEY_LIQUIDITY_GATE_V1.""" FORMULA_ID = 'SMART_MONEY_LIQUIDITY_GATE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/state_vector_constructor_v1.py b/runtime/python/core/formulas/generated/state_vector_constructor_v1.py new file mode 100644 index 0000000..4bdc07b --- /dev/null +++ b/runtime/python/core/formulas/generated/state_vector_constructor_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for STATE_VECTOR_CONSTRUCTOR_V1.""" + +FORMULA_ID = 'STATE_VECTOR_CONSTRUCTOR_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['cash_ladder', 'positions', 'sector_exposure_graph', 'factor_exposures', 'tax_lots', 'risk_bucket_weights', 'macro_regime_probabilities', 'goal_progress_pct'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('STATE_VECTOR_CONSTRUCTOR_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/stop_action_ladder_v1.py b/runtime/python/core/formulas/generated/stop_action_ladder_v1.py index 01f06f6..767230f 100644 --- a/runtime/python/core/formulas/generated/stop_action_ladder_v1.py +++ b/runtime/python/core/formulas/generated/stop_action_ladder_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for STOP_ACTION_LADDER_V1.""" FORMULA_ID = 'STOP_ACTION_LADDER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['context'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/stop_breach_alert_v1.py b/runtime/python/core/formulas/generated/stop_breach_alert_v1.py index 33ecd9f..483be40 100644 --- a/runtime/python/core/formulas/generated/stop_breach_alert_v1.py +++ b/runtime/python/core/formulas/generated/stop_breach_alert_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for STOP_BREACH_ALERT_V1.""" FORMULA_ID = 'STOP_BREACH_ALERT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['close_price', 'stop_price'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/stop_price_core_v1.py b/runtime/python/core/formulas/generated/stop_price_core_v1.py index 41f2f5b..c40e4bc 100644 --- a/runtime/python/core/formulas/generated/stop_price_core_v1.py +++ b/runtime/python/core/formulas/generated/stop_price_core_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for STOP_PRICE_CORE_V1.""" FORMULA_ID = 'STOP_PRICE_CORE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['entry_price', 'atr20', 'current_price'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/stop_proposal_ladder_v1.py b/runtime/python/core/formulas/generated/stop_proposal_ladder_v1.py index 8625895..bb0314b 100644 --- a/runtime/python/core/formulas/generated/stop_proposal_ladder_v1.py +++ b/runtime/python/core/formulas/generated/stop_proposal_ladder_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for STOP_PROPOSAL_LADDER_V1.""" FORMULA_ID = 'STOP_PROPOSAL_LADDER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['position_class', 'holding_quantity', 'proposed_quantity', 'stop_price', 'profit_lock_stage', 'protected_stop_price', 'auto_trailing_stop', 'tp3_qty'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/strong_close_signal_v1.py b/runtime/python/core/formulas/generated/strong_close_signal_v1.py new file mode 100644 index 0000000..1077152 --- /dev/null +++ b/runtime/python/core/formulas/generated/strong_close_signal_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for STRONG_CLOSE_SIGNAL_V1.""" + +FORMULA_ID = 'STRONG_CLOSE_SIGNAL_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['close_price', 'high_price', 'low_price'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('STRONG_CLOSE_SIGNAL_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/take_profit_ladder_v1.py b/runtime/python/core/formulas/generated/take_profit_ladder_v1.py index df89cd2..8ee6628 100644 --- a/runtime/python/core/formulas/generated/take_profit_ladder_v1.py +++ b/runtime/python/core/formulas/generated/take_profit_ladder_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for TAKE_PROFIT_LADDER_V1.""" FORMULA_ID = 'TAKE_PROFIT_LADDER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['average_cost', 'quantity', 'position_class'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/take_profit_ladder_v2.py b/runtime/python/core/formulas/generated/take_profit_ladder_v2.py index 7b41a97..de5d0e1 100644 --- a/runtime/python/core/formulas/generated/take_profit_ladder_v2.py +++ b/runtime/python/core/formulas/generated/take_profit_ladder_v2.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for TAKE_PROFIT_LADDER_V2.""" FORMULA_ID = 'TAKE_PROFIT_LADDER_V2' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['average_cost', 'atr20', 'quantity', 'position_class'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/target_cash_pct_v1.py b/runtime/python/core/formulas/generated/target_cash_pct_v1.py index 9b935d6..42053a0 100644 --- a/runtime/python/core/formulas/generated/target_cash_pct_v1.py +++ b/runtime/python/core/formulas/generated/target_cash_pct_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for TARGET_CASH_PCT_V1.""" FORMULA_ID = 'TARGET_CASH_PCT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['market_risk_score', 'cash_floor_regime_min_pct'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/tick_normalizer_v1.py b/runtime/python/core/formulas/generated/tick_normalizer_v1.py index bf70bd5..b37aaa6 100644 --- a/runtime/python/core/formulas/generated/tick_normalizer_v1.py +++ b/runtime/python/core/formulas/generated/tick_normalizer_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for TICK_NORMALIZER_V1.""" FORMULA_ID = 'TICK_NORMALIZER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['raw_price'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/total_heat_v1.py b/runtime/python/core/formulas/generated/total_heat_v1.py index 1be4a86..5f75e8c 100644 --- a/runtime/python/core/formulas/generated/total_heat_v1.py +++ b/runtime/python/core/formulas/generated/total_heat_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for TOTAL_HEAT_V1.""" FORMULA_ID = 'TOTAL_HEAT_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['average_cost', 'stop_price', 'quantity', 'total_asset'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/trade_quality_from_t5_v1.py b/runtime/python/core/formulas/generated/trade_quality_from_t5_v1.py index f6e28e2..203cac9 100644 --- a/runtime/python/core/formulas/generated/trade_quality_from_t5_v1.py +++ b/runtime/python/core/formulas/generated/trade_quality_from_t5_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for TRADE_QUALITY_FROM_T5_V1.""" FORMULA_ID = 'TRADE_QUALITY_FROM_T5_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/trade_quality_scorer_v1.py b/runtime/python/core/formulas/generated/trade_quality_scorer_v1.py index 4ef16c8..f283fa0 100644 --- a/runtime/python/core/formulas/generated/trade_quality_scorer_v1.py +++ b/runtime/python/core/formulas/generated/trade_quality_scorer_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for TRADE_QUALITY_SCORER_V1.""" FORMULA_ID = 'TRADE_QUALITY_SCORER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['velocity_1d_at_entry', 'entry_price', 'ma20_at_entry', 'volume_ratio_at_entry', 't5_return_pct', 't20_vs_core_pctp', 'sell_price', 'ma20_at_sell', 'average_cost', 'price_t5_after_sell', 'cash_recovered_krw', 'cash_shortfall_min_krw'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/trailing_stop_price_v1.py b/runtime/python/core/formulas/generated/trailing_stop_price_v1.py index 01d149b..d57eccc 100644 --- a/runtime/python/core/formulas/generated/trailing_stop_price_v1.py +++ b/runtime/python/core/formulas/generated/trailing_stop_price_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for TRAILING_STOP_PRICE_V1.""" FORMULA_ID = 'TRAILING_STOP_PRICE_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'quant_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['highest_price_since_entry', 'atr20', 'trailing_atr_multiplier'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/transition_set_enumerator_v1.py b/runtime/python/core/formulas/generated/transition_set_enumerator_v1.py new file mode 100644 index 0000000..c294b6f --- /dev/null +++ b/runtime/python/core/formulas/generated/transition_set_enumerator_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for TRANSITION_SET_ENUMERATOR_V1.""" + +FORMULA_ID = 'TRANSITION_SET_ENUMERATOR_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['evaluated_candidates', 'max_set_size'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('TRANSITION_SET_ENUMERATOR_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/trend_filter_gate_v1.py b/runtime/python/core/formulas/generated/trend_filter_gate_v1.py new file mode 100644 index 0000000..d254788 --- /dev/null +++ b/runtime/python/core/formulas/generated/trend_filter_gate_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for TREND_FILTER_GATE_V1.""" + +FORMULA_ID = 'TREND_FILTER_GATE_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['close_price', 'ma120', 'ma120_prev'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('TREND_FILTER_GATE_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/value_preservation_scorer_v1.py b/runtime/python/core/formulas/generated/value_preservation_scorer_v1.py index 1002632..5081033 100644 --- a/runtime/python/core/formulas/generated/value_preservation_scorer_v1.py +++ b/runtime/python/core/formulas/generated/value_preservation_scorer_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for VALUE_PRESERVATION_SCORER_V1.""" FORMULA_ID = 'VALUE_PRESERVATION_SCORER_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['Close', 'MA20', 'MA60', 'ATR20', 'RSI14', 'BB_Position', 'Frg_5D', 'Inst_5D', 'AvgTradeValue_5D_M', 'AvgTradeValue_20D_M', 'Recovery_Ratio_5D', 'Stock_Drawdown_From_High_Pct'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/velocity_v1.py b/runtime/python/core/formulas/generated/velocity_v1.py index 42f1151..74bb511 100644 --- a/runtime/python/core/formulas/generated/velocity_v1.py +++ b/runtime/python/core/formulas/generated/velocity_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for VELOCITY_V1.""" FORMULA_ID = 'VELOCITY_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = ['close_price', 'previous_close_price', 'ret5d'] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/verdict_consistency_lock_v1.py b/runtime/python/core/formulas/generated/verdict_consistency_lock_v1.py index fd7ea5e..3298e29 100644 --- a/runtime/python/core/formulas/generated/verdict_consistency_lock_v1.py +++ b/runtime/python/core/formulas/generated/verdict_consistency_lock_v1.py @@ -1,8 +1,8 @@ """Auto-generated formula stub for VERDICT_CONSISTENCY_LOCK_V1.""" FORMULA_ID = 'VERDICT_CONSISTENCY_LOCK_V1' -FORMULA_OWNER = 'TODO_REQUIRED' -FORMULA_STATUS = 'TODO_REQUIRED' +FORMULA_OWNER = 'report_owner' +FORMULA_STATUS = 'active' FORMULA_INPUT_FIELDS = [] FORMULA_OUTPUT_FIELDS = [] diff --git a/runtime/python/core/formulas/generated/volatility_expansion_breakout_v1.py b/runtime/python/core/formulas/generated/volatility_expansion_breakout_v1.py new file mode 100644 index 0000000..38db418 --- /dev/null +++ b/runtime/python/core/formulas/generated/volatility_expansion_breakout_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for VOLATILITY_EXPANSION_BREAKOUT_V1.""" + +FORMULA_ID = 'VOLATILITY_EXPANSION_BREAKOUT_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['bb_width', 'bb_width_20d_percentile', 'ret_1d'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('VOLATILITY_EXPANSION_BREAKOUT_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/walk_forward_bootstrap_v1.py b/runtime/python/core/formulas/generated/walk_forward_bootstrap_v1.py new file mode 100644 index 0000000..a415939 --- /dev/null +++ b/runtime/python/core/formulas/generated/walk_forward_bootstrap_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for WALK_FORWARD_BOOTSTRAP_V1.""" + +FORMULA_ID = 'WALK_FORWARD_BOOTSTRAP_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['historical_returns', 'current_regime_state', 'bootstrap_method'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('WALK_FORWARD_BOOTSTRAP_V1' + ' is a generated stub.') diff --git a/runtime/python/core/formulas/generated/weekly_legacy_transfer_plan_v1.py b/runtime/python/core/formulas/generated/weekly_legacy_transfer_plan_v1.py new file mode 100644 index 0000000..32932e9 --- /dev/null +++ b/runtime/python/core/formulas/generated/weekly_legacy_transfer_plan_v1.py @@ -0,0 +1,10 @@ +"""Auto-generated formula stub for WEEKLY_LEGACY_TRANSFER_PLAN_V1.""" + +FORMULA_ID = 'WEEKLY_LEGACY_TRANSFER_PLAN_V1' +FORMULA_OWNER = 'engine_owner' +FORMULA_STATUS = 'active' +FORMULA_INPUT_FIELDS = ['weekly_legacy_to_cma_transfer_plan_krw', 'transfer_confirmed', 'transfer_confirmed_amount_krw'] +FORMULA_OUTPUT_FIELDS = [] + +def execute(inputs: dict[str, object]) -> dict[str, object]: + raise NotImplementedError('WEEKLY_LEGACY_TRANSFER_PLAN_V1' + ' is a generated stub.') diff --git a/runtime/refactor_baseline_v1.yaml b/runtime/refactor_baseline_v1.yaml index 0ef2910..aa3ada3 100644 --- a/runtime/refactor_baseline_v1.yaml +++ b/runtime/refactor_baseline_v1.yaml @@ -1,9 +1,9 @@ { "formula_id": "AUDIT_REPOSITORY_ENTROPY_V2", "gate": "PASS", - "total_file_count": 1703, - "package_script_count": 20, - "temp_json_count": 160, + "total_file_count": 1884, + "package_script_count": 23, + "temp_json_count": 188, "budget": { "schema_version": "repository_entropy_budget.v1", "max_total_files": 2200, @@ -15,5 +15,5 @@ "keep package scripts within release envelope" ] }, - "source_zip_sha256": "ca4f69ab7780312ef3bb2b434a72e8d91d4f0f065e3f7b1a4f128e32053e0717" + "source_zip_sha256": "469e09441818688b861efa6d6ee1bd6123806150c2940608ba964b44bcf50eb0" } \ No newline at end of file diff --git a/schemas/generated/breakout_failure_stop_v1.schema.json b/schemas/generated/breakout_failure_stop_v1.schema.json index a57ec5c..f84661e 100644 --- a/schemas/generated/breakout_failure_stop_v1.schema.json +++ b/schemas/generated/breakout_failure_stop_v1.schema.json @@ -4,13 +4,39 @@ "title": "BREAKOUT_FAILURE_STOP_V1", "type": "object", "properties": { - "formula_id": { "const": "BREAKOUT_FAILURE_STOP_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "BREAKOUT_FAILURE_STOP_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["prior_high", "close_price", "days_since_breakout"], - "x_formula_outputs": ["breakout_failure"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "prior_high", + "close_price", + "days_since_breakout" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/consecutive_streak_v1.schema.json b/schemas/generated/consecutive_streak_v1.schema.json index 3be26a7..b66def2 100644 --- a/schemas/generated/consecutive_streak_v1.schema.json +++ b/schemas/generated/consecutive_streak_v1.schema.json @@ -4,13 +4,37 @@ "title": "CONSECUTIVE_STREAK_V1", "type": "object", "properties": { - "formula_id": { "const": "CONSECUTIVE_STREAK_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "CONSECUTIVE_STREAK_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["daily_close_changes"], - "x_formula_outputs": ["up_streak", "down_streak"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "daily_close_changes" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/execution_capacity_ladder_v1.schema.json b/schemas/generated/execution_capacity_ladder_v1.schema.json index 89da6b3..57418b0 100644 --- a/schemas/generated/execution_capacity_ladder_v1.schema.json +++ b/schemas/generated/execution_capacity_ladder_v1.schema.json @@ -40,7 +40,5 @@ "orderbook_top3_depth_krw", "spread_bps" ], - "x_formula_outputs": [ - "order_capacity_krw" - ] + "x_formula_outputs": [] } diff --git a/schemas/generated/execution_plan_compiler_v1.schema.json b/schemas/generated/execution_plan_compiler_v1.schema.json index ea7f93e..fc70006 100644 --- a/schemas/generated/execution_plan_compiler_v1.schema.json +++ b/schemas/generated/execution_plan_compiler_v1.schema.json @@ -4,13 +4,39 @@ "title": "EXECUTION_PLAN_COMPILER_V1", "type": "object", "properties": { - "formula_id": { "const": "EXECUTION_PLAN_COMPILER_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "EXECUTION_PLAN_COMPILER_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["order_capacity_krw", "revalidation_snapshot", "baseline_snapshot"], - "x_formula_outputs": ["compiled_slices"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "order_capacity_krw", + "revalidation_snapshot", + "baseline_snapshot" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/fifty_two_week_high_trigger_v1.schema.json b/schemas/generated/fifty_two_week_high_trigger_v1.schema.json index a13a0d9..afcc0ab 100644 --- a/schemas/generated/fifty_two_week_high_trigger_v1.schema.json +++ b/schemas/generated/fifty_two_week_high_trigger_v1.schema.json @@ -4,13 +4,38 @@ "title": "FIFTY_TWO_WEEK_HIGH_TRIGGER_V1", "type": "object", "properties": { - "formula_id": { "const": "FIFTY_TWO_WEEK_HIGH_TRIGGER_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "FIFTY_TWO_WEEK_HIGH_TRIGGER_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["close_price", "high52w"], - "x_formula_outputs": ["fifty_two_week_high_breakout"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "close_price", + "high52w" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/forecast_simulation_engine_v1.schema.json b/schemas/generated/forecast_simulation_engine_v1.schema.json new file mode 100644 index 0000000..8193bb1 --- /dev/null +++ b/schemas/generated/forecast_simulation_engine_v1.schema.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "schema://formula/FORECAST_SIMULATION_ENGINE_V1", + "title": "FORECAST_SIMULATION_ENGINE_V1", + "type": "object", + "properties": { + "formula_id": { + "const": "FORECAST_SIMULATION_ENGINE_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "net_profit_distribution_after_tax_fee_slippage", + "sample_count_total", + "sample_count_same_regime", + "execution_mode" + ], + "x_formula_outputs": [] +} diff --git a/schemas/generated/golden_cross_signal_v1.schema.json b/schemas/generated/golden_cross_signal_v1.schema.json index 4bd61c9..d4561eb 100644 --- a/schemas/generated/golden_cross_signal_v1.schema.json +++ b/schemas/generated/golden_cross_signal_v1.schema.json @@ -4,13 +4,40 @@ "title": "GOLDEN_CROSS_SIGNAL_V1", "type": "object", "properties": { - "formula_id": { "const": "GOLDEN_CROSS_SIGNAL_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "GOLDEN_CROSS_SIGNAL_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["ma20", "ma20_prev", "ma60", "ma60_prev"], - "x_formula_outputs": ["golden_cross_today"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "ma20", + "ma20_prev", + "ma60", + "ma60_prev" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/immutable_decision_ledger_v1.schema.json b/schemas/generated/immutable_decision_ledger_v1.schema.json index c11c702..688b12a 100644 --- a/schemas/generated/immutable_decision_ledger_v1.schema.json +++ b/schemas/generated/immutable_decision_ledger_v1.schema.json @@ -4,13 +4,41 @@ "title": "IMMUTABLE_DECISION_LEDGER_V1", "type": "object", "properties": { - "formula_id": { "const": "IMMUTABLE_DECISION_LEDGER_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "IMMUTABLE_DECISION_LEDGER_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["decision_id", "input_hash_bundle", "execution_mode", "candidate_ids", "selected_transition_id"], - "x_formula_outputs": ["ledger_append_status"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "decision_id", + "input_hash_bundle", + "execution_mode", + "candidate_ids", + "selected_transition_id" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/leader_lifecycle_gate_v1.schema.json b/schemas/generated/leader_lifecycle_gate_v1.schema.json new file mode 100644 index 0000000..79bda5d --- /dev/null +++ b/schemas/generated/leader_lifecycle_gate_v1.schema.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "schema://formula/LEADER_LIFECYCLE_GATE_V1", + "title": "LEADER_LIFECYCLE_GATE_V1", + "type": "object", + "properties": { + "formula_id": { + "const": "LEADER_LIFECYCLE_GATE_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "relative_strength_leads_sector", + "volume_quality_confirmed", + "above_ma60_or_reclaim_confirmed", + "earnings_revision_status", + "institutional_flow_status", + "current_role" + ], + "x_formula_outputs": [] +} diff --git a/schemas/generated/model_governance_kill_switch_v1.schema.json b/schemas/generated/model_governance_kill_switch_v1.schema.json index 1f09a09..c164d1d 100644 --- a/schemas/generated/model_governance_kill_switch_v1.schema.json +++ b/schemas/generated/model_governance_kill_switch_v1.schema.json @@ -43,9 +43,5 @@ "account_mdd_pct", "account_mdd_budget_pct" ], - "x_formula_outputs": [ - "execution_mode", - "kill_switch_triggered", - "kill_switch_reason_codes" - ] + "x_formula_outputs": [] } diff --git a/schemas/generated/portfolio_transition_utility_v1.schema.json b/schemas/generated/portfolio_transition_utility_v1.schema.json new file mode 100644 index 0000000..6a86580 --- /dev/null +++ b/schemas/generated/portfolio_transition_utility_v1.schema.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "schema://formula/PORTFOLIO_TRANSITION_UTILITY_V1", + "title": "PORTFOLIO_TRANSITION_UTILITY_V1", + "type": "object", + "properties": { + "formula_id": { + "const": "PORTFOLIO_TRANSITION_UTILITY_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "ce70_net_profit_krw", + "tax_fee_slippage_krw", + "cash_repair_benefit_krw", + "concentration_reduction_benefit_krw", + "turnover_penalty_krw" + ], + "x_formula_outputs": [] +} diff --git a/schemas/generated/rebalance_cadence_gate_v1.schema.json b/schemas/generated/rebalance_cadence_gate_v1.schema.json index a99f469..7f53e2a 100644 --- a/schemas/generated/rebalance_cadence_gate_v1.schema.json +++ b/schemas/generated/rebalance_cadence_gate_v1.schema.json @@ -4,13 +4,39 @@ "title": "REBALANCE_CADENCE_GATE_V1", "type": "object", "properties": { - "formula_id": { "const": "REBALANCE_CADENCE_GATE_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "REBALANCE_CADENCE_GATE_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["today_date", "transition_utility_after_tax_cost_krw", "hard_risk_block_active"], - "x_formula_outputs": ["rebalance_execution_allowed", "cadence_check_required", "review_emitted"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "today_date", + "transition_utility_after_tax_cost_krw", + "hard_risk_block_active" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/scenario_shock_matrix_v1.schema.json b/schemas/generated/scenario_shock_matrix_v1.schema.json index 32c45d7..590985b 100644 --- a/schemas/generated/scenario_shock_matrix_v1.schema.json +++ b/schemas/generated/scenario_shock_matrix_v1.schema.json @@ -4,13 +4,38 @@ "title": "SCENARIO_SHOCK_MATRIX_V1", "type": "object", "properties": { - "formula_id": { "const": "SCENARIO_SHOCK_MATRIX_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "SCENARIO_SHOCK_MATRIX_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["net_profit_distribution_after_tax_fee_slippage", "scenario_id"], - "x_formula_outputs": ["scenario_results"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "net_profit_distribution_after_tax_fee_slippage", + "scenario_id" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/sector_exposure_graph_v1.schema.json b/schemas/generated/sector_exposure_graph_v1.schema.json index 83fb22f..9f74c9e 100644 --- a/schemas/generated/sector_exposure_graph_v1.schema.json +++ b/schemas/generated/sector_exposure_graph_v1.schema.json @@ -40,10 +40,5 @@ "sector_id", "peer_sector_betas" ], - "x_formula_outputs": [ - "sector_family_total_pct", - "lookthrough_etf_weight_pct", - "factor_beta_residualized", - "leader_role" - ] + "x_formula_outputs": [] } diff --git a/schemas/generated/sell_lot_pareto_selector_v1.schema.json b/schemas/generated/sell_lot_pareto_selector_v1.schema.json new file mode 100644 index 0000000..3c4caab --- /dev/null +++ b/schemas/generated/sell_lot_pareto_selector_v1.schema.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "schema://formula/SELL_LOT_PARETO_SELECTOR_V1", + "title": "SELL_LOT_PARETO_SELECTOR_V1", + "type": "object", + "properties": { + "formula_id": { + "const": "SELL_LOT_PARETO_SELECTOR_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "avoided_tail_loss_krw", + "cash_repair_benefit_krw", + "concentration_reduction_benefit_krw", + "tax_loss_benefit_krw", + "tax_fee_slippage_krw", + "reentry_cost_krw", + "missed_upside_penalty_krw" + ], + "x_formula_outputs": [] +} diff --git a/schemas/generated/state_vector_constructor_v1.schema.json b/schemas/generated/state_vector_constructor_v1.schema.json index 5fccbd4..bbb3c12 100644 --- a/schemas/generated/state_vector_constructor_v1.schema.json +++ b/schemas/generated/state_vector_constructor_v1.schema.json @@ -4,13 +4,44 @@ "title": "STATE_VECTOR_CONSTRUCTOR_V1", "type": "object", "properties": { - "formula_id": { "const": "STATE_VECTOR_CONSTRUCTOR_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "STATE_VECTOR_CONSTRUCTOR_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["cash_ladder", "positions", "sector_exposure_graph", "factor_exposures", "tax_lots", "risk_bucket_weights", "macro_regime_probabilities", "goal_progress_pct"], - "x_formula_outputs": ["state_vector", "state_vector_completeness_pct", "missing_components"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "cash_ladder", + "positions", + "sector_exposure_graph", + "factor_exposures", + "tax_lots", + "risk_bucket_weights", + "macro_regime_probabilities", + "goal_progress_pct" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/strong_close_signal_v1.schema.json b/schemas/generated/strong_close_signal_v1.schema.json index 72ac32f..0c1819a 100644 --- a/schemas/generated/strong_close_signal_v1.schema.json +++ b/schemas/generated/strong_close_signal_v1.schema.json @@ -4,13 +4,39 @@ "title": "STRONG_CLOSE_SIGNAL_V1", "type": "object", "properties": { - "formula_id": { "const": "STRONG_CLOSE_SIGNAL_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "STRONG_CLOSE_SIGNAL_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["close_price", "high_price", "low_price"], - "x_formula_outputs": ["strong_close", "close_position_pct"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "close_price", + "high_price", + "low_price" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/transition_set_enumerator_v1.schema.json b/schemas/generated/transition_set_enumerator_v1.schema.json index 8f232e8..ca14014 100644 --- a/schemas/generated/transition_set_enumerator_v1.schema.json +++ b/schemas/generated/transition_set_enumerator_v1.schema.json @@ -4,13 +4,38 @@ "title": "TRANSITION_SET_ENUMERATOR_V1", "type": "object", "properties": { - "formula_id": { "const": "TRANSITION_SET_ENUMERATOR_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "TRANSITION_SET_ENUMERATOR_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["evaluated_candidates", "max_set_size"], - "x_formula_outputs": ["selected_transition_set"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "evaluated_candidates", + "max_set_size" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/trend_filter_gate_v1.schema.json b/schemas/generated/trend_filter_gate_v1.schema.json index f0ba65a..60e2f4d 100644 --- a/schemas/generated/trend_filter_gate_v1.schema.json +++ b/schemas/generated/trend_filter_gate_v1.schema.json @@ -4,13 +4,39 @@ "title": "TREND_FILTER_GATE_V1", "type": "object", "properties": { - "formula_id": { "const": "TREND_FILTER_GATE_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "TREND_FILTER_GATE_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["close_price", "ma120", "ma120_prev"], - "x_formula_outputs": ["trend_filter_pass"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "close_price", + "ma120", + "ma120_prev" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/volatility_expansion_breakout_v1.schema.json b/schemas/generated/volatility_expansion_breakout_v1.schema.json index de1cccc..c3bfbab 100644 --- a/schemas/generated/volatility_expansion_breakout_v1.schema.json +++ b/schemas/generated/volatility_expansion_breakout_v1.schema.json @@ -4,13 +4,39 @@ "title": "VOLATILITY_EXPANSION_BREAKOUT_V1", "type": "object", "properties": { - "formula_id": { "const": "VOLATILITY_EXPANSION_BREAKOUT_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "VOLATILITY_EXPANSION_BREAKOUT_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["bb_width", "bb_width_20d_percentile", "ret_1d"], - "x_formula_outputs": ["volatility_expansion_breakout"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "bb_width", + "bb_width_20d_percentile", + "ret_1d" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/walk_forward_bootstrap_v1.schema.json b/schemas/generated/walk_forward_bootstrap_v1.schema.json index 2c7b55e..d36023c 100644 --- a/schemas/generated/walk_forward_bootstrap_v1.schema.json +++ b/schemas/generated/walk_forward_bootstrap_v1.schema.json @@ -4,13 +4,39 @@ "title": "WALK_FORWARD_BOOTSTRAP_V1", "type": "object", "properties": { - "formula_id": { "const": "WALK_FORWARD_BOOTSTRAP_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "WALK_FORWARD_BOOTSTRAP_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["historical_returns", "current_regime_state", "bootstrap_method"], - "x_formula_outputs": ["net_profit_distribution_after_tax_fee_slippage", "sample_count_total", "sample_count_same_regime"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "historical_returns", + "current_regime_state", + "bootstrap_method" + ], + "x_formula_outputs": [] } diff --git a/schemas/generated/weekly_legacy_transfer_plan_v1.schema.json b/schemas/generated/weekly_legacy_transfer_plan_v1.schema.json index 1ad9cc9..17ef93d 100644 --- a/schemas/generated/weekly_legacy_transfer_plan_v1.schema.json +++ b/schemas/generated/weekly_legacy_transfer_plan_v1.schema.json @@ -4,13 +4,39 @@ "title": "WEEKLY_LEGACY_TRANSFER_PLAN_V1", "type": "object", "properties": { - "formula_id": { "const": "WEEKLY_LEGACY_TRANSFER_PLAN_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "WEEKLY_LEGACY_TRANSFER_PLAN_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["weekly_legacy_to_cma_transfer_plan_krw", "transfer_confirmed", "transfer_confirmed_amount_krw"], - "x_formula_outputs": ["deployable_cash_contribution_krw", "plan_status"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "weekly_legacy_to_cma_transfer_plan_krw", + "transfer_confirmed", + "transfer_confirmed_amount_krw" + ], + "x_formula_outputs": [] } diff --git a/spec/03_formulas/formula_registry.normalized.yaml b/spec/03_formulas/formula_registry.normalized.yaml index 98c4449..2d38f29 100644 --- a/spec/03_formulas/formula_registry.normalized.yaml +++ b/spec/03_formulas/formula_registry.normalized.yaml @@ -1,6 +1,6 @@ schema_version: 2026-06-06-formula-registry-normalized-v1 source: spec/13_formula_registry.yaml -formula_count: 149 +formula_count: 171 formulas: - formula_id: FLOW_CREDIT_V1 owner: engine_owner @@ -367,6 +367,132 @@ formulas: output_fields: - schema - waterfall_plan_json +- formula_id: SELL_LOT_PARETO_SELECTOR_V1 + owner: quant_owner + status: active + output_fields: + - lot_sell_score_krw + - unit +- formula_id: FORECAST_SIMULATION_ENGINE_V1 + owner: engine_owner + status: active + output_fields: + - ce70_net_profit_krw + - unit +- formula_id: SECTOR_EXPOSURE_GRAPH_V1 + owner: engine_owner + status: active + output_fields: + - sector_family_total_pct + - unit +- formula_id: LEADER_LIFECYCLE_GATE_V1 + owner: engine_owner + status: active + output_fields: + - leader_role + - unit +- formula_id: EXECUTION_CAPACITY_LADDER_V1 + owner: engine_owner + status: active + output_fields: + - order_capacity_krw + - unit +- formula_id: MODEL_GOVERNANCE_KILL_SWITCH_V1 + owner: engine_owner + status: active + output_fields: + - execution_mode + - unit +- formula_id: SCENARIO_SHOCK_MATRIX_V1 + owner: engine_owner + status: active + output_fields: + - scenario_results + - unit +- formula_id: TRANSITION_SET_ENUMERATOR_V1 + owner: engine_owner + status: active + output_fields: + - selected_transition_set + - unit +- formula_id: IMMUTABLE_DECISION_LEDGER_V1 + owner: report_owner + status: active + output_fields: + - ledger_append_status + - unit +- formula_id: EXECUTION_PLAN_COMPILER_V1 + owner: engine_owner + status: active + output_fields: + - compiled_slices + - unit +- formula_id: STATE_VECTOR_CONSTRUCTOR_V1 + owner: engine_owner + status: active + output_fields: + - state_vector + - unit +- formula_id: REBALANCE_CADENCE_GATE_V1 + owner: engine_owner + status: active + output_fields: + - rebalance_execution_allowed + - unit +- formula_id: WALK_FORWARD_BOOTSTRAP_V1 + owner: engine_owner + status: active + output_fields: + - net_profit_distribution_after_tax_fee_slippage + - unit +- formula_id: WEEKLY_LEGACY_TRANSFER_PLAN_V1 + owner: engine_owner + status: active + output_fields: + - deployable_cash_contribution_krw + - unit +- formula_id: GOLDEN_CROSS_SIGNAL_V1 + owner: engine_owner + status: active + output_fields: + - golden_cross_today + - unit +- formula_id: STRONG_CLOSE_SIGNAL_V1 + owner: engine_owner + status: active + output_fields: + - strong_close + - unit +- formula_id: VOLATILITY_EXPANSION_BREAKOUT_V1 + owner: engine_owner + status: active + output_fields: + - unit + - volatility_expansion_breakout +- formula_id: FIFTY_TWO_WEEK_HIGH_TRIGGER_V1 + owner: engine_owner + status: active + output_fields: + - fifty_two_week_high_breakout + - unit +- formula_id: CONSECUTIVE_STREAK_V1 + owner: engine_owner + status: active + output_fields: + - unit + - up_streak +- formula_id: BREAKOUT_FAILURE_STOP_V1 + owner: quant_owner + status: active + output_fields: + - breakout_failure + - unit +- formula_id: TREND_FILTER_GATE_V1 + owner: engine_owner + status: active + output_fields: + - trend_filter_pass + - unit - formula_id: SELL_EXECUTION_TIMING_V1 owner: quant_owner status: active @@ -968,6 +1094,12 @@ formulas: output_fields: - macro_factor_applied - unit +- formula_id: PORTFOLIO_TRANSITION_UTILITY_V1 + owner: quant_owner + status: active + output_fields: + - transition_utility_krw + - unit - formula_id: REBOUND_CAPTURE_THESIS_FACTOR_V1 owner: engine_owner status: active diff --git a/spec/13_formula_registry.yaml b/spec/13_formula_registry.yaml index 26df20e..6e64990 100644 --- a/spec/13_formula_registry.yaml +++ b/spec/13_formula_registry.yaml @@ -167,6 +167,8 @@ formula_registry: TREND_FILTER_GATE_V1: tools/build_trend_filter_gate_v1.py formulas: FLOW_CREDIT_V1: + owner: engine_owner + status: active purpose: 가격·거래량·5D 수급 품질을 0~1 점수로 계산 inputs: - field: close_price @@ -211,6 +213,8 @@ formula_registry: reason: C3 단독 충족은 물량 받기로 간주 canonical_ref: spec/02_data_contract.yaml:quant_feed_contract.investor_flow_rules.active_quality_gate MARKET_RISK_SCORE_V1: + owner: quant_owner + status: active purpose: 시장 위험 점수 MRS를 0~10으로 계산 inputs: - field: vix_close @@ -275,6 +279,8 @@ formula_registry: missing_policy: 컴포넌트별 missing_points를 적용한다. canonical_ref: spec/risk/market_risk_cash.yaml:risk_control.market_risk_score_based_cash TARGET_CASH_PCT_V1: + owner: quant_owner + status: active purpose: MRS 기반 목표 현금비중 계산 inputs: - field: market_risk_score @@ -290,6 +296,8 @@ formula_registry: 15% 및 신규매수 보류. canonical_ref: spec/risk/market_risk_cash.yaml:risk_control.market_risk_score_based_cash TOTAL_HEAT_V1: + owner: quant_owner + status: active purpose: 손절 기준 총 위험노출 계산 inputs: - field: average_cost @@ -322,6 +330,8 @@ formula_registry: action: ALLOW_CONTINUE canonical_ref: spec/risk/aggregate_risk.yaml:risk_control.aggregate_risk_cap EXPECTED_EDGE_V1: + owner: engine_owner + status: active purpose: 비용과 신뢰도 차감 후 기대우위 계산 inputs: - field: target_price @@ -352,6 +362,8 @@ formula_registry: missing_policy: NO_EXPECTED_EDGE. A등급·즉시매수 금지. canonical_ref: spec/strategy/entry_core.yaml:entry_timing_guardrails.numeric_gates.expected_edge_floor RISK_BUDGET_CASCADE_V1: + owner: quant_owner + status: active purpose: base risk budget에 Bayesian, 성과, 국면, Kelly 감액을 순서대로 적용 inputs: - field: base_risk_budget @@ -381,6 +393,8 @@ formula_registry: action: NO_BET canonical_ref: spec/05_position_sizing.yaml:position_sizing.cascade_risk_budget_rule POSITION_SIZE_V1: + owner: quant_owner + status: active purpose: 최종 정수 매수수량 산출 inputs: - field: total_asset @@ -425,6 +439,8 @@ formula_registry: cannot PASS canonical_ref: spec/05_position_sizing.yaml:position_sizing.volatility_targeting STOP_PRICE_CORE_V1: + owner: quant_owner + status: active purpose: 코어 포지션 HTS 입력용 손절가 계산 inputs: - field: entry_price @@ -445,6 +461,8 @@ formula_registry: entry_price: NO_STOP_PRICE canonical_ref: spec/exit/stop_loss.yaml:stop_loss.core STOP_PROPOSAL_LADDER_V1: + owner: quant_owner + status: active purpose: '사용자 판단용 proposal_reference_sheet에 표시할 손절 1/2/3 가격·수량 래더 산출. HTS 즉시 주문표가 아니라 제안표 전용이며, 기존 손절 규칙과 profit preservation 결과만 사용한다. @@ -502,6 +520,8 @@ formula_registry: - stop3 활성 근거가 없으면 null 유지 canonical_ref: spec/00_execution_contract.yaml:proposal_policy.proposal_stop_ladder_selection TRAILING_STOP_PRICE_V1: + owner: quant_owner + status: active purpose: 고점 대비 ATR 기반 trailing stop 가격 계산 inputs: - field: highest_price_since_entry @@ -520,6 +540,8 @@ formula_registry: atr20: NO_TRAILING_PRICE canonical_ref: spec/exit/take_profit.yaml:take_profit.trailing_stop ABSOLUTE_RISK_STOP_V1: + owner: quant_owner + status: active purpose: 절대 리스크 손절가와 청산 수량을 산출하는 taxonomy wrapper inputs: - field: holdings @@ -532,6 +554,8 @@ formula_registry: canonical_ref: spec/exit/stop_loss.yaml:stop_loss.core note: stop_loss.core/satellite 및 stop_adequacy 결과를 묶는 wrapper RELATIVE_UNDERPERF_ALERT_V1: + owner: engine_owner + status: active purpose: 상대성과 약화 경보를 산출하는 taxonomy wrapper inputs: - field: holdings @@ -547,6 +571,8 @@ formula_registry: canonical_ref: spec/exit/stop_loss.yaml:stop_loss.relative_weakness_exit note: calcRelativeStopSignal_의 하위 wrapper STOP_ACTION_LADDER_V1: + owner: quant_owner + status: active purpose: 손절/익절/시간손절의 최종 액션 래더를 산출하는 taxonomy wrapper inputs: - field: context @@ -557,6 +583,8 @@ formula_registry: canonical_ref: spec/exit/stop_loss.yaml:stop_loss.sell_signal_priority note: calcSellDecision_ / SL003_PRIORITY_MATRIX 결과를 표준화 PROFIT_LOCK_RATCHET_V1: + owner: quant_owner + status: active purpose: '분할 익절 단계별 손절선 상향(래칫) 공식. tier_1 익절 완료 후 손절선을 본절(average_cost)로 상향하여 원금을 보호. tier_2 익절 완료 후 trailing stop으로 전환하여 추세 끝단 보유. TAKE_PROFIT_LADDER_V2.action_on_trigger에서 참조. @@ -597,6 +625,8 @@ formula_registry: canonical_ref: spec/exit/take_profit.yaml:take_profit.tiered_ladder version: 2026-05-18_AUDIT_RESPONSE_V1 TAKE_PROFIT_LADDER_V1: + owner: quant_owner + status: active purpose: 평단·보유수량 기준 3단계 익절 가격과 정수 수량 계산 inputs: - field: average_cost @@ -634,6 +664,8 @@ formula_registry: quantity: NO_TAKE_PROFIT_QUANTITY canonical_ref: spec/exit/take_profit.yaml:take_profit.tiered_ladder TAKE_PROFIT_LADDER_V2: + owner: quant_owner + status: active purpose: '평단·ATR20·보유수량 기준 3단계 익절 가격과 정수 수량 계산. 각 단계 가격 = max(고정% 기준가, ATR R-Multiple 기준가). 고정% 최저선을 보장하면서도 고변동성 종목은 ATR 기반으로 더 늦게 익절. ATR 미확인 시 TAKE_PROFIT_LADDER_V1(고정% 전용)으로 자동 fallback. @@ -721,6 +753,8 @@ formula_registry: canonical_ref: spec/exit/take_profit.yaml:take_profit.tiered_ladder version: 2026-05-18_ADVANCED_EXIT_V2 CASH_RATIOS_V1: + owner: quant_owner + status: active purpose: 현금비중·매수가능현금·거래 후 현금비중 계산 (D+2 정산현금 단독 기준) inputs: - field: settlement_cash @@ -752,6 +786,8 @@ formula_registry: sell_cash_proceeds_d2: 0 canonical_ref: spec/risk/portfolio_exposure.yaml:portfolio_exposure_framework.cash_floor.numeric_definitions PEG_SCORE_V1: + owner: engine_owner + status: active purpose: 코스닥 종목의 ForwardPER을 EPS 3개년 성장률로 나눠 밸류에이션 타당성 판정. 고PER이라도 고성장이 뒷받침되면 허용. applicable: 코스닥 상장 종목에만 실행. KOSPI 종목은 이 공식 미적용. @@ -807,6 +843,8 @@ formula_registry: sector_median_forward_pe: fallback 분자 기준 미산출 → CAUTION 보수 처리. canonical_ref: spec/strategy/stock_model.yaml:stock_model.kosdaq_valuation_gate TICK_NORMALIZER_V1: + owner: engine_owner + status: active purpose: '한국 KRX 호가 단위(tick size) 기준으로 지정가를 내림 정규화. HTS에 입력 불가능한 소수점·단위 불일치 가격(예: 144,568원, 25,886원)을 차단. 모든 주문 유형에 floor(내림) 적용 — 매수는 낮은 가격(유리), 손절·익절은 체결 확률 우선. @@ -868,6 +906,8 @@ formula_registry: canonical_ref: spec/00_execution_contract.yaml:hard_stops.HS008_TICK_NORMALIZED_REQUIRED version: 2026-05-18_AUDIT_RESPONSE_V2 PORTFOLIO_BAND_STATUS_V1: + owner: quant_owner + status: active purpose: 현재 비중이 목표 밴드보다 낮은지, 정상인지, 초과인지 판정 inputs: - field: current_weight_pct @@ -892,6 +932,8 @@ formula_registry: missing_policy: DATA_MISSING. add/trim 결론 보류. canonical_ref: spec/risk/portfolio_exposure.yaml:portfolio_exposure_framework.target_allocation_structure FINANCIAL_HEALTH_SCORE_V1: + owner: engine_owner + status: active purpose: 'ROE·영업이익률·부채비율·FCF를 결합해 종목의 재무 건전성을 0~20점으로 정량화. 수급·모멘텀 중심 편향을 보완하는 펀더멘털 축. 연간 기준 재무 데이터 사용. @@ -1000,6 +1042,8 @@ formula_registry: canonical_ref: spec/08_scoring_rules.yaml:strategy_score.financial_health version: 2026-05-18_FINANCIAL_HEALTH_V1 PORTFOLIO_BETA_V1: + owner: quant_owner + status: active purpose: 보유 포지션의 시가기준 가중평균 베타를 산출하여 팩터 과집중 판단에 사용 inputs: - field: beta_i @@ -1040,6 +1084,8 @@ formula_registry: canonical_ref: spec/risk/portfolio_exposure.yaml:portfolio_exposure_framework.factor_risk_limit version: 2026-05-18_ROUTING_OPTIMIZATION_V1 RS_MOMENTUM_V1: + owner: engine_owner + status: active purpose: 상대강도(RS)와 수급 가속도를 측정하여 상투 진입 방지 및 후발주(Laggard) 조기 식별 inputs: - field: close_price @@ -1069,6 +1115,8 @@ formula_registry: field: alpha_shield_status unit: enum OVERSOLD_DELAY_V1: + owner: engine_owner + status: active purpose: 현금 확보 시 '지하실 매도(패닉 셀)' 방지를 위한 데드캣 바운스 대기 알고리즘 inputs: - field: rsi_14 @@ -1086,6 +1134,8 @@ formula_registry: field: oversold_exit_strategy unit: string DIVERGENCE_SCORE_V1: + owner: engine_owner + status: active purpose: '가격이 MA20 위로 상승하는 국면에서 외국인·기관이 동반 이탈하고 flow_credit이 낮으면 개인이 받아주는 취약한 구조임을 0~1 점수로 계량화. 코스피 상승 중에도 경고가 나와야 하는 핵심 선제 레이더. @@ -1133,6 +1183,8 @@ formula_registry: canonical_ref: spec/exit/proactive_exit_radar.yaml:divergence_alert version: 2026-05-19_PROACTIVE_RADAR_V1 OVERHANG_PRESSURE_V1: + owner: engine_owner + status: active purpose: '외국인 매도 속도가 최근 20D 평균 대비 급가속하면서 거래대금이 감소하면 오버행(대기 매도 물량) 누적으로 가격 지지 실패 가능성을 사전 경고. @@ -1187,6 +1239,8 @@ formula_registry: canonical_ref: spec/exit/proactive_exit_radar.yaml:overhang_warning version: 2026-05-19_PROACTIVE_RADAR_V1 SECTOR_ROTATION_RADAR_V1: + owner: engine_owner + status: active purpose: '보유 섹터의 SmartMoney 5D 점수가 -0.5 이하로 하락하고 타 섹터로 자금이 이동하는 로테이션 초기 신호를 포착한다. 주가 꺾임보다 2~4주 선행하는 수급 선행 지표. @@ -1228,6 +1282,8 @@ formula_registry: canonical_ref: spec/exit/proactive_exit_radar.yaml:sector_rotation_radar version: 2026-05-19_PROACTIVE_RADAR_V1 MEAN_REVERSION_GATE_V1: + owner: engine_owner + status: active purpose: '주가가 MA20 대비 과도하게 상승하면 신규 매수를 하드 블록한다. 에너지 분산(Distribution) 구간에서의 추격 매수(상투 잡기)를 원천 봉쇄. @@ -1258,6 +1314,8 @@ formula_registry: canonical_ref: spec/08_scoring_rules.yaml:hard_filters.HF009_OVEREXTENSION_BLOCK version: 2026-05-19_ALPHA_SHIELD_V1 FLOW_ACCELERATION_V1: + owner: engine_owner + status: active purpose: '가격 상승 중 외국인 매수 강도가 20D 평균 대비 급격히 둔화되는 에너지 소진(Distribution) 초기 신호를 포착. W1보다 선행. W1(방향 전환) 이전에 설거지 구간을 조기 경고. @@ -1299,6 +1357,8 @@ formula_registry: canonical_ref: spec/exit/proactive_exit_radar.yaml:flow_acceleration_radar version: 2026-05-19_ALPHA_SHIELD_V1 SEA_TIMING_V1: + owner: engine_owner + status: active purpose: 장중 VWAP 및 거래량 프로파일을 이용한 최적의 엑싯(Exit) 타이밍 포착 inputs: - field: current_price @@ -1326,6 +1386,8 @@ formula_registry: field: sea_action_tag unit: string ECP_RISK_SCALE_V1: + owner: quant_owner + status: active purpose: 총자산 곡선(Equity Curve) 모멘텀에 따른 리스크 예산 자동 조절 inputs: - field: total_asset @@ -1344,6 +1406,8 @@ formula_registry: field: equity_curve_status unit: enum RS_RATIO_V1: + owner: engine_owner + status: active purpose: '종목의 5D 수익률을 KOSPI 5D 수익률로 나눠 상대강도(RS)를 계산한다. sell_priority_engine의 rw_ge_4_or_rs_laggard 판정 공식. RS 강세 종목(rs_ratio >= 1.20)은 손실 중에도 매도 후순위로 보호. @@ -1378,6 +1442,8 @@ formula_registry: canonical_ref: spec/risk/portfolio_exposure.yaml:sell_priority_engine.components.weakness_points version: 2026-05-19_ALPHA_SHIELD_V1 BREAKOUT_QUALITY_GATE_V2: + owner: engine_owner + status: active purpose: '신고가 돌파 이후 3일 이상 달린 종목, MA20 대비 10% 이상 괴리, 갭업+거래량 미동반, RSI 과매수, 이미 매도신호 발생 조합을 정량 점수로 차단. N2(VOLUME_BREAKOUT_CONFIRM_V1)보다 넓은 뒷박 방지 범위를 커버한다. BUY 게이트 체인 Gate 4에서 BREAKOUT_QUALITY_GATE_V2 != BLOCKED_LATE_CHASE 조건으로 사용. @@ -1475,6 +1541,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction N2 (VOLUME_BREAKOUT_CONFIRM_V1) 확장 version: 2026-05-20_HARNESS_V5 FOLLOW_THROUGH_DAY_CONFIRM_V1: + owner: engine_owner + status: active purpose: 'O''Neil Follow-Through Day 개념을 정량화한다. 돌파 첫날(Day 1)에는 WATCH_FOLLOW_THROUGH_PENDING, 확인일(Day 2~7 이내 +1.5% 이상 상승 + 거래량 직전 돌파일 대비 90% 이상)에만 BUY_PILOT_ALLOWED. 7일 이후에도 미확인이면 FOLLOW_THROUGH_FAIL로 리셋. 첫날 돌파 즉시 BUY 지시를 구조적으로 차단해 설거지 손실을 방지한다. @@ -1543,6 +1611,8 @@ formula_registry: canonical_ref: engine_harness_upgrade_proposal_result.txt:2-B version: 2026-05-20_HARNESS_V5 EXECUTION_QUALITY_SCORE_V1: + owner: engine_owner + status: active purpose: '실제 주문 실행 후 T+1/T+3/T+5 결과를 정량 채점해 엔진 임계치 자동 개선 루프를 만든다. POOR 등급 누적 시 Late Chase 임계치 강화, Entry 임계치 완화 등을 자동 제안한다. 채점 결과는 proposal_evaluation_history.json에 누적 저장된다. @@ -1620,6 +1690,8 @@ formula_registry: canonical_ref: engine_harness_upgrade_proposal_result.txt:2-E version: 2026-05-20_HARNESS_V5 RS_VERDICT_V1: + owner: report_owner + status: active purpose: '종목의 10일 수익률을 KOSPI 10일 수익률과 비교해 초과 수익률(excess_ret_10d)을 계산하고 LEADER/MARKET/LAGGARD/BROKEN 4단계 판정을 내린다. composite_verdict, SFG_V1, RAG_V1의 선행 입력으로 사용된다. @@ -1670,6 +1742,8 @@ formula_registry: canonical_ref: spec/risk/portfolio_exposure.yaml:sell_priority_engine.weakness_points version: 2026-05-21_CLA_HARNESS_V1 COMPOSITE_VERDICT_V1: + owner: report_owner + status: active purpose: 'SS001 등급(A/B/C/D)과 rs_verdict(LEADER/MARKET/LAGGARD/BROKEN/UNKNOWN)를 결합해 종목의 최종 포지션 판정을 내린다. LLM이 "좋아 보인다"류 언어적 판단으로 판정을 변경하는 것을 구조적으로 방지한다. @@ -1712,6 +1786,8 @@ formula_registry: canonical_ref: spec/13_formula_registry.yaml:RS_VERDICT_V1 version: 2026-05-21_CLA_HARNESS_V1 REPLACEMENT_ALPHA_GATE_V1: + owner: engine_owner + status: active purpose: '위성 신규매수 전 코어 대비 알파 우위 여부를 기계적으로 검증한다. 코어보다 약한 위성에 현금을 투입하는 ''설거지 추가매수''를 원천 차단. CLA 레짐 또는 CLUSTER_HOLD_ONLY 상태에서 RAG_V1 FAIL이면 allowed_action = HOLD 강제. @@ -1760,6 +1836,8 @@ formula_registry: canonical_ref: spec/11_market_regime.yaml:CONCENTRATED_LEADER_ADVANCE version: 2026-05-21_CLA_HARNESS_V1 SATELLITE_FAILURE_GATE_V1: + owner: engine_owner + status: active purpose: '위성 포지션 전체 중 BROKEN/CLOSE_POSITION 비율이 임계값을 초과하면 TRIGGERED를 발동, 위성 전체 신규매수를 자동 차단하고 정리 대상 종목을 cashPreservePlan에 자동 포함한다. 개별 종목 판단의 합산이 아닌 ''집단 실패'' 신호로 포트폴리오 전체를 방어한다. @@ -1809,6 +1887,8 @@ formula_registry: canonical_ref: spec/13_formula_registry.yaml:COMPOSITE_VERDICT_V1 version: 2026-05-21_CLA_HARNESS_V1 BENCHMARK_RELATIVE_TIMESERIES_V1: + owner: engine_owner + status: active purpose: '종목을 KOSPI 기준 시계열로 평가해 초과낙폭, 반등 회복률, 하락장 베타, RS선 기울기와 brt_verdict를 결정론적으로 산출한다. LLM은 값 인용만 가능하다. @@ -1888,6 +1968,8 @@ formula_registry: - brt_verdict=BROKEN 종목을 낙폭과대 매수 기회로 서술 금지 version: 2026-05-21_BRT_V1_C2 RS_VERDICT_V2: + owner: report_owner + status: active purpose: RS_VERDICT_V1과 BENCHMARK_RELATIVE_TIMESERIES_V1의 brt_verdict를 보수적으로 융합한다. applicable: BRT_V1 직후. 기존 rs_verdict 필드명은 최종 V2 결과로 유지하고 rs_verdict_v1_raw를 @@ -1914,6 +1996,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-21_RS_VERDICT_V2 SATELLITE_ALPHA_QUALITY_GATE_V1: + owner: engine_owner + status: active purpose: 위성 후보가 BUY 후보로 노출되기 전 5개 필터로 ELIGIBLE/WATCHLIST_ONLY/EXCLUDED를 확정한다. inputs: - field: position_class @@ -1959,6 +2043,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-21_SAQG_V1 CASH_CREATION_PURPOSE_LOCK_V1: + owner: quant_owner + status: active purpose: 현금 만들기 또는 위성 편입 재원 마련만을 이유로 코어/주도주 매도를 생성하지 못하게 한다. inputs: - field: composite_verdict @@ -1997,6 +2083,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-21_CCPL_V1 SATELLITE_AGGREGATE_PNL_GATE_V1: + owner: engine_owner + status: active purpose: 위성 합산 평가손익이 코어 수익을 잠식하는 정도를 추적해 위성 전략 실패를 감지한다. inputs: - field: position_class @@ -2021,6 +2109,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-21_SAPG_V1 ALPHA_EVALUATION_WINDOW_V1: + owner: engine_owner + status: active purpose: 위성 추천 성과를 T+20/T+60에서 삼성전자·SK하이닉스 대비 초과수익으로 평가한다. T+1 단독 평가는 금지한다. inputs: - field: entry_date @@ -2047,6 +2137,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-21_AEW_V1 HARNESS_DATA_FRESHNESS_GATE_V1: + owner: data_owner + status: active purpose: 'harness_context 주요 입력 데이터의 영업일 기준 신선도를 검증한다. 신선도 부족 시 BRT/SAPG/SAQG 결과의 신뢰도 등급을 자동 하향하고 STALE_BLOCK 상태에서 HTS 주문표 생성을 차단한다. @@ -2086,6 +2178,8 @@ formula_registry: - LLM이 신선도를 임의 판단하거나 사용 가능으로 완화 금지 version: 2026-05-21_HDFG_V1 SATELLITE_LIFECYCLE_GATE_V1: + owner: engine_owner + status: active purpose: '위성 종목에 WATCH/PILOT/CONFIRMED/REVIEW/EXIT 5단계 라이프사이클을 부여한다. 각 단계는 전환 조건, 허용 액션, 보유 기준이 명확히 다르다. 이진 CORE/SATELLITE 분류를 확장하며 기존 분류와 병렬 적용. @@ -2168,6 +2262,8 @@ formula_registry: - EXIT -> CONFIRMED 복귀는 하네스 재산출 후만 가능 version: 2026-05-21_SLG_V1 CLA_REGIME_EXIT_CONDITION_V1: + owner: quant_owner + status: active purpose: 'CONCENTRATED_LEADER_ADVANCE 국면의 종료 조건을 결정론적으로 탐지한다. CLA 활성 중에도 하네스가 주기적으로 종료 신호(S1~S5)를 스캔한다. 종료 조건 충족 시 market_regime을 CLA -> NEUTRAL 전환 권고. @@ -2234,6 +2330,8 @@ formula_registry: - CLA_EXIT_CONFIRMED 없이 O2 반도체 25% 상한 재적용 금지 version: 2026-05-21_CLA_EXIT_V1 PORTFOLIO_CORRELATION_GATE_V1: + owner: quant_owner + status: active purpose: '위성 포지션들 간 20D 수익률 Pearson 상관관계를 계산해 동일 방향 클러스터가 포트폴리오 하락 리스크를 증폭시키는지 감지한다. 개별 Beta x 상관관계 조정으로 실질 포트폴리오 Beta(satellite_cluster_beta) 산출. @@ -2280,6 +2378,8 @@ formula_registry: - correlation_gate_status version: 2026-05-21_PCG_V1 ALPHA_FEEDBACK_LOOP_V1: + owner: engine_owner + status: active purpose: 'monthly_history의 AEW_V1 성과 데이터를 분석해 SAQG_V1 필터 임계값 조정 권고를 생성한다. 임계값 자동 변경 금지. 하네스는 권고만 생성하고 사용자가 settings 파일에서 확인 승인. @@ -2327,6 +2427,8 @@ formula_registry: - grade_count version: 2026-05-21_AFL_V1 SELL_PRICE_SANITY_V1: + owner: quant_owner + status: active purpose: 'HTS 입력 전 매도 지정가의 역전, 비현실가, 호가단위 불일치를 100% 차단한다. LS전기(E1 오류) 재발 방지: 지정가 < 손절가 역전 사례를 하네스가 선점 차단. @@ -2376,6 +2478,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction A1, HS008(TICK_NORMALIZER_V1) version: 2026-05-22_3RD_HARNESS CASH_RECOVERY_OPTIMIZER_V1: + owner: quant_owner + status: active purpose: '목표 현금 회복액에 최소 주식가치 훼손으로 도달하는 최적 매도 조합을 결정론적 산출. LLM이 "63주+24주+19주+1주" 즉석 계산(HS011 위반) 재발 방지. @@ -2427,6 +2531,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction A2, G1, G2, H2 version: 2026-05-22_3RD_HARNESS INTRADAY_ACTION_MATRIX_V1: + owner: engine_owner + status: active purpose: '장중 시각(capture_time)에 따라 허용·금지 액션을 테이블로 고정한다. 09:31 캡처임에도 전체 주간 전략 출력(E4 오류) 재발 방지. @@ -2515,6 +2621,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction A3, Direction 0(장중 제약) version: 2026-05-22_3RD_HARNESS ANTI_CHASING_VELOCITY_V1: + owner: engine_owner + status: active purpose: '가격 상승 속도가 국면별 임계값 초과 시 BUY를 결정론적으로 차단한다. N2(거래량 확인)만으로는 막지 못하는 속도 기반 뒷박 매수 원천 차단. @@ -2578,6 +2686,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction B1 version: 2026-05-22_3RD_HARNESS PULLBACK_ENTRY_TRIGGER_V1: + owner: engine_owner + status: active purpose: '뒷박 상태(ANTI_CHASING_VELOCITY BLOCK)에서 풀백 조건이 충족되면 자동 진입 트리거를 생성. "지금 사면 뒷박 → 풀백 기다려 적정 가격에 진입"을 결정론적으로 산출. @@ -2631,6 +2741,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction B2, K1 version: 2026-05-22_3RD_HARNESS DISTRIBUTION_SELL_DETECTOR_V1: + owner: quant_owner + status: active purpose: 'PRE_DISTRIBUTION_EARLY_WARNING(2신호)의 정밀도 한계 보완. 기관·외인이 개인에게 물량을 넘기는 설거지 구간을 6신호 합산으로 조기 감지. @@ -2715,6 +2827,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction B3, L4(PRE_DISTRIBUTION) version: 2026-05-22_3RD_HARNESS SELL_WATERFALL_ENGINE_V1: + owner: quant_owner + status: active purpose: '"주식가치를 크게 훼손하지 않으면서 반등 시 수익까지 고려"하는 현금확보 매도 표준화. K2(50/50 분할)를 확장한 4단계 체계. CASH_RECOVERY_OPTIMIZER_V1과 연동. @@ -2785,6 +2899,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction C1, K2 version: 2026-05-22_3RD_HARNESS SELL_LOT_PARETO_SELECTOR_V1: + owner: quant_owner + status: active purpose: > SELL_WATERFALL_ENGINE_V1의 동일 hard_precedence 단계 안에서 후보 lot을 점수화하고, 세금 회피 효과·재진입 비용·놓친 상승분까지 포함한 다목적(Pareto) 비교로 @@ -2824,6 +2940,8 @@ formula_registry: implementation: tools/build_sell_waterfall_engine_v4.py version: 2026-06-17_P0_v8_9_adoption FORECAST_SIMULATION_ENGINE_V1: + owner: engine_owner + status: active purpose: > 개별 종목의 점 추정 기대수익률이 아니라 레짐별 손익분포에서 CE70(30%분위)·CE90(10%분위)· CVaR95(95% 신뢰구간 꼬리손실 평균)를 산출한다. 표본 부족 시 가짜 분포를 만들지 않고 @@ -2860,6 +2978,8 @@ formula_registry: implementation: tools/build_forecast_simulation_engine_v1.py version: 2026-06-17_P0_v8_9_adoption SECTOR_EXPOSURE_GRAPH_V1: + owner: engine_owner + status: active purpose: > 섹터를 L1:L2:L3:L4 canonical ID로 분류하고 ETF 구성종목을 lookthrough하여 직접보유와 합산한 실질노출을 계산하며, 테마 간 중복 베타를 residualize한다. @@ -2887,6 +3007,8 @@ formula_registry: implementation: tools/build_sector_exposure_graph_v1.py version: 2026-06-17_P1_v8_9_adoption LEADER_LIFECYCLE_GATE_V1: + owner: engine_owner + status: active purpose: > 종목의 시장 주도력을 CAPTAIN/CORE_LEADER/ENABLER/CYCLICAL_BETA/LAGGARD/DISTRIBUTION_RISK로 분류하고 승급·강등을 결정론적으로 평가한다. @@ -2913,6 +3035,8 @@ formula_registry: implementation: tools/build_sector_exposure_graph_v1.py version: 2026-06-17_P1_v8_9_adoption EXECUTION_CAPACITY_LADDER_V1: + owner: engine_owner + status: active purpose: > 계획된 주문금액이 종목의 실제 체결 가능 용량을 초과하지 않도록 캡핑하고, broker_microstructure_packet이 없으면 주문 계획을 차단한다. @@ -2939,6 +3063,8 @@ formula_registry: implementation: tools/build_execution_capacity_ladder_v1.py version: 2026-06-17_P1_v8_9_adoption MODEL_GOVERNANCE_KILL_SWITCH_V1: + owner: engine_owner + status: active purpose: > data_quarantine_rate, implementation_shortfall, T5_hit_rate, calibration_error, drawdown 5개 지표를 감시해 기준 이탈 시 execution_mode를 자동으로 한 단계 강등한다. @@ -2980,6 +3106,8 @@ formula_registry: implementation: tools/build_model_governance_kill_switch_v1.py version: 2026-06-17_P1_v8_9_adoption SCENARIO_SHOCK_MATRIX_V1: + owner: engine_owner + status: active purpose: > base_case 분포에 adverse/liquidity_drought/crisis/fx_shock/tax_cost 5개 스트레스를 결정론적으로 적용해 시나리오별 CE70/CVaR95를 산출한다. @@ -3004,6 +3132,8 @@ formula_registry: implementation: tools/build_scenario_shock_matrix_v1.py version: 2026-06-17_P2_v8_9_adoption TRANSITION_SET_ENUMERATOR_V1: + owner: engine_owner + status: active purpose: > candidate 1건씩이 아니라 조합(transition_set) 단위로 hard_constraint_pass와 transition_utility_krw를 재평가해, 개별로는 통과하는 후보들의 조합이 cash_floor· @@ -3023,6 +3153,8 @@ formula_registry: implementation: tools/build_transition_set_enumerator_v1.py version: 2026-06-17_P2_v8_9_adoption IMMUTABLE_DECISION_LEDGER_V1: + owner: report_owner + status: active purpose: > 모든 의사결정을 append-only로 기록한다. 동일 decision_id 재기록은 거부하고, T1/T5/T20/MAE/MFE는 원본 레코드를 수정하지 않고 별도 append로만 추가한다. @@ -3065,6 +3197,8 @@ formula_registry: implementation: tools/build_immutable_decision_ledger_v1.py version: 2026-06-17_P2_v8_9_adoption EXECUTION_PLAN_COMPILER_V1: + owner: engine_owner + status: active purpose: > order_capacity_krw를 30/30/40 LIMIT_SPLIT 슬라이스로 컴파일하고, 슬라이스 실행 직전마다 cash_floor·capacity·spread를 재검증해 cancel_remaining_if 조건 충족 시 잔여 슬라이스를 취소한다. @@ -3088,6 +3222,8 @@ formula_registry: implementation: tools/build_execution_plan_compiler_v1.py version: 2026-06-17_P2_v8_9_adoption STATE_VECTOR_CONSTRUCTOR_V1: + owner: engine_owner + status: active purpose: > holdings, cash, tax_lots, sector_graph, factor_exposures, macro_regime_probabilities를 단일 state_vector로 통합한다. 결측 component는 null로 유지하고 추정 보완 금지. @@ -3117,6 +3253,8 @@ formula_registry: implementation: tools/build_state_vector_constructor_v1.py version: 2026-06-17_P3_v8_9_adoption REBALANCE_CADENCE_GATE_V1: + owner: engine_owner + status: active purpose: > 주간/1·11·21일 점검을 의무 실행하되, transition_utility_after_tax_cost가 양수이거나 hard_risk_block이 active일 때만 실제 리밸런싱 실행을 허용한다. @@ -3139,6 +3277,8 @@ formula_registry: implementation: tools/build_rebalance_cadence_gate_v1.py version: 2026-06-17_P3_v8_9_adoption WALK_FORWARD_BOOTSTRAP_V1: + owner: engine_owner + status: active purpose: > historical_returns에서 walk-forward(비복원, in/out-of-sample 분리) 및 regime-matched (동일 레짐 필터 + 복원추출) 리샘플링으로 net_profit_distribution을 생성한다. @@ -3158,6 +3298,8 @@ formula_registry: implementation: tools/build_walk_forward_bootstrap_v1.py version: 2026-06-17_P3_v8_9_adoption WEEKLY_LEGACY_TRANSFER_PLAN_V1: + owner: engine_owner + status: active purpose: > 주간 레거시→CMA 이전 계획을 입금 확인 전까지 deployable_cash_krw에 합산하지 않는다. (governance/todo/v8_9_p3_adoption_plan.yaml P3-E) @@ -3177,6 +3319,8 @@ formula_registry: implementation: tools/build_weekly_legacy_transfer_plan_v1.py version: 2026-06-17_P3_v8_9_adoption GOLDEN_CROSS_SIGNAL_V1: + owner: engine_owner + status: active purpose: > 단기 이동평균(ma20)이 장기 이동평균(ma60)을 상향 돌파하는 골든크로스를 정량 판정한다. STRATEGY_SCORING 보조신호로만 사용 — 단독 BUY 트리거 금지. @@ -3199,6 +3343,8 @@ formula_registry: implementation: tools/build_golden_cross_signal_v1.py version: 2026-06-18_technical_signals_p4 STRONG_CLOSE_SIGNAL_V1: + owner: engine_owner + status: active purpose: > 종가가 당일 고가-저가 범위 중 고가 근처에서 마감하는지 판정한다. (governance/todo/technical_signals_p4_adoption_plan.yaml P4-2) @@ -3218,6 +3364,8 @@ formula_registry: implementation: tools/build_strong_close_signal_v1.py version: 2026-06-18_technical_signals_p4 VOLATILITY_EXPANSION_BREAKOUT_V1: + owner: engine_owner + status: active purpose: > bb_width 수축(squeeze) 후 급등하는 패턴을 판정한다. BREAKOUT_QUALITY_GATE_V2 통과가 전제조건. (governance/todo/technical_signals_p4_adoption_plan.yaml P4-3) @@ -3237,6 +3385,8 @@ formula_registry: implementation: tools/build_volatility_expansion_breakout_v1.py version: 2026-06-18_technical_signals_p4 FIFTY_TWO_WEEK_HIGH_TRIGGER_V1: + owner: engine_owner + status: active purpose: > 종가가 52주 최고가(high52w)를 갱신하는지 판정해 BREAKOUT_QUALITY_GATE_V2 입력으로 공급한다. (governance/todo/technical_signals_p4_adoption_plan.yaml P4-4) @@ -3254,6 +3404,8 @@ formula_registry: implementation: tools/build_fifty_two_week_high_trigger_v1.py version: 2026-06-18_technical_signals_p4 CONSECUTIVE_STREAK_V1: + owner: engine_owner + status: active purpose: > N일 연속 상승(up_streak)/하락(down_streak)을 대칭적으로 공식화한다. (governance/todo/technical_signals_p4_adoption_plan.yaml P4-5) @@ -3268,6 +3420,8 @@ formula_registry: implementation: tools/build_consecutive_streak_v1.py version: 2026-06-18_technical_signals_p4 BREAKOUT_FAILURE_STOP_V1: + owner: quant_owner + status: active purpose: > 전고점 돌파 후 7거래일 이내 재이탈하면 SELL_RISK_EXIT_REVIEW를 발동한다. (governance/todo/technical_signals_p4_adoption_plan.yaml P4-6) @@ -3287,6 +3441,8 @@ formula_registry: implementation: tools/build_breakout_failure_stop_v1.py version: 2026-06-18_technical_signals_p4 TREND_FILTER_GATE_V1: + owner: engine_owner + status: active purpose: > 종가가 ma120 위에 있고 ma120이 상승 중인지 단일 게이트로 판정한다. (governance/todo/technical_signals_p4_adoption_plan.yaml P4-7) @@ -3306,6 +3462,8 @@ formula_registry: implementation: tools/build_trend_filter_gate_v1.py version: 2026-06-18_technical_signals_p4 SELL_EXECUTION_TIMING_V1: + owner: quant_owner + status: active purpose: '장중 가격 움직임에 따라 매도 주문 유형과 타이밍을 결정론적으로 판정. 장초반 패닉 매도, 반등 직전 저점 투매 방지. ' @@ -3358,6 +3516,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction C2, K2, INTRADAY_ACTION_MATRIX_V1 version: 2026-05-22_3RD_HARNESS DETERMINISTIC_ROUTING_ENGINE_V1: + owner: engine_owner + status: active purpose: '"LLM이 먼저 판단 → 하네스가 검증" 구조를 역전. 9단계 라우팅을 고정 순서로 실행하고 LLM은 최종 결과의 보고관으로만 동작. 라우팅 단계 건너뜀 및 순서 변경 절대 금지. @@ -3439,6 +3599,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction D1, Direction Q(QEH) version: 2026-05-22_3RD_HARNESS LLM_SERVING_CONSTRAINT_V1: + owner: engine_owner + status: active purpose: 'LLM이 보고서 작성 시 침범 금지 영역 8개를 명시적으로 잠금. HS011 확장판. 30년 실전 전문가의 정밀도는 자유로운 해석이 아닌 규칙 준수에서 나온다. @@ -3475,6 +3637,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction D2, Direction Q(QEH), HS011 version: 2026-05-22_3RD_HARNESS PROFIT_RATCHET_TIERED_V2: + owner: quant_owner + status: active purpose: '기존 L2(RATCHET_TRAILING_AUTO_V1)에 APEX_SUPER(+60%+) 구간 신설. 삼성전자 +61.5%(E3 오류) 재발 방지: 단순 ''보유 유지'' 서술 없이 래칫 스탑 필수 표기. @@ -3544,6 +3708,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction E1, L2(RATCHET_TRAILING_AUTO_V1), M3 version: 2026-05-22_3RD_HARNESS SELL_VALUE_PRESERVATION_TIERED_V2: + owner: quant_owner + status: active purpose: '현금확보 매도 시 ''좋은 매도''와 ''나쁜 매도''를 하네스가 자동 판별. 반등 시 추가 수익까지 고려한 세련된 매도 결정 트리 (K2 + SELL_WATERFALL 통합). @@ -3601,6 +3767,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction E2, K2, SELL_WATERFALL_ENGINE_V1 version: 2026-05-22_3RD_HARNESS TRADE_QUALITY_SCORER_V1: + owner: engine_owner + status: active purpose: '실행된 매수·매도를 T+1/T+5/T+20 기준으로 자동 채점해 뒷박/설거지/저점 투매를 데이터로 증명. O4(WIN_LOSS_STREAK_GUARD_V1) 개선 피드백 루프. @@ -3714,6 +3882,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction F1, O4(WIN_LOSS_STREAK) version: 2026-05-22_3RD_HARNESS PATTERN_BLACKLIST_AUTO_V1: + owner: engine_owner + status: active purpose: '같은 종목에서 3회 이상 POOR/CRITICAL grade가 누적되면 자동으로 강화 제한 적용. "같은 실수를 4번째는 시스템이 막는다." @@ -3750,6 +3920,8 @@ formula_registry: canonical_ref: AGENTS.md:Direction F2, TRADE_QUALITY_SCORER_V1, SAQG version: 2026-05-22_3RD_HARNESS FUNDAMENTAL_QUALITY_GATE_V1: + owner: engine_owner + status: active purpose: 펀더멘털 품질(ROE/이익성장/부채/현금흐름/밸류)을 결정론적으로 점수화해 BUY 허용 여부를 잠금. inputs: - field: roe_pct @@ -3772,6 +3944,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-25_PROPOSAL53 HORIZON_ALLOCATION_LOCK_V1: + owner: quant_owner + status: active purpose: 단기/중기/장기 투자 버킷별 비중 상한을 적용해 기간 혼재와 과집중을 차단. inputs: - field: invest_horizon @@ -3787,6 +3961,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-25_PROPOSAL53 SMART_MONEY_LIQUIDITY_GATE_V1: + owner: engine_owner + status: active purpose: '스마트머니·유동성 차단 게이트. SM001(외국인+기관 동시 순매도→BLOCK_BUY), SM002(5일 평균 거래대금 < 50억→LIMIT_QUANTITY), SM003(RSI14>70 AND flow_credit<0.3→BLOCK_BUY) 결정론 구현. FINAL_JUDGMENT_GATE_V1의 J04 입력. @@ -3801,6 +3977,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-28_PHASE6 ROUTING_SERVING_DECISION_TRACE_V2: + owner: report_owner + status: active purpose: 라우팅→서빙→게이트 경로를 단일 trace JSON으로 고정해 사후감사 가능성 확보. inputs: - field: routing_trace_json @@ -3812,6 +3990,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-25_PROPOSAL53 FUNDAMENTAL_MULTI_FACTOR_SCORE_V2: + owner: engine_owner + status: active purpose: 이익률/성장률/점유율/현금흐름/부채를 종합 점수화해 매수 허용을 잠금. inputs: - field: roe_pct @@ -3843,6 +4023,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-25_PROPOSAL54 EARNINGS_GROWTH_QUALITY_GATE_V1: + owner: engine_owner + status: active purpose: 분기/연간 이익 성장 일관성으로 매수 게이트를 잠금. inputs: - field: eps_growth_qoq_pct @@ -3856,6 +4038,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-25_PROPOSAL54 MARKET_SHARE_MOMENTUM_PROXY_V1: + owner: engine_owner + status: active purpose: 상대 성장/RS 기반 점유율 모멘텀 프록시를 산출해 공격 매수 여부를 잠금. inputs: - field: revenue_growth_pct @@ -3869,6 +4053,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-25_PROPOSAL54 CASHFLOW_STABILITY_GATE_V1: + owner: quant_owner + status: active purpose: 영업/잉여 현금흐름 및 회계 위험으로 현금흐름 안정성 게이트를 잠금. inputs: - field: operating_cf_krw @@ -3885,6 +4071,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-25_PROPOSAL54 ROUTING_DECISION_EXPLAIN_LOCK_V1: + owner: report_owner + status: active purpose: 최종 의사결정 게이트 경로와 차단사유를 JSON으로 고정. inputs: - field: export_gate_json @@ -3894,6 +4082,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-25_PROPOSAL54 BLANK_CELL_AUDIT_V1: + owner: engine_owner + status: active purpose: '보고서 GFM 표의 빈 셀·일률 stub 라벨을 감사하여 셀-레벨 결정론 충족 여부를 판정한다. 금지 일률값(데이터 누락/NEUTRAL/LOSING/정상/-/빈문자)이 하나라도 있으면 INCOMPLETE_TABLE. enforcement_mode_until 이전은 WARN_ONLY, 이후 hard-block. @@ -3911,6 +4101,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE1 VALUE_PRESERVATION_SCORER_V1: + owner: engine_owner + status: active purpose: '종목별 가치 훼손 점수(value_damage_score 0~100) + 반등 잠재력(rebound_potential 0~100) + 권고 동작(recommended_action)을 결정론 공식으로 산출한다. SCRS-V2 selected_combo의 빈 셀에 주입하여 LLM 자유 해석을 차단한다. @@ -3950,6 +4142,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE1 SMART_CASH_RECOVERY_V3: + owner: quant_owner + status: active purpose: '국면별 동적 rebound_factor + 유동성 라벨(DEEP/NORMAL/THIN/FROZEN) 기반으로 선제매도 분할 방식(exec_mode)을 결정론적으로 산출한다. 설거지·지하실 매도를 차단하고 반등 수익을 포착한다. SCRS-V2 V3 확장판. @@ -3979,6 +4173,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE1 RATCHET_TRAILING_GENERAL_V1: + owner: engine_owner + status: active purpose: '모든 보유 종목(수익률≥0%)에 7-tier 공식으로 auto_trailing_stop을 산출한다. 기존 APEX 한정 trailing을 전 종목으로 일반화. 수익 보호 + 뒷박 재진입 차단. @@ -4004,6 +4200,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE1 EJCE_VIEW_RENDERER_V1: + owner: report_owner + status: active purpose: 'ejce_consensus_table의 Analyst/Trader/Quant 본문 셀을 결정론 템플릿으로 채운다. AGENTS.md EJ1 의무: 3관점 모두 인용. 본문 셀 비면 INCOMPLETE_EJCE_REPORT. @@ -4030,6 +4228,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE1 ROUTING_EXECUTION_LOG_TABLE_V1: + owner: engine_owner + status: active purpose: 'DETERMINISTIC_ROUTING_ENGINE_V1 11단계(①CV-V2사전검증 ②데이터신선도 ③장중판별 ④포트폴리오상태 ⑤거시이벤트동기화 ⑥선제매도레이더 ⑦매수타이밍게이트 ⑧매도우선순위/현금확보 ⑨RS/위성품질 ⑩가격정규화/검증 ⑪LLM서빙)의 실행 로그를 표로 강제 출력한다. GAS 미보고 단계는 결정론 fallback으로 보강. 누락 단계 > 0이면 INCOMPLETE_ROUTING_LOG. @@ -4049,6 +4249,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE1 FUNDAMENTAL_RAW_INGEST_V1: + owner: data_owner + status: active purpose: 'data_feed(Forward_PE/PBR/EPS)와 네이버 금융 fallback을 통해 보유 종목의 펀더멘털 raw 지표를 수집하고 fundamental_raw_v1.json을 생성한다. @@ -4062,6 +4264,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE2 FUNDAMENTAL_MULTIFACTOR_V3: + owner: engine_owner + status: active purpose: 'ROE(25) + OPM(20) + OCF(15) + FCF(15) + Debt(10) + Valuation(15) = 100점 6요소 결정론 공식으로 종목별 펀더멘털 등급을 산출한다. ETF는 별도 분류, 데이터 부족 시 보유 필드 기준 정규화 적용. @@ -4075,6 +4279,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE2 HORIZON_CLASSIFICATION_V1: + owner: engine_owner + status: active purpose: '펀더멘털 등급 + 이격도 + ATR% + RSI14 기반으로 종목별 투자 기간을 분류한다. LONG/MID/SHORT/ETF/UNKNOWN 결정론 트리. HORIZON_ALLOCATION_LOCK_V1에 주입. @@ -4088,6 +4294,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE2 SMART_MONEY_FLOW_SIGNAL_V2: + owner: engine_owner + status: active purpose: 'Frg_5D/20D + Inst_5D/20D 백분위 기반으로 종목별 스마트머니 흐름을 산출한다. STRONG_INFLOW / INFLOW / NEUTRAL / OUTFLOW / STRONG_OUTFLOW 라벨 분산 강제. @@ -4101,6 +4309,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE3 LIQUIDITY_FLOW_SIGNAL_V1: + owner: engine_owner + status: active purpose: 'AvgTradeValue_20D_M 기반으로 종목별 유동성을 DEEP/NORMAL/THIN/FROZEN으로 분류하고 매도 실행 모드(MARKET_OK/LIMIT_NEAR_BID/TWAP_SPLIT/HOLD)를 결정한다. @@ -4114,6 +4324,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE3 PORTFOLIO_ALPHA_CONFIDENCE_PER_TICKER_V1: + owner: quant_owner + status: active purpose: '기존 포트폴리오 전체 단일값 PAC(-90.7)를 종목별 분산 PAC로 교체. entry_freshness(35) + breakout_quality(25) + flow_accel(20) + fundamental(10) + rs_slope(10) 결합. BULLISH/NEUTRAL/BEARISH 라벨 분산. stddev ≥ 5 강제. @@ -4128,6 +4340,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE3 EARNINGS_QUALITY_SIGNAL_V1: + owner: engine_owner + status: active purpose: 'OPM(영업이익률) 기반 이익 품질을 결정론적으로 라벨링한다. EXPANDING/STABLE/CONTRACTING/VOLATILE/DATA_MISSING 라벨과 buy_modifier(+10 ~ -15)를 종목별로 산출한다. @@ -4141,6 +4355,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE2B GROWTH_RATE_SIGNAL_V1: + owner: engine_owner + status: active purpose: 'EPS YoY / 매출 YoY 기반 성장률 시그널을 결정론적으로 산출한다. HYPER_GROWTH/GROWTH/FLAT/DECLINE/DATA_MISSING 라벨과 단/중/장기 horizon 적합도를 포함한다. @@ -4154,6 +4370,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE2B CASHFLOW_QUALITY_SIGNAL_V1: + owner: quant_owner + status: active purpose: 'OCF/FCF 기반 현금흐름 안정성을 결정론적으로 라벨링한다. ROBUST/STABLE/VOLATILE/RISKY/DATA_MISSING 라벨과 ACCOUNTING_RISK 플래그(OCF < NI 의심)를 산출한다. @@ -4167,6 +4385,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE2B MARKET_SHARE_SIGNAL_V2: + owner: engine_owner + status: active purpose: '실매출 점유율 데이터 없는 환경에서 AvgTradeValue_20D_M 백분위 + 외인/기관 수급 + 20일 모멘텀 3중 프록시로 GAINING/STABLE/LOSING/NO_PEER_DATA를 산출한다. confidence는 항상 LOW(proxy 기반). 실데이터 확보 시 HIGH confidence로 업그레이드 예정. @@ -4181,6 +4401,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-27_PHASE2B TRADE_QUALITY_FROM_T5_V1: + owner: engine_owner + status: active purpose: '운영(non-backfill) T+5 outcome MATCHED/MISMATCH 기반으로 per-ticker 및 전체 거래품질 점수를 산출한다. T+20 성숙 전 bridge; T+20 성숙 후 자동 승격. @@ -4195,6 +4417,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-28_PHASE4 PREDICTION_ACCURACY_HARNESS_V2: + owner: data_owner + status: active purpose: '운영 T+1/T+5/T+20 일치율을 90/30/7일 회전 윈도로 산출. calibration_state: CALIBRATED/MONITOR/PAE_CALIBRATION_REQUIRED/BUY_PROPOSAL_FROZEN_RECOMMEND. ' @@ -4208,6 +4432,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-28_PHASE4 MACRO_EVENT_TICKER_IMPACT_V1: + owner: engine_owner + status: active purpose: 'FOMC·CPI·옵션만기·반도체가이던스·관세 정적 카탈로그 × 종목 섹터 민감도로 impact_score(-100~+100)와 action_gate를 산출한다. 뒷박 차단 5중 AND의 1표(ALEG-V3+DSD-V1+breakout+smart_money+macro_event). @@ -4221,6 +4447,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-28_PHASE4 SELL_WATERFALL_ENGINE_V2: + owner: quant_owner + status: active purpose: 'V1 4단계 유지 + 호가단위 슬리피지(bps) 시뮬, TWAP/지정가 분할(유동성기반), 부분체결 잔량 자동 stage 승격(단계 건너뜀 금지). @@ -4234,6 +4462,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-28_PHASE4 EXECUTION_METHOD_LADDER_V1: + owner: engine_owner + status: active purpose: '매도 실행 방식 계약표. NORMAL_LIQUIDITY / HIGH_LIQUIDITY_BREACH / OVERSOLD_REBOUND / EMERGENCY 의 order_type, split_count, trigger_rule 을 단일 표로 고정한다. LLM은 ladder를 재해석하지 않고 Temp/sell_execution_timing_lock_v2.json 과 Temp/sell_waterfall_engine_v2.json 을 복사 참조만 한다. @@ -4255,6 +4485,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-06_PHASE6 LLM_NARRATIVE_TEMPLATE_LOCK_V1: + owner: report_owner + status: active purpose: 'operational_report.json 각 section.markdown에서 금지 어휘(같다/약간/곧/강한모멘텀 등)를 스캔한다. 발견 시 INVALID_NARRATIVE. gate=PASS: 금지어 0건 강제. @@ -4268,6 +4500,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-28_PHASE5 EJCE_DIVERGENCE_AUDIT_V1: + owner: engine_owner + status: active purpose: 'EJCE 3관점 block_reasons 다양성 감사. 10/10 동일 사유 → ANALYST_VIEW_HOMOGENEOUS 경고. unique_reason_pct < 60% → WARN. @@ -4282,6 +4516,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-28_PHASE5 PREDICTIVE_ALPHA_REPORT_LOCK_V2: + owner: report_owner + status: active purpose: 'predictive_alpha_json에서 thesis_signals/antithesis_signals/synthesis_score를 종목별 표로 강제 출력. coverage_pct >= 100% 필요 (ETF 예외 허용 시 >= 80%). @@ -4295,6 +4531,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-28_PHASE5 FINAL_JUDGMENT_GATE_V1: + owner: report_owner + status: active purpose: '판단 결정론 계층 — 키스톤. 모든 게이트·신호 JSON + _harness_context를 읽어 종목별 단일 action_verdict를 AND-11 조건으로 결정론 산출. action_verdict in {BUY_PILOT, HOLD, TRIM, SELL, WATCH, BLOCKED}. harness_key 부재 시 DATA_MISSING 명시(silent PASS 금지). effective_confidence @@ -4313,6 +4551,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-28_PHASE6 VERDICT_CONSISTENCY_LOCK_V1: + owner: report_owner + status: active purpose: '판단 일관성 잠금 — operational_report.json의 서술을 final_judgment_gate_v1.json verdict와 대조. verdict=BLOCKED/SELL인데 보고서가 긍정 BUY 서술 → INVALID_VERDICT_OVERRIDE 위반, gate=FAIL. LLM의 verdict 자유도를 0으로 제거. 사용자 H10 수동 오버라이드는 예외. @@ -4328,6 +4568,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-28_PHASE6 INVESTMENT_QUALITY_HEADLINE_V1: + owner: report_owner + status: active purpose: 'schema_presence=100% vs investment_quality=13% 충돌을 보고서 CORE 첫 섹션으로 강제 표기. 거짓 표면화 게이트. effective_confidence = raw × cap_factor 적용 증빙. DATA_QUALITY_RECONCILIATION_V1 gate=CONFLICT 시 보고서 첫 섹션에 ⚠️ 경고 표시. @@ -4342,6 +4584,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-28_PHASE6 CANONICAL_METRICS_V1: + owner: engine_owner + status: active purpose: 'spec/25_canonical_metrics_registry.yaml에 정의된 논리 지표(cluster_pct, cash_min_required_krw 등)를 단일 정규 원천에서 산출해 Temp/canonical_metrics_v1.json으로 제공. 렌더러가 여러 JSON 객체에서 같은 지표를 중복 읽어 불일치 값을 출력하는 버그를 차단한다(단일 진실원천 아키텍처). @@ -4374,6 +4618,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-29_PHASE7 CROSS_SECTION_CONSISTENCY_V1: + owner: engine_owner + status: active purpose: 'operational_report.json 섹션 markdown을 파싱해 CANONICAL_METRICS_V1 지표가 여러 섹션에서 동일한 canonical 값으로 렌더링됐는지 검증. 충돌 발견 시 gate=FAIL(WARN). AGENTS.md R1 enforcement_mode_until 단계적 차단 정책 적용. @@ -4393,6 +4639,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-29_PHASE7 VELOCITY_V1: + owner: engine_owner + status: active purpose: '1일/5일 가격 속도를 계산해 뒷박 추격 차단과 풀백 트리거의 입력으로 공급한다. ' @@ -4415,6 +4663,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 PROFIT_LOCK_STAGE_V1: + owner: quant_owner + status: active purpose: '수익률 구간을 NORMAL/BREAKEVEN/PROFIT_LOCK/APEX 계열로 분류한다. ' @@ -4430,6 +4680,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 ANTI_LATE_ENTRY_GATE_V2: + owner: engine_owner + status: active purpose: '속도, 거래량, 추세 3개 게이트를 결합해 늦은 추격 진입을 차단한다. ' @@ -4446,6 +4698,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 DYNAMIC_HEAT_GATE_V1: + owner: quant_owner + status: active purpose: '국면별 총 위험노출 임계값을 산출해 신규 매수 차단 여부를 결정한다. ' @@ -4465,6 +4719,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 POSITION_SIZE_REGIME_SCALE_V1: + owner: quant_owner + status: active purpose: '국면별 포지션 크기 스케일을 결정론적으로 산출한다. ' @@ -4480,6 +4736,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 REGIME_CASH_UPLIFT_V1: + owner: quant_owner + status: active purpose: '국면별 최소 현금비율 상향값을 산출해 cash floor의 하한을 정한다. ' @@ -4498,6 +4756,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 DRAWDOWN_GUARD_V1: + owner: data_owner + status: active purpose: '연속 손절/성과 악화 구간에서 신규 매수 수량을 자동 축소하거나 차단한다. ' @@ -4517,6 +4777,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 POSITION_COUNT_LIMIT_V1: + owner: quant_owner + status: active purpose: '동시 보유 종목 수 상한과 초과 여부를 판단한다. ' @@ -4536,6 +4798,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 CASH_FLOOR_V1: + owner: quant_owner + status: active purpose: '목표 현금비중과 현금 부족액의 최소 기준을 확정한다. ' @@ -4559,6 +4823,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 SEMICONDUCTOR_CLUSTER_GATE_V1: + owner: engine_owner + status: active purpose: '반도체 클러스터 집중도와 국면별 차단/감축 여부를 판단한다. ' @@ -4578,6 +4844,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 SINGLE_POSITION_WEIGHT_CAP_V1: + owner: quant_owner + status: active purpose: '단일 종목 비중 상한과 초과 TRIM 필요 여부를 판단한다. ' @@ -4597,6 +4865,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 REGIME_TRIM_GUIDANCE_V1: + owner: engine_owner + status: active purpose: '국면별 현금확보용 TRIM 우선순위를 결정한다. ' @@ -4615,6 +4885,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 HEAT_CONCENTRATION_ALERT_V1: + owner: quant_owner + status: active purpose: '단일 종목이 총 Heat의 과도한 비중을 차지하는지 경보를 낸다. ' @@ -4630,6 +4902,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 SECTOR_CONCENTRATION_LIMIT_V1: + owner: engine_owner + status: active purpose: '섹터 편중 한도와 신규 BUY 차단 여부를 판단한다. ' @@ -4649,6 +4923,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 PORTFOLIO_DRAWDOWN_GATE_V1: + owner: data_owner + status: active purpose: '포트폴리오 고점 대비 낙폭을 산출해 신규 BUY 차단 여부를 판단한다. ' @@ -4668,6 +4944,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 K2_STAGED_REBOUND_SELL_V1: + owner: quant_owner + status: active purpose: '과매도 구간 현금확보 매도를 50/50 분할과 반등 대기로 구조화한다. ' @@ -4691,6 +4969,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 STOP_BREACH_ALERT_V1: + owner: quant_owner + status: active purpose: '손절가 이탈 여부와 즉시 청산 경보를 결정한다. ' @@ -4710,6 +4990,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 SECTOR_ROTATION_MOMENTUM_V1: + owner: engine_owner + status: active purpose: '섹터 로테이션 모멘텀 상태와 신규 매수 적합성을 판정한다. ' @@ -4728,6 +5010,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 ANTI_WHIPSAW_GATE_V1: + owner: engine_owner + status: active purpose: '반등/조정 혼선 구간에서 설거지성 매수와 성급한 매도를 차단한다. ' @@ -4749,6 +5033,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 BREAKEVEN_RATCHET_V1: + owner: engine_owner + status: active purpose: '손익분기 이상 구간에서 손절선을 평단 이상으로 올리는 래칫을 산출한다. ' @@ -4767,6 +5053,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 MARKET_WEIGHT_AWARE_CLUSTER_GATE_V1: + owner: engine_owner + status: active purpose: '시장 반도체 비중을 반영한 동적 클러스터 차단/경고 임계값을 산출한다. ' @@ -4787,6 +5075,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 LEADER_POSITION_WEIGHT_CAP_V1: + owner: quant_owner + status: active purpose: '주도주 종목별 차등 비중 상한과 초과 TRIM 필요 여부를 산출한다. ' @@ -4807,6 +5097,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 CAPITAL_STYLE_ALLOCATION_V1: + owner: quant_owner + status: active purpose: '투자성향별 자금 유동성/공격성 가중치와 conviction을 산출한다. ' @@ -4830,6 +5122,8 @@ formula_registry: llm_allowed: cite_only version: 2026-05-30_PHASE8 ALGORITHM_GUIDANCE_PROOF_V1: + owner: engine_owner + status: active purpose: 'YAML↔GAS 커버리지·결정론·LLM 의존도를 종합해 알고리즘 안내 품질 점수를 산출한다. ' @@ -4844,6 +5138,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE ANTI_CHASE_V1: + owner: engine_owner + status: active purpose: '뒷북·설거지 진입을 차단하는 velocity 기반 anti-chase 게이트를 산출한다. ' @@ -4857,6 +5153,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE ARTIFACT_FRESHNESS_GATE_V1: + owner: data_owner + status: active purpose: '하네스 산출물의 타임스탬프를 검증해 신선도 게이트를 산출한다. ' @@ -4869,6 +5167,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE AUDIT_REPLAY_SNAPSHOT_V1: + owner: engine_owner + status: active purpose: 'replay 시뮬레이션의 스냅샷을 생성해 의사결정 재현 감사를 지원한다. ' @@ -4882,6 +5182,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE CANONICAL_ARTIFACT_RESOLVER_V1: + owner: engine_owner + status: active purpose: '동일 의미의 중복 산출물 중 유일 출처를 지정해 단일 진실원장을 고정한다. ' @@ -4894,6 +5196,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE CASH_RAISE_PARETO_EXECUTOR_V2: + owner: quant_owner + status: active purpose: '현금 확보 매도에서 파레토 최적 종목·수량 조합을 산출한다. ' @@ -4907,6 +5211,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE CASH_RAISE_VALUE_OPTIMIZER_V3: + owner: quant_owner + status: active purpose: '현금확보 매도의 가치 손실을 최소화하는 종목·수량·실행방식을 결정한다. ' @@ -4920,6 +5226,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE CASH_RECOVERY_OPTIMIZER_V4: + owner: quant_owner + status: active purpose: 'TRIM 우선순위·K2 분할·반등 대기를 결합해 현금 회복 실행 계획을 산출한다. ' @@ -4933,6 +5241,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE CASH_RECOVERY_V1: + owner: quant_owner + status: active purpose: '현금 부족액 대비 단순 비례 매도 계획을 산출한다 (V4로 대체됨, 하위호환 유지). ' @@ -4945,6 +5255,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE COMPLETION_GAP_V1: + owner: engine_owner + status: active purpose: 'pass_100 기준 대비 미충족 항목과 격차를 정량화해 완료 갭 보고서를 산출한다. ' @@ -4957,6 +5269,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE COMPREHENSIVE_PROPOSAL_V1: + owner: engine_owner + status: active purpose: '매수·매도·보유·현금확보 전 섹션을 통합한 종합 제안서를 생성한다. ' @@ -4970,6 +5284,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE CONTINUOUS_EVALUATION_DASHBOARD_V1: + owner: engine_owner + status: active purpose: 'T+1/T+5/T+20 성과를 주간 자동 갱신하는 연속 평가 대시보드를 산출한다. ' @@ -4983,6 +5299,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE DATA_INTEGRITY_100_LOCK_V1: + owner: data_owner + status: active purpose: '핵심 데이터 필드의 정합성을 검증해 100% 잠금 게이트를 산출한다 (V2로 대체됨). ' @@ -4994,6 +5312,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE DATA_INTEGRITY_100_LOCK_V2: + owner: data_owner + status: active purpose: '전 섹션 수치 일관성·출처 추적 가능성을 검증해 데이터 무결성 잠금을 산출한다. ' @@ -5006,6 +5326,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE DATA_INTEGRITY_SCORE_V1: + owner: data_owner + status: active purpose: '하네스 컨텍스트 전체의 데이터 무결성 점수를 산출한다. ' @@ -5016,6 +5338,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE DATA_MATURITY_TRUTH_GATE_V1: + owner: data_owner + status: active purpose: 'type_A(결정론)/type_B(표본 의존) 축을 분리해 진실성 기반 성숙도 게이트를 산출한다. ' @@ -5030,6 +5354,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE DATA_MATURITY_TRUTH_GATE_VALIDATOR_V1: + owner: data_owner + status: active purpose: 'DATA_MATURITY_TRUTH_GATE_V1 산출값의 형식·범위 유효성을 검증한다. ' @@ -5041,6 +5367,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE DATA_QUALITY_GATE_V2_PY: + owner: data_owner + status: active purpose: 'Python 하네스 전용 데이터 품질 게이트 v2. GAS 버전과 parity 검증. ' @@ -5054,6 +5382,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE DATA_QUALITY_GATE_V3: + owner: data_owner + status: active purpose: '데이터 품질 게이트 v3. imputed 데이터 비율·출처 신뢰도를 추가 검증한다. ' @@ -5068,6 +5398,8 @@ formula_registry: llm_allowed: cite_only version: 2026-06-03_ORPHAN_RECONCILE REGIME_CONDITIONAL_MACRO_FACTOR_V1: + owner: engine_owner + status: active purpose: 거시팩터 종목별 FX 민감도 베타 적용 — 단일팩터 전 종목 균일 지배 차단 (Direction SFP1) agents_md_ref: 'Direction SFP1: SINGLE_FACTOR_DOMINANCE_CAP_V1' inputs: @@ -5096,6 +5428,8 @@ formula_registry: calibration_ref: spec/calibration_registry.yaml:NF1 (EXPERT_PRIOR) version: 2026-06-04_NF1 PORTFOLIO_TRANSITION_UTILITY_V1: + owner: quant_owner + status: active purpose: > 개별 매수·매도 추천이 아니라 포트폴리오 전체의 사후 상태(전환 후 cash floor, 집중도, CVaR, 세후비용, 회전율)를 비교해 단일 최선 전환 또는 NO_TRADE를 결정론적으로 선택한다. @@ -5134,6 +5468,8 @@ formula_registry: canonical_ref: spec/formulas/domains/portfolio.yaml:PORTFOLIO_TRANSITION_UTILITY_V1 version: 2026-06-17_P0_v8_9_adoption REBOUND_CAPTURE_THESIS_FACTOR_V1: + owner: engine_owner + status: active purpose: 과매도 반등 진입을 thesis 팩터로 명시 — 영구 약세편향 해소 (Direction SFP1) agents_md_ref: 'Direction SFP1: SINGLE_FACTOR_DOMINANCE_CAP_V1 — REBOUND_CAPTURE thesis 반영' @@ -5169,6 +5505,8 @@ formula_registry: calibration_ref: spec/calibration_registry.yaml:NF2 (EXPERT_PRIOR) version: 2026-06-04_NF2 ENTRY_TIMING_DECILE_FACTOR_V1: + owner: engine_owner + status: active purpose: 뒷박 매수 임계값 하드코딩 제거 — T+5 실측 분포 분위 기반 동적 컷 (Direction LC1) agents_md_ref: 'Direction LC1: LATE_CHASE_CALIBRATION_LOCK_V1' inputs: @@ -5205,6 +5543,8 @@ formula_registry: calibration_ref: spec/calibration_registry.yaml:NF3 version: 2026-06-04_NF3 SELL_SLIPPAGE_BUDGET_FACTOR_V1: + owner: quant_owner + status: active purpose: 현금확보 매도 ADV 5% 참여율 한도 TWAP 분할 — 설거지·주식가치 훼손 최소화 (Direction VD1) agents_md_ref: 'Direction VD1: VALUE_DAMAGE_RAW_GATE_V1 — TWAP 참여율 의무' inputs: @@ -5243,6 +5583,8 @@ formula_registry: calibration_ref: spec/calibration_registry.yaml:NF4 (EXPERT_PRIOR) version: 2026-06-04_NF4 PROFIT_GIVEBACK_RATCHET_FACTOR_V1: + owner: quant_owner + status: active purpose: 수익금 보전 ATR 기반 동적 래칫 — 번 돈을 지키는 원칙 (Direction E1·L2·R4 확장) agents_md_ref: Direction E1(APEX_SUPER), L2(ATR 트레일링), R4(전 보유종목 coverage) inputs: diff --git a/src/quant_engine/compile_formula_registry_v1.py b/src/quant_engine/compile_formula_registry_v1.py index 0dec72f..989e13e 100644 --- a/src/quant_engine/compile_formula_registry_v1.py +++ b/src/quant_engine/compile_formula_registry_v1.py @@ -31,8 +31,8 @@ def write_text(path: Path, text: str) -> None: def build_stub(formula_id: str, spec: dict[str, Any]) -> str: inputs = spec.get("inputs") or [] outputs = spec.get("outputs") or spec.get("output_fields") or [] - owner = spec.get("owner", "TODO_REQUIRED") - status = spec.get("status", "TODO_REQUIRED") + owner = spec.get("owner") + status = spec.get("status") input_fields = [item.get("field") for item in inputs if isinstance(item, dict) and item.get("field")] return ( f'"""Auto-generated formula stub for {formula_id}."""\n' diff --git a/src/quant_engine/models/generated/breakout_failure_stop_v1_schema.schema.json b/src/quant_engine/models/generated/breakout_failure_stop_v1_schema.schema.json index a57ec5c..f84661e 100644 --- a/src/quant_engine/models/generated/breakout_failure_stop_v1_schema.schema.json +++ b/src/quant_engine/models/generated/breakout_failure_stop_v1_schema.schema.json @@ -4,13 +4,39 @@ "title": "BREAKOUT_FAILURE_STOP_V1", "type": "object", "properties": { - "formula_id": { "const": "BREAKOUT_FAILURE_STOP_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "BREAKOUT_FAILURE_STOP_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["prior_high", "close_price", "days_since_breakout"], - "x_formula_outputs": ["breakout_failure"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "prior_high", + "close_price", + "days_since_breakout" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/consecutive_streak_v1_schema.schema.json b/src/quant_engine/models/generated/consecutive_streak_v1_schema.schema.json index 3be26a7..b66def2 100644 --- a/src/quant_engine/models/generated/consecutive_streak_v1_schema.schema.json +++ b/src/quant_engine/models/generated/consecutive_streak_v1_schema.schema.json @@ -4,13 +4,37 @@ "title": "CONSECUTIVE_STREAK_V1", "type": "object", "properties": { - "formula_id": { "const": "CONSECUTIVE_STREAK_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "CONSECUTIVE_STREAK_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["daily_close_changes"], - "x_formula_outputs": ["up_streak", "down_streak"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "daily_close_changes" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/execution_capacity_ladder_v1_schema.schema.json b/src/quant_engine/models/generated/execution_capacity_ladder_v1_schema.schema.json index 89da6b3..57418b0 100644 --- a/src/quant_engine/models/generated/execution_capacity_ladder_v1_schema.schema.json +++ b/src/quant_engine/models/generated/execution_capacity_ladder_v1_schema.schema.json @@ -40,7 +40,5 @@ "orderbook_top3_depth_krw", "spread_bps" ], - "x_formula_outputs": [ - "order_capacity_krw" - ] + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/execution_plan_compiler_v1_schema.schema.json b/src/quant_engine/models/generated/execution_plan_compiler_v1_schema.schema.json index ea7f93e..fc70006 100644 --- a/src/quant_engine/models/generated/execution_plan_compiler_v1_schema.schema.json +++ b/src/quant_engine/models/generated/execution_plan_compiler_v1_schema.schema.json @@ -4,13 +4,39 @@ "title": "EXECUTION_PLAN_COMPILER_V1", "type": "object", "properties": { - "formula_id": { "const": "EXECUTION_PLAN_COMPILER_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "EXECUTION_PLAN_COMPILER_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["order_capacity_krw", "revalidation_snapshot", "baseline_snapshot"], - "x_formula_outputs": ["compiled_slices"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "order_capacity_krw", + "revalidation_snapshot", + "baseline_snapshot" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/fifty_two_week_high_trigger_v1_schema.schema.json b/src/quant_engine/models/generated/fifty_two_week_high_trigger_v1_schema.schema.json index a13a0d9..afcc0ab 100644 --- a/src/quant_engine/models/generated/fifty_two_week_high_trigger_v1_schema.schema.json +++ b/src/quant_engine/models/generated/fifty_two_week_high_trigger_v1_schema.schema.json @@ -4,13 +4,38 @@ "title": "FIFTY_TWO_WEEK_HIGH_TRIGGER_V1", "type": "object", "properties": { - "formula_id": { "const": "FIFTY_TWO_WEEK_HIGH_TRIGGER_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "FIFTY_TWO_WEEK_HIGH_TRIGGER_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["close_price", "high52w"], - "x_formula_outputs": ["fifty_two_week_high_breakout"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "close_price", + "high52w" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/forecast_simulation_engine_v1_schema.py b/src/quant_engine/models/generated/forecast_simulation_engine_v1_schema.py new file mode 100644 index 0000000..fb37557 --- /dev/null +++ b/src/quant_engine/models/generated/forecast_simulation_engine_v1_schema.py @@ -0,0 +1,33 @@ +"""Auto-generated schema model descriptor.""" +from __future__ import annotations + +from dataclasses import dataclass +import json +from pathlib import Path +from typing import Any + +SCHEMA_TITLE = 'FORECAST_SIMULATION_ENGINE_V1' +SCHEMA_ID = 'schema://formula/FORECAST_SIMULATION_ENGINE_V1' +SCHEMA_PATH = 'schemas/generated/forecast_simulation_engine_v1.schema.json' +SCHEMA_PROPERTIES = ['formula_id', 'owner', 'status', 'inputs', 'outputs'] +SCHEMA_REQUIRED = ['formula_id', 'owner', 'status', 'inputs', 'outputs'] + +@dataclass(frozen=True) +class SchemaModel: + title: str + schema_id: str + path: str + properties: list[str] + required: list[str] + +def load_schema() -> dict[str, Any]: + return json.loads(Path(__file__).with_suffix('.schema.json').read_text(encoding='utf-8')) + +def describe() -> SchemaModel: + return SchemaModel( + title=SCHEMA_TITLE, + schema_id=SCHEMA_ID, + path=SCHEMA_PATH, + properties=list(SCHEMA_PROPERTIES), + required=list(SCHEMA_REQUIRED), + ) diff --git a/src/quant_engine/models/generated/forecast_simulation_engine_v1_schema.schema.json b/src/quant_engine/models/generated/forecast_simulation_engine_v1_schema.schema.json new file mode 100644 index 0000000..8193bb1 --- /dev/null +++ b/src/quant_engine/models/generated/forecast_simulation_engine_v1_schema.schema.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "schema://formula/FORECAST_SIMULATION_ENGINE_V1", + "title": "FORECAST_SIMULATION_ENGINE_V1", + "type": "object", + "properties": { + "formula_id": { + "const": "FORECAST_SIMULATION_ENGINE_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "net_profit_distribution_after_tax_fee_slippage", + "sample_count_total", + "sample_count_same_regime", + "execution_mode" + ], + "x_formula_outputs": [] +} diff --git a/src/quant_engine/models/generated/golden_cross_signal_v1_schema.schema.json b/src/quant_engine/models/generated/golden_cross_signal_v1_schema.schema.json index 4bd61c9..d4561eb 100644 --- a/src/quant_engine/models/generated/golden_cross_signal_v1_schema.schema.json +++ b/src/quant_engine/models/generated/golden_cross_signal_v1_schema.schema.json @@ -4,13 +4,40 @@ "title": "GOLDEN_CROSS_SIGNAL_V1", "type": "object", "properties": { - "formula_id": { "const": "GOLDEN_CROSS_SIGNAL_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "GOLDEN_CROSS_SIGNAL_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["ma20", "ma20_prev", "ma60", "ma60_prev"], - "x_formula_outputs": ["golden_cross_today"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "ma20", + "ma20_prev", + "ma60", + "ma60_prev" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/immutable_decision_ledger_v1_schema.schema.json b/src/quant_engine/models/generated/immutable_decision_ledger_v1_schema.schema.json index c11c702..688b12a 100644 --- a/src/quant_engine/models/generated/immutable_decision_ledger_v1_schema.schema.json +++ b/src/quant_engine/models/generated/immutable_decision_ledger_v1_schema.schema.json @@ -4,13 +4,41 @@ "title": "IMMUTABLE_DECISION_LEDGER_V1", "type": "object", "properties": { - "formula_id": { "const": "IMMUTABLE_DECISION_LEDGER_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "IMMUTABLE_DECISION_LEDGER_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["decision_id", "input_hash_bundle", "execution_mode", "candidate_ids", "selected_transition_id"], - "x_formula_outputs": ["ledger_append_status"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "decision_id", + "input_hash_bundle", + "execution_mode", + "candidate_ids", + "selected_transition_id" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/leader_lifecycle_gate_v1_schema.py b/src/quant_engine/models/generated/leader_lifecycle_gate_v1_schema.py new file mode 100644 index 0000000..af1b453 --- /dev/null +++ b/src/quant_engine/models/generated/leader_lifecycle_gate_v1_schema.py @@ -0,0 +1,33 @@ +"""Auto-generated schema model descriptor.""" +from __future__ import annotations + +from dataclasses import dataclass +import json +from pathlib import Path +from typing import Any + +SCHEMA_TITLE = 'LEADER_LIFECYCLE_GATE_V1' +SCHEMA_ID = 'schema://formula/LEADER_LIFECYCLE_GATE_V1' +SCHEMA_PATH = 'schemas/generated/leader_lifecycle_gate_v1.schema.json' +SCHEMA_PROPERTIES = ['formula_id', 'owner', 'status', 'inputs', 'outputs'] +SCHEMA_REQUIRED = ['formula_id', 'owner', 'status', 'inputs', 'outputs'] + +@dataclass(frozen=True) +class SchemaModel: + title: str + schema_id: str + path: str + properties: list[str] + required: list[str] + +def load_schema() -> dict[str, Any]: + return json.loads(Path(__file__).with_suffix('.schema.json').read_text(encoding='utf-8')) + +def describe() -> SchemaModel: + return SchemaModel( + title=SCHEMA_TITLE, + schema_id=SCHEMA_ID, + path=SCHEMA_PATH, + properties=list(SCHEMA_PROPERTIES), + required=list(SCHEMA_REQUIRED), + ) diff --git a/src/quant_engine/models/generated/leader_lifecycle_gate_v1_schema.schema.json b/src/quant_engine/models/generated/leader_lifecycle_gate_v1_schema.schema.json new file mode 100644 index 0000000..79bda5d --- /dev/null +++ b/src/quant_engine/models/generated/leader_lifecycle_gate_v1_schema.schema.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "schema://formula/LEADER_LIFECYCLE_GATE_V1", + "title": "LEADER_LIFECYCLE_GATE_V1", + "type": "object", + "properties": { + "formula_id": { + "const": "LEADER_LIFECYCLE_GATE_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "relative_strength_leads_sector", + "volume_quality_confirmed", + "above_ma60_or_reclaim_confirmed", + "earnings_revision_status", + "institutional_flow_status", + "current_role" + ], + "x_formula_outputs": [] +} diff --git a/src/quant_engine/models/generated/model_governance_kill_switch_v1_schema.schema.json b/src/quant_engine/models/generated/model_governance_kill_switch_v1_schema.schema.json index 1f09a09..c164d1d 100644 --- a/src/quant_engine/models/generated/model_governance_kill_switch_v1_schema.schema.json +++ b/src/quant_engine/models/generated/model_governance_kill_switch_v1_schema.schema.json @@ -43,9 +43,5 @@ "account_mdd_pct", "account_mdd_budget_pct" ], - "x_formula_outputs": [ - "execution_mode", - "kill_switch_triggered", - "kill_switch_reason_codes" - ] + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/portfolio_transition_utility_v1_schema.py b/src/quant_engine/models/generated/portfolio_transition_utility_v1_schema.py new file mode 100644 index 0000000..49914c4 --- /dev/null +++ b/src/quant_engine/models/generated/portfolio_transition_utility_v1_schema.py @@ -0,0 +1,33 @@ +"""Auto-generated schema model descriptor.""" +from __future__ import annotations + +from dataclasses import dataclass +import json +from pathlib import Path +from typing import Any + +SCHEMA_TITLE = 'PORTFOLIO_TRANSITION_UTILITY_V1' +SCHEMA_ID = 'schema://formula/PORTFOLIO_TRANSITION_UTILITY_V1' +SCHEMA_PATH = 'schemas/generated/portfolio_transition_utility_v1.schema.json' +SCHEMA_PROPERTIES = ['formula_id', 'owner', 'status', 'inputs', 'outputs'] +SCHEMA_REQUIRED = ['formula_id', 'owner', 'status', 'inputs', 'outputs'] + +@dataclass(frozen=True) +class SchemaModel: + title: str + schema_id: str + path: str + properties: list[str] + required: list[str] + +def load_schema() -> dict[str, Any]: + return json.loads(Path(__file__).with_suffix('.schema.json').read_text(encoding='utf-8')) + +def describe() -> SchemaModel: + return SchemaModel( + title=SCHEMA_TITLE, + schema_id=SCHEMA_ID, + path=SCHEMA_PATH, + properties=list(SCHEMA_PROPERTIES), + required=list(SCHEMA_REQUIRED), + ) diff --git a/src/quant_engine/models/generated/portfolio_transition_utility_v1_schema.schema.json b/src/quant_engine/models/generated/portfolio_transition_utility_v1_schema.schema.json new file mode 100644 index 0000000..6a86580 --- /dev/null +++ b/src/quant_engine/models/generated/portfolio_transition_utility_v1_schema.schema.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "schema://formula/PORTFOLIO_TRANSITION_UTILITY_V1", + "title": "PORTFOLIO_TRANSITION_UTILITY_V1", + "type": "object", + "properties": { + "formula_id": { + "const": "PORTFOLIO_TRANSITION_UTILITY_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "ce70_net_profit_krw", + "tax_fee_slippage_krw", + "cash_repair_benefit_krw", + "concentration_reduction_benefit_krw", + "turnover_penalty_krw" + ], + "x_formula_outputs": [] +} diff --git a/src/quant_engine/models/generated/rebalance_cadence_gate_v1_schema.schema.json b/src/quant_engine/models/generated/rebalance_cadence_gate_v1_schema.schema.json index a99f469..7f53e2a 100644 --- a/src/quant_engine/models/generated/rebalance_cadence_gate_v1_schema.schema.json +++ b/src/quant_engine/models/generated/rebalance_cadence_gate_v1_schema.schema.json @@ -4,13 +4,39 @@ "title": "REBALANCE_CADENCE_GATE_V1", "type": "object", "properties": { - "formula_id": { "const": "REBALANCE_CADENCE_GATE_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "REBALANCE_CADENCE_GATE_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["today_date", "transition_utility_after_tax_cost_krw", "hard_risk_block_active"], - "x_formula_outputs": ["rebalance_execution_allowed", "cadence_check_required", "review_emitted"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "today_date", + "transition_utility_after_tax_cost_krw", + "hard_risk_block_active" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/scenario_shock_matrix_v1_schema.schema.json b/src/quant_engine/models/generated/scenario_shock_matrix_v1_schema.schema.json index 32c45d7..590985b 100644 --- a/src/quant_engine/models/generated/scenario_shock_matrix_v1_schema.schema.json +++ b/src/quant_engine/models/generated/scenario_shock_matrix_v1_schema.schema.json @@ -4,13 +4,38 @@ "title": "SCENARIO_SHOCK_MATRIX_V1", "type": "object", "properties": { - "formula_id": { "const": "SCENARIO_SHOCK_MATRIX_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "SCENARIO_SHOCK_MATRIX_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["net_profit_distribution_after_tax_fee_slippage", "scenario_id"], - "x_formula_outputs": ["scenario_results"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "net_profit_distribution_after_tax_fee_slippage", + "scenario_id" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/sector_exposure_graph_v1_schema.schema.json b/src/quant_engine/models/generated/sector_exposure_graph_v1_schema.schema.json index 83fb22f..9f74c9e 100644 --- a/src/quant_engine/models/generated/sector_exposure_graph_v1_schema.schema.json +++ b/src/quant_engine/models/generated/sector_exposure_graph_v1_schema.schema.json @@ -40,10 +40,5 @@ "sector_id", "peer_sector_betas" ], - "x_formula_outputs": [ - "sector_family_total_pct", - "lookthrough_etf_weight_pct", - "factor_beta_residualized", - "leader_role" - ] + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/sell_lot_pareto_selector_v1_schema.py b/src/quant_engine/models/generated/sell_lot_pareto_selector_v1_schema.py new file mode 100644 index 0000000..bdd6157 --- /dev/null +++ b/src/quant_engine/models/generated/sell_lot_pareto_selector_v1_schema.py @@ -0,0 +1,33 @@ +"""Auto-generated schema model descriptor.""" +from __future__ import annotations + +from dataclasses import dataclass +import json +from pathlib import Path +from typing import Any + +SCHEMA_TITLE = 'SELL_LOT_PARETO_SELECTOR_V1' +SCHEMA_ID = 'schema://formula/SELL_LOT_PARETO_SELECTOR_V1' +SCHEMA_PATH = 'schemas/generated/sell_lot_pareto_selector_v1.schema.json' +SCHEMA_PROPERTIES = ['formula_id', 'owner', 'status', 'inputs', 'outputs'] +SCHEMA_REQUIRED = ['formula_id', 'owner', 'status', 'inputs', 'outputs'] + +@dataclass(frozen=True) +class SchemaModel: + title: str + schema_id: str + path: str + properties: list[str] + required: list[str] + +def load_schema() -> dict[str, Any]: + return json.loads(Path(__file__).with_suffix('.schema.json').read_text(encoding='utf-8')) + +def describe() -> SchemaModel: + return SchemaModel( + title=SCHEMA_TITLE, + schema_id=SCHEMA_ID, + path=SCHEMA_PATH, + properties=list(SCHEMA_PROPERTIES), + required=list(SCHEMA_REQUIRED), + ) diff --git a/src/quant_engine/models/generated/sell_lot_pareto_selector_v1_schema.schema.json b/src/quant_engine/models/generated/sell_lot_pareto_selector_v1_schema.schema.json new file mode 100644 index 0000000..3c4caab --- /dev/null +++ b/src/quant_engine/models/generated/sell_lot_pareto_selector_v1_schema.schema.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "schema://formula/SELL_LOT_PARETO_SELECTOR_V1", + "title": "SELL_LOT_PARETO_SELECTOR_V1", + "type": "object", + "properties": { + "formula_id": { + "const": "SELL_LOT_PARETO_SELECTOR_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "avoided_tail_loss_krw", + "cash_repair_benefit_krw", + "concentration_reduction_benefit_krw", + "tax_loss_benefit_krw", + "tax_fee_slippage_krw", + "reentry_cost_krw", + "missed_upside_penalty_krw" + ], + "x_formula_outputs": [] +} diff --git a/src/quant_engine/models/generated/state_vector_constructor_v1_schema.schema.json b/src/quant_engine/models/generated/state_vector_constructor_v1_schema.schema.json index 5fccbd4..bbb3c12 100644 --- a/src/quant_engine/models/generated/state_vector_constructor_v1_schema.schema.json +++ b/src/quant_engine/models/generated/state_vector_constructor_v1_schema.schema.json @@ -4,13 +4,44 @@ "title": "STATE_VECTOR_CONSTRUCTOR_V1", "type": "object", "properties": { - "formula_id": { "const": "STATE_VECTOR_CONSTRUCTOR_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "STATE_VECTOR_CONSTRUCTOR_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["cash_ladder", "positions", "sector_exposure_graph", "factor_exposures", "tax_lots", "risk_bucket_weights", "macro_regime_probabilities", "goal_progress_pct"], - "x_formula_outputs": ["state_vector", "state_vector_completeness_pct", "missing_components"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "cash_ladder", + "positions", + "sector_exposure_graph", + "factor_exposures", + "tax_lots", + "risk_bucket_weights", + "macro_regime_probabilities", + "goal_progress_pct" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/strong_close_signal_v1_schema.schema.json b/src/quant_engine/models/generated/strong_close_signal_v1_schema.schema.json index 72ac32f..0c1819a 100644 --- a/src/quant_engine/models/generated/strong_close_signal_v1_schema.schema.json +++ b/src/quant_engine/models/generated/strong_close_signal_v1_schema.schema.json @@ -4,13 +4,39 @@ "title": "STRONG_CLOSE_SIGNAL_V1", "type": "object", "properties": { - "formula_id": { "const": "STRONG_CLOSE_SIGNAL_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "STRONG_CLOSE_SIGNAL_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["close_price", "high_price", "low_price"], - "x_formula_outputs": ["strong_close", "close_position_pct"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "close_price", + "high_price", + "low_price" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/transition_set_enumerator_v1_schema.schema.json b/src/quant_engine/models/generated/transition_set_enumerator_v1_schema.schema.json index 8f232e8..ca14014 100644 --- a/src/quant_engine/models/generated/transition_set_enumerator_v1_schema.schema.json +++ b/src/quant_engine/models/generated/transition_set_enumerator_v1_schema.schema.json @@ -4,13 +4,38 @@ "title": "TRANSITION_SET_ENUMERATOR_V1", "type": "object", "properties": { - "formula_id": { "const": "TRANSITION_SET_ENUMERATOR_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "TRANSITION_SET_ENUMERATOR_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["evaluated_candidates", "max_set_size"], - "x_formula_outputs": ["selected_transition_set"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "evaluated_candidates", + "max_set_size" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/trend_filter_gate_v1_schema.schema.json b/src/quant_engine/models/generated/trend_filter_gate_v1_schema.schema.json index f0ba65a..60e2f4d 100644 --- a/src/quant_engine/models/generated/trend_filter_gate_v1_schema.schema.json +++ b/src/quant_engine/models/generated/trend_filter_gate_v1_schema.schema.json @@ -4,13 +4,39 @@ "title": "TREND_FILTER_GATE_V1", "type": "object", "properties": { - "formula_id": { "const": "TREND_FILTER_GATE_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "TREND_FILTER_GATE_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["close_price", "ma120", "ma120_prev"], - "x_formula_outputs": ["trend_filter_pass"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "close_price", + "ma120", + "ma120_prev" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/volatility_expansion_breakout_v1_schema.schema.json b/src/quant_engine/models/generated/volatility_expansion_breakout_v1_schema.schema.json index de1cccc..c3bfbab 100644 --- a/src/quant_engine/models/generated/volatility_expansion_breakout_v1_schema.schema.json +++ b/src/quant_engine/models/generated/volatility_expansion_breakout_v1_schema.schema.json @@ -4,13 +4,39 @@ "title": "VOLATILITY_EXPANSION_BREAKOUT_V1", "type": "object", "properties": { - "formula_id": { "const": "VOLATILITY_EXPANSION_BREAKOUT_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "VOLATILITY_EXPANSION_BREAKOUT_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["bb_width", "bb_width_20d_percentile", "ret_1d"], - "x_formula_outputs": ["volatility_expansion_breakout"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "bb_width", + "bb_width_20d_percentile", + "ret_1d" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/walk_forward_bootstrap_v1_schema.schema.json b/src/quant_engine/models/generated/walk_forward_bootstrap_v1_schema.schema.json index 2c7b55e..d36023c 100644 --- a/src/quant_engine/models/generated/walk_forward_bootstrap_v1_schema.schema.json +++ b/src/quant_engine/models/generated/walk_forward_bootstrap_v1_schema.schema.json @@ -4,13 +4,39 @@ "title": "WALK_FORWARD_BOOTSTRAP_V1", "type": "object", "properties": { - "formula_id": { "const": "WALK_FORWARD_BOOTSTRAP_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "WALK_FORWARD_BOOTSTRAP_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["historical_returns", "current_regime_state", "bootstrap_method"], - "x_formula_outputs": ["net_profit_distribution_after_tax_fee_slippage", "sample_count_total", "sample_count_same_regime"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "historical_returns", + "current_regime_state", + "bootstrap_method" + ], + "x_formula_outputs": [] } diff --git a/src/quant_engine/models/generated/weekly_legacy_transfer_plan_v1_schema.schema.json b/src/quant_engine/models/generated/weekly_legacy_transfer_plan_v1_schema.schema.json index 1ad9cc9..17ef93d 100644 --- a/src/quant_engine/models/generated/weekly_legacy_transfer_plan_v1_schema.schema.json +++ b/src/quant_engine/models/generated/weekly_legacy_transfer_plan_v1_schema.schema.json @@ -4,13 +4,39 @@ "title": "WEEKLY_LEGACY_TRANSFER_PLAN_V1", "type": "object", "properties": { - "formula_id": { "const": "WEEKLY_LEGACY_TRANSFER_PLAN_V1" }, - "owner": { "type": "string" }, - "status": { "type": "string" }, - "inputs": { "type": "array", "items": { "type": "string" } }, - "outputs": { "type": "array", "items": { "type": "string" } } + "formula_id": { + "const": "WEEKLY_LEGACY_TRANSFER_PLAN_V1" + }, + "owner": { + "type": "string" + }, + "status": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["formula_id", "owner", "status", "inputs", "outputs"], - "x_formula_inputs": ["weekly_legacy_to_cma_transfer_plan_krw", "transfer_confirmed", "transfer_confirmed_amount_krw"], - "x_formula_outputs": ["deployable_cash_contribution_krw", "plan_status"] + "required": [ + "formula_id", + "owner", + "status", + "inputs", + "outputs" + ], + "x_formula_inputs": [ + "weekly_legacy_to_cma_transfer_plan_krw", + "transfer_confirmed", + "transfer_confirmed_amount_krw" + ], + "x_formula_outputs": [] } diff --git a/tests/golden/generated/breakout_failure_stop_v1_golden.py b/tests/golden/generated/breakout_failure_stop_v1_golden.py index 8487df9..43ea2d2 100644 --- a/tests/golden/generated/breakout_failure_stop_v1_golden.py +++ b/tests/golden/generated/breakout_failure_stop_v1_golden.py @@ -1,35 +1,9 @@ -"""Golden tests for BREAKOUT_FAILURE_STOP_V1 (governance/todo/technical_signals_p4_adoption_plan.yaml P4-6).""" -from __future__ import annotations +"""Auto-generated golden test stub for BREAKOUT_FAILURE_STOP_V1.""" -import importlib.util -from pathlib import Path +def test_breakout_failure_stop_v1_golden_stub_exists() -> None: + assert 'BREAKOUT_FAILURE_STOP_V1' -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_breakout_failure_stop_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_breakout_failure_stop_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_reentry_below_prior_high_within_window_triggers_sell_review() -> None: - mod = _load_module() - result = mod.evaluate(100, 95, 3) - assert result["breakout_failure"] is True - assert result["gate"] == "SELL_RISK_EXIT_REVIEW" - - -def test_reentry_after_window_does_not_trigger() -> None: - mod = _load_module() - result = mod.evaluate(100, 95, 10) - assert result["breakout_failure"] is False - - -def test_missing_prior_high_returns_null() -> None: - mod = _load_module() - result = mod.evaluate(None, 95, 3) - assert result["breakout_failure"] is None +def test_breakout_failure_stop_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/consecutive_streak_v1_golden.py b/tests/golden/generated/consecutive_streak_v1_golden.py index b78045e..a1e49f4 100644 --- a/tests/golden/generated/consecutive_streak_v1_golden.py +++ b/tests/golden/generated/consecutive_streak_v1_golden.py @@ -1,37 +1,9 @@ -"""Golden tests for CONSECUTIVE_STREAK_V1 (governance/todo/technical_signals_p4_adoption_plan.yaml P4-5).""" -from __future__ import annotations +"""Auto-generated golden test stub for CONSECUTIVE_STREAK_V1.""" -import importlib.util -from pathlib import Path +def test_consecutive_streak_v1_golden_stub_exists() -> None: + assert 'CONSECUTIVE_STREAK_V1' -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_consecutive_streak_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_consecutive_streak_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_trailing_three_up_days_gives_up_streak_3() -> None: - mod = _load_module() - result = mod.compute_streaks([1, 2, -1, 1, 2, 3]) - assert result["up_streak"] == 3 - assert result["down_streak"] == 0 - - -def test_trailing_two_down_days_gives_down_streak_2() -> None: - mod = _load_module() - result = mod.compute_streaks([5, -1, -2]) - assert result["down_streak"] == 2 - assert result["up_streak"] == 0 - - -def test_empty_changes_returns_null_not_zero() -> None: - mod = _load_module() - result = mod.compute_streaks([]) - assert result["up_streak"] is None - assert result["down_streak"] is None +def test_consecutive_streak_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/execution_capacity_ladder_v1_golden.py b/tests/golden/generated/execution_capacity_ladder_v1_golden.py index 5c4b169..3e6533b 100644 --- a/tests/golden/generated/execution_capacity_ladder_v1_golden.py +++ b/tests/golden/generated/execution_capacity_ladder_v1_golden.py @@ -1,61 +1,9 @@ -"""Golden tests for EXECUTION_CAPACITY_LADDER_V1 (governance/todo/v8_9_p1_adoption_plan.yaml P1-B.4). +"""Auto-generated golden test stub for EXECUTION_CAPACITY_LADDER_V1.""" -Maps to v8.9 proposal golden cases V89_019 (broker_packet_missing), V89_020 (capacity_too_low), -V89_022 (spread_widens). -""" -from __future__ import annotations +def test_execution_capacity_ladder_v1_golden_stub_exists() -> None: + assert 'EXECUTION_CAPACITY_LADDER_V1' -import importlib.util -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_execution_capacity_ladder_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_execution_capacity_ladder_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_v89_019_missing_broker_packet_blocks_not_zero_capacity() -> None: - mod = _load_module() - order = { - "planned_order_amount_krw": 50000000, - "avg_trade_value_20d_krw": None, - "intraday_trade_value_krw": 500000000, - "orderbook_top3_depth_krw": 100000000, - "spread_bps": 5, - } - result = mod.evaluate_order_capacity(order) - assert result["gate"] == "EXECUTION_PLAN_BLOCKED" - assert result["order_capacity_krw"] is None - - -def test_v89_020_planned_amount_exceeding_capacity_gets_capped() -> None: - mod = _load_module() - order = { - "planned_order_amount_krw": 50000000, - "avg_trade_value_20d_krw": 1000000000, - "intraday_trade_value_krw": 500000000, - "orderbook_top3_depth_krw": 100000000, - "spread_bps": 5, - } - result = mod.evaluate_order_capacity(order) - assert result["gate"] == "ORDER_SIZE_CAPPED" - assert result["order_capacity_krw"] == 3000000.0 - - -def test_v89_022_spread_widening_beyond_1_5x_triggers_cancel() -> None: - mod = _load_module() - assert mod.should_cancel_remaining_slices(16, 10) is True - assert mod.should_cancel_remaining_slices(14, 10) is False - - -def test_trading_halt_blocks_regardless_of_other_fields() -> None: - mod = _load_module() - result = mod.evaluate_order_capacity({"planned_order_amount_krw": 50000000, "halt_status": True}) - assert result["gate"] == "EXECUTION_PLAN_BLOCKED" - assert result["reason_code"] == "trading_halt" +def test_execution_capacity_ladder_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/execution_plan_compiler_v1_golden.py b/tests/golden/generated/execution_plan_compiler_v1_golden.py index f3010d7..6ca0ba5 100644 --- a/tests/golden/generated/execution_plan_compiler_v1_golden.py +++ b/tests/golden/generated/execution_plan_compiler_v1_golden.py @@ -1,52 +1,9 @@ -"""Golden tests for EXECUTION_PLAN_COMPILER_V1 (governance/todo/v8_9_p2_adoption_plan.yaml P2-D). +"""Auto-generated golden test stub for EXECUTION_PLAN_COMPILER_V1.""" -Maps to v8.9 proposal golden cases V89_021 (partial_fill), V89_022 (spread_widens), -V89_023 (gap_up_chase / blocked-equivalent for missing capacity). -""" -from __future__ import annotations +def test_execution_plan_compiler_v1_golden_stub_exists() -> None: + assert 'EXECUTION_PLAN_COMPILER_V1' -import importlib.util -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_execution_plan_compiler_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_execution_plan_compiler_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_v89_021_partial_fill_continues_when_conditions_stable() -> None: - mod = _load_module() - baseline = {"spread_bps": 10, "order_capacity_krw": 1000000, "cash_floor_pct": 15.0} - slices = mod.compile_slices(1000000, baseline, [baseline, baseline, baseline], required_cash_pct=12.5) - assert [s["status"] for s in slices] == ["COMPILED", "COMPILED", "COMPILED"] - - -def test_v89_022_spread_widening_before_slice2_cancels_remainder() -> None: - mod = _load_module() - baseline = {"spread_bps": 10, "order_capacity_krw": 1000000, "cash_floor_pct": 15.0} - widened = {"spread_bps": 20, "order_capacity_krw": 1000000, "cash_floor_pct": 15.0} - slices = mod.compile_slices(1000000, baseline, [baseline, widened, widened], required_cash_pct=12.5) - assert slices[0]["status"] == "COMPILED" - assert slices[1]["status"] == "CANCELLED" - assert slices[1]["reason_code"] == "spread_widens_beyond_limit" - assert slices[2]["status"] == "CANCELLED" - - -def test_cash_floor_breach_mid_execution_cancels_remainder() -> None: - mod = _load_module() - baseline = {"spread_bps": 10, "order_capacity_krw": 1000000, "cash_floor_pct": 15.0} - breached = {"spread_bps": 10, "order_capacity_krw": 1000000, "cash_floor_pct": 5.0} - slices = mod.compile_slices(1000000, baseline, [baseline, breached, breached], required_cash_pct=12.5) - assert slices[1]["reason_code"] == "cash_floor_after_fill_breached" - - -def test_v89_023_missing_capacity_blocks_entire_compile() -> None: - mod = _load_module() - result = {"order_capacity_krw": None} - assert result["order_capacity_krw"] is None +def test_execution_plan_compiler_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/fifty_two_week_high_trigger_v1_golden.py b/tests/golden/generated/fifty_two_week_high_trigger_v1_golden.py index 9f15a5d..51b6807 100644 --- a/tests/golden/generated/fifty_two_week_high_trigger_v1_golden.py +++ b/tests/golden/generated/fifty_two_week_high_trigger_v1_golden.py @@ -1,31 +1,9 @@ -"""Golden tests for FIFTY_TWO_WEEK_HIGH_TRIGGER_V1 (governance/todo/technical_signals_p4_adoption_plan.yaml P4-4).""" -from __future__ import annotations +"""Auto-generated golden test stub for FIFTY_TWO_WEEK_HIGH_TRIGGER_V1.""" -import importlib.util -from pathlib import Path +def test_fifty_two_week_high_trigger_v1_golden_stub_exists() -> None: + assert 'FIFTY_TWO_WEEK_HIGH_TRIGGER_V1' -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_fifty_two_week_high_trigger_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_fifty_two_week_high_trigger_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_close_at_or_above_52w_high_triggers() -> None: - mod = _load_module() - assert mod.evaluate(105, 100) is True - - -def test_close_below_52w_high_does_not_trigger() -> None: - mod = _load_module() - assert mod.evaluate(95, 100) is False - - -def test_missing_high52w_returns_null() -> None: - mod = _load_module() - assert mod.evaluate(105, None) is None +def test_fifty_two_week_high_trigger_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/forecast_simulation_engine_v1_golden.py b/tests/golden/generated/forecast_simulation_engine_v1_golden.py index a8fc96e..68f1e75 100644 --- a/tests/golden/generated/forecast_simulation_engine_v1_golden.py +++ b/tests/golden/generated/forecast_simulation_engine_v1_golden.py @@ -1,62 +1,9 @@ -"""Golden tests for FORECAST_SIMULATION_ENGINE_V1 (governance/todo/v8_9_p0_adoption_plan.yaml P0-3.3). +"""Auto-generated golden test stub for FORECAST_SIMULATION_ENGINE_V1.""" -Maps to v8.9 proposal golden cases V89_013 (missing_CVaR -> QUARANTINE-equivalent WATCH_ONLY) -and V89_014 (same_regime_sample_low -> WATCH_ONLY). -""" -from __future__ import annotations +def test_forecast_simulation_engine_v1_golden_stub_exists() -> None: + assert 'FORECAST_SIMULATION_ENGINE_V1' -import importlib.util -import json -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_forecast_simulation_engine_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_forecast_simulation_engine_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_v89_013_missing_distribution_returns_watch_only_with_null_outputs(tmp_path) -> None: - mod = _load_module() - decision_packet = tmp_path / "decision_packet.json" - decision_packet.write_text(json.dumps({"execution_mode": "SHADOW"}), encoding="utf-8") - out = tmp_path / "out.json" - - import sys - - sys.argv = [ - "build_forecast_simulation_engine_v1.py", - "--backtest-contract", str(tmp_path / "missing_contract.yaml"), - "--distribution", str(tmp_path / "missing_distribution.json"), - "--decision-packet", str(decision_packet), - "--out", str(out), - ] - assert mod.main() == 0 - result = json.loads(out.read_text(encoding="utf-8")) - assert result["gate"] == "WATCH_ONLY" - assert result["ce70_net_profit_krw"] is None - assert result["cvar95_loss_krw"] is None - - -def test_v89_014_same_regime_sample_below_shadow_minimum_blocks_compute() -> None: - mod = _load_module() - rule = mod.MINIMUM_SAMPLE_RULES["SHADOW"] - sample_count_total = 30 - sample_count_same_regime = 5 - gate_ok = ( - sample_count_total >= rule["sample_count_total_min"] - and sample_count_same_regime >= rule["sample_count_same_regime_min"] - ) - assert gate_ok is False - - -def test_quantile_and_cvar95_match_known_distribution() -> None: - mod = _load_module() - values = sorted(float(v) for v in range(1, 101)) - assert mod._quantile(values, 0.5) == 50.5 - assert mod._cvar95(values) <= values[4] +def test_forecast_simulation_engine_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/golden_cross_signal_v1_golden.py b/tests/golden/generated/golden_cross_signal_v1_golden.py index 5f8ca6b..f64d69b 100644 --- a/tests/golden/generated/golden_cross_signal_v1_golden.py +++ b/tests/golden/generated/golden_cross_signal_v1_golden.py @@ -1,31 +1,9 @@ -"""Golden tests for GOLDEN_CROSS_SIGNAL_V1 (governance/todo/technical_signals_p4_adoption_plan.yaml P4-1).""" -from __future__ import annotations +"""Auto-generated golden test stub for GOLDEN_CROSS_SIGNAL_V1.""" -import importlib.util -from pathlib import Path +def test_golden_cross_signal_v1_golden_stub_exists() -> None: + assert 'GOLDEN_CROSS_SIGNAL_V1' -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_golden_cross_signal_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_golden_cross_signal_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_ma20_crossing_above_ma60_detected() -> None: - mod = _load_module() - assert mod.golden_cross_today(105, 98, 100, 99) is True - - -def test_no_cross_when_ma20_already_above() -> None: - mod = _load_module() - assert mod.golden_cross_today(105, 101, 100, 99) is False - - -def test_missing_prev_values_returns_null_not_false() -> None: - mod = _load_module() - assert mod.golden_cross_today(105, None, 100, 99) is None +def test_golden_cross_signal_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/immutable_decision_ledger_v1_golden.py b/tests/golden/generated/immutable_decision_ledger_v1_golden.py index 85fc6c2..3fc34bb 100644 --- a/tests/golden/generated/immutable_decision_ledger_v1_golden.py +++ b/tests/golden/generated/immutable_decision_ledger_v1_golden.py @@ -1,60 +1,9 @@ -"""Golden tests for IMMUTABLE_DECISION_LEDGER_V1 (governance/todo/v8_9_p2_adoption_plan.yaml P2-C). +"""Auto-generated golden test stub for IMMUTABLE_DECISION_LEDGER_V1.""" -Maps to v8.9 proposal golden case V89_039 (operator_override -- immutable log required) -plus duplicate-id and missing-field rejection paths. -""" -from __future__ import annotations +def test_immutable_decision_ledger_v1_golden_stub_exists() -> None: + assert 'IMMUTABLE_DECISION_LEDGER_V1' -import importlib.util -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_immutable_decision_ledger_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_immutable_decision_ledger_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def _decision(decision_id="D1"): - return { - "decision_id": decision_id, - "engine_version": "PORTFOLIO_TRANSITION_UTILITY_V1", - "input_hash_bundle": "abc123", - "execution_mode": "NO_TRADE", - "candidate_ids": ["A"], - } - - -def test_v89_039_new_decision_appends_successfully() -> None: - mod = _load_module() - ledger = {"formula_id": "IMMUTABLE_DECISION_LEDGER_V1", "records": []} - new_ledger, status = mod.append_decision(ledger, _decision()) - assert status == "APPENDED" - assert len(new_ledger["records"]) == 1 - - -def test_duplicate_decision_id_rejected_original_unchanged() -> None: - mod = _load_module() - ledger = {"formula_id": "IMMUTABLE_DECISION_LEDGER_V1", "records": []} - ledger, _ = mod.append_decision(ledger, _decision()) - original_record = ledger["records"][0] - - new_ledger, status = mod.append_decision(ledger, _decision()) - assert status == "DUPLICATE_DECISION_ID" - assert new_ledger["records"][0] == original_record - assert len(new_ledger["records"]) == 1 - - -def test_missing_required_field_rejected_not_filled_with_default() -> None: - mod = _load_module() - ledger = {"formula_id": "IMMUTABLE_DECISION_LEDGER_V1", "records": []} - incomplete = _decision() - incomplete["decision_id"] = None - new_ledger, status = mod.append_decision(ledger, incomplete) - assert status == "REJECTED_MISSING_FIELDS" - assert new_ledger["records"] == [] +def test_immutable_decision_ledger_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/leader_lifecycle_gate_v1_golden.py b/tests/golden/generated/leader_lifecycle_gate_v1_golden.py new file mode 100644 index 0000000..4fb6426 --- /dev/null +++ b/tests/golden/generated/leader_lifecycle_gate_v1_golden.py @@ -0,0 +1,9 @@ +"""Auto-generated golden test stub for LEADER_LIFECYCLE_GATE_V1.""" + +def test_leader_lifecycle_gate_v1_golden_stub_exists() -> None: + assert 'LEADER_LIFECYCLE_GATE_V1' + +def test_leader_lifecycle_gate_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/model_governance_kill_switch_v1_golden.py b/tests/golden/generated/model_governance_kill_switch_v1_golden.py index 4318298..f5024a0 100644 --- a/tests/golden/generated/model_governance_kill_switch_v1_golden.py +++ b/tests/golden/generated/model_governance_kill_switch_v1_golden.py @@ -1,56 +1,9 @@ -"""Golden tests for MODEL_GOVERNANCE_KILL_SWITCH_V1 (governance/todo/v8_9_p1_adoption_plan.yaml P1-C.4). +"""Auto-generated golden test stub for MODEL_GOVERNANCE_KILL_SWITCH_V1.""" -Maps to v8.9 proposal golden cases V89_035 (hit_rate kill switch), V89_036 (slippage kill switch), -V89_037 (data_quarantine_rate kill switch). -""" -from __future__ import annotations +def test_model_governance_kill_switch_v1_golden_stub_exists() -> None: + assert 'MODEL_GOVERNANCE_KILL_SWITCH_V1' -import importlib.util -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_model_governance_kill_switch_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_model_governance_kill_switch_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_v89_035_low_hit_rate_with_sufficient_sample_demotes_one_rung() -> None: - mod = _load_module() - reasons = mod.evaluate_kill_switches({"t5_hit_rate_pct": 40.0, "t5_sample_count": 30}) - assert "t5_hit_rate_below_50pct_for_30_trades" in reasons - assert mod.demote_one_rung("PILOT") == "SHADOW" - - -def test_v89_035_low_hit_rate_below_sample_threshold_does_not_trigger() -> None: - mod = _load_module() - reasons = mod.evaluate_kill_switches({"t5_hit_rate_pct": 40.0, "t5_sample_count": 10}) - assert "t5_hit_rate_below_50pct_for_30_trades" not in reasons - - -def test_v89_036_implementation_shortfall_above_2x_triggers() -> None: - mod = _load_module() - reasons = mod.evaluate_kill_switches({"implementation_shortfall_ratio": 2.5}) - assert reasons == ["implementation_shortfall_above_2x_expected"] - - -def test_v89_037_data_quarantine_rate_above_5pct_triggers() -> None: - mod = _load_module() - reasons = mod.evaluate_kill_switches({"data_quarantine_rate_pct": 7.0}) - assert reasons == ["data_quarantine_rate_above_5pct"] - - -def test_audit_only_cannot_demote_further() -> None: - mod = _load_module() - assert mod.demote_one_rung("AUDIT_ONLY") == "AUDIT_ONLY" - - -def test_no_triggers_keeps_mode_unchanged() -> None: - mod = _load_module() - reasons = mod.evaluate_kill_switches({"data_quarantine_rate_pct": 1.0}) - assert reasons == [] +def test_model_governance_kill_switch_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/portfolio_transition_utility_v1_golden.py b/tests/golden/generated/portfolio_transition_utility_v1_golden.py new file mode 100644 index 0000000..2b74204 --- /dev/null +++ b/tests/golden/generated/portfolio_transition_utility_v1_golden.py @@ -0,0 +1,9 @@ +"""Auto-generated golden test stub for PORTFOLIO_TRANSITION_UTILITY_V1.""" + +def test_portfolio_transition_utility_v1_golden_stub_exists() -> None: + assert 'PORTFOLIO_TRANSITION_UTILITY_V1' + +def test_portfolio_transition_utility_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/rebalance_cadence_gate_v1_golden.py b/tests/golden/generated/rebalance_cadence_gate_v1_golden.py index b438999..9748cd0 100644 --- a/tests/golden/generated/rebalance_cadence_gate_v1_golden.py +++ b/tests/golden/generated/rebalance_cadence_gate_v1_golden.py @@ -1,57 +1,9 @@ -"""Golden tests for REBALANCE_CADENCE_GATE_V1 (governance/todo/v8_9_p3_adoption_plan.yaml P3-D). +"""Auto-generated golden test stub for REBALANCE_CADENCE_GATE_V1.""" -Maps to v8.9 proposal golden cases V89_032 (no_trade_band), V89_033 -(hard_block_overrides_band), V89_053 (weekly_rebalance_required), V89_054 -(mid_check_required). -""" -from __future__ import annotations +def test_rebalance_cadence_gate_v1_golden_stub_exists() -> None: + assert 'REBALANCE_CADENCE_GATE_V1' -import importlib.util -from datetime import date -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_rebalance_cadence_gate_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_rebalance_cadence_gate_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_v89_032_negative_utility_no_hard_block_blocks_execution_but_emits_review() -> None: - mod = _load_module() - result = mod.evaluate_rebalance_gate(date(2026, 6, 20), -5000.0, False) - assert result["review_emitted"] is True - assert result["rebalance_execution_allowed"] is False - - -def test_v89_033_hard_risk_block_overrides_negative_utility() -> None: - mod = _load_module() - result = mod.evaluate_rebalance_gate(date(2026, 6, 20), -5000.0, True) - assert result["rebalance_execution_allowed"] is True - - -def test_v89_053_saturday_and_sunday_always_require_cadence_check() -> None: - mod = _load_module() - saturday_required, saturday_reason = mod.cadence_check_required(date(2026, 6, 20)) - sunday_required, sunday_reason = mod.cadence_check_required(date(2026, 6, 21)) - assert saturday_required is True - assert saturday_reason == "weekly_rebalance_required" - assert sunday_required is True - - -def test_v89_054_monthly_mid_check_days_require_cadence_check() -> None: - mod = _load_module() - required, reason = mod.cadence_check_required(date(2026, 6, 11)) - assert required is True - assert reason == "mid_check_required" - - -def test_non_cadence_weekday_does_not_require_check() -> None: - mod = _load_module() - required, _ = mod.cadence_check_required(date(2026, 6, 17)) - assert required is False +def test_rebalance_cadence_gate_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/scenario_shock_matrix_v1_golden.py b/tests/golden/generated/scenario_shock_matrix_v1_golden.py index c695528..1462714 100644 --- a/tests/golden/generated/scenario_shock_matrix_v1_golden.py +++ b/tests/golden/generated/scenario_shock_matrix_v1_golden.py @@ -1,47 +1,9 @@ -"""Golden tests for SCENARIO_SHOCK_MATRIX_V1 (governance/todo/v8_9_p2_adoption_plan.yaml P2-A). +"""Auto-generated golden test stub for SCENARIO_SHOCK_MATRIX_V1.""" -Maps to v8.9 proposal golden case V89_010 (candidate_good_portfolio_bad: a positive -point estimate can still be a bad portfolio decision once stress scenarios are applied). -""" -from __future__ import annotations +def test_scenario_shock_matrix_v1_golden_stub_exists() -> None: + assert 'SCENARIO_SHOCK_MATRIX_V1' -import importlib.util -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_scenario_shock_matrix_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_scenario_shock_matrix_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_v89_010_crisis_case_worse_than_base_case() -> None: - mod = _load_module() - distribution = [float(i * 1000) for i in range(-50, 50)] - base = mod.evaluate_scenario(distribution, "base_case") - crisis = mod.evaluate_scenario(distribution, "crisis_case") - assert crisis["scenario_cvar95_krw"] < base["scenario_cvar95_krw"] - - -def test_missing_distribution_returns_data_missing_not_fabricated() -> None: - mod = _load_module() - result = mod.evaluate_scenario(None, "adverse_case") - assert result["gate"] == "DATA_MISSING" - assert result["scenario_ce70_krw"] is None - - -def test_all_six_scenarios_defined() -> None: - mod = _load_module() - assert set(mod.SCENARIO_DEFINITIONS.keys()) == { - "base_case", - "adverse_case", - "liquidity_drought_case", - "crisis_case", - "fx_shock_case", - "tax_cost_case", - } +def test_scenario_shock_matrix_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/sector_exposure_graph_v1_golden.py b/tests/golden/generated/sector_exposure_graph_v1_golden.py index c220776..c6e7672 100644 --- a/tests/golden/generated/sector_exposure_graph_v1_golden.py +++ b/tests/golden/generated/sector_exposure_graph_v1_golden.py @@ -1,64 +1,9 @@ -"""Golden tests for SECTOR_EXPOSURE_GRAPH_V1 / LEADER_LIFECYCLE_GATE_V1 -(governance/todo/v8_9_p1_adoption_plan.yaml P1-A.5). +"""Auto-generated golden test stub for SECTOR_EXPOSURE_GRAPH_V1.""" -Maps to v8.9 proposal golden cases V89_044 (sector_overlap), V89_045 (ETF_direct_overlap), -V89_046 (leader_distribution). -""" -from __future__ import annotations +def test_sector_exposure_graph_v1_golden_stub_exists() -> None: + assert 'SECTOR_EXPOSURE_GRAPH_V1' -import importlib.util -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_sector_exposure_graph_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_sector_exposure_graph_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_v89_044_etf_lookthrough_adds_to_direct_weight() -> None: - mod = _load_module() - position = { - "direct_weight_pct": 20.0, - "etf_constituents_json": [{"ticker": "X", "weight_pct": 50, "sector_id": "EQ:TECH:SEMIS:HBM"}], - "etf_weight_pct": 10.0, - "sector_id": "EQ:TECH:SEMIS:HBM", - } - result = mod.sector_exposure(position) - assert result["sector_family_total_pct"] == 25.0 - assert result["gate"] == "PASS" - - -def test_v89_045_missing_constituents_blocks_not_zero_estimate() -> None: - mod = _load_module() - result = mod.sector_exposure({"direct_weight_pct": 10.0, "sector_id": "EQ:TECH:SEMIS:HBM"}) - assert result["gate"] == "ETF_BUY_BLOCKED" - assert result["sector_family_total_pct"] is None - - -def test_v89_046_captain_distribution_break_demotes_immediately() -> None: - mod = _load_module() - result = mod.evaluate_leader_role( - { - "current_role": "CAPTAIN", - "above_ma60_or_reclaim_confirmed": False, - "institutional_flow_status": "distribution", - "earnings_revision_status": "neutral", - "relative_strength_leads_sector": False, - "volume_quality_confirmed": False, - } - ) - assert result["leader_role"] == "DISTRIBUTION_RISK" - assert result["role_changed"] is True - - -def test_missing_role_inputs_keeps_current_role_not_arbitrary() -> None: - mod = _load_module() - result = mod.evaluate_leader_role({"current_role": "ENABLER"}) - assert result["leader_role"] == "ENABLER" - assert result["role_transition_reason"] == "DATA_MISSING" +def test_sector_exposure_graph_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/sell_lot_pareto_selector_v1_golden.py b/tests/golden/generated/sell_lot_pareto_selector_v1_golden.py new file mode 100644 index 0000000..abcea32 --- /dev/null +++ b/tests/golden/generated/sell_lot_pareto_selector_v1_golden.py @@ -0,0 +1,9 @@ +"""Auto-generated golden test stub for SELL_LOT_PARETO_SELECTOR_V1.""" + +def test_sell_lot_pareto_selector_v1_golden_stub_exists() -> None: + assert 'SELL_LOT_PARETO_SELECTOR_V1' + +def test_sell_lot_pareto_selector_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/state_vector_constructor_v1_golden.py b/tests/golden/generated/state_vector_constructor_v1_golden.py index 953ed01..731fc31 100644 --- a/tests/golden/generated/state_vector_constructor_v1_golden.py +++ b/tests/golden/generated/state_vector_constructor_v1_golden.py @@ -1,46 +1,9 @@ -"""Golden tests for STATE_VECTOR_CONSTRUCTOR_V1 (governance/todo/v8_9_p3_adoption_plan.yaml P3-A). +"""Auto-generated golden test stub for STATE_VECTOR_CONSTRUCTOR_V1.""" -Maps to v8.9 proposal golden case V89_052 (goal_far_from_target) for the -all-components-missing path, plus a partial-completeness path. -""" -from __future__ import annotations +def test_state_vector_constructor_v1_golden_stub_exists() -> None: + assert 'STATE_VECTOR_CONSTRUCTOR_V1' -import importlib.util -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_state_vector_constructor_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_state_vector_constructor_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_v89_052_all_components_missing_yields_zero_completeness() -> None: - mod = _load_module() - result = mod.construct_state_vector({k: None for k in mod.COMPONENT_KEYS}) - assert result["state_vector_completeness_pct"] == 0.0 - assert len(result["missing_components"]) == len(mod.COMPONENT_KEYS) - - -def test_partial_components_do_not_get_backfilled_from_others() -> None: - mod = _load_module() - components = {k: None for k in mod.COMPONENT_KEYS} - components["cash_ladder"] = {"current_cash_pct": 12.0} - components["positions"] = [{"ticker": "A"}] - result = mod.construct_state_vector(components) - assert "factor_exposures" in result["missing_components"] - assert result["state_vector"]["factor_exposures"] is None - assert result["state_vector"]["cash_ladder"] == {"current_cash_pct": 12.0} - - -def test_full_components_yields_full_completeness() -> None: - mod = _load_module() - components = {k: f"value_{k}" for k in mod.COMPONENT_KEYS} - result = mod.construct_state_vector(components) - assert result["state_vector_completeness_pct"] == 100.0 - assert result["missing_components"] == [] +def test_state_vector_constructor_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/strong_close_signal_v1_golden.py b/tests/golden/generated/strong_close_signal_v1_golden.py index d5b3a1d..3cc5861 100644 --- a/tests/golden/generated/strong_close_signal_v1_golden.py +++ b/tests/golden/generated/strong_close_signal_v1_golden.py @@ -1,36 +1,9 @@ -"""Golden tests for STRONG_CLOSE_SIGNAL_V1 (governance/todo/technical_signals_p4_adoption_plan.yaml P4-2).""" -from __future__ import annotations +"""Auto-generated golden test stub for STRONG_CLOSE_SIGNAL_V1.""" -import importlib.util -from pathlib import Path +def test_strong_close_signal_v1_golden_stub_exists() -> None: + assert 'STRONG_CLOSE_SIGNAL_V1' -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_strong_close_signal_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_strong_close_signal_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_close_near_high_is_strong_close() -> None: - mod = _load_module() - result = mod.evaluate_strong_close(99, 100, 90) - assert result["strong_close"] is True - assert result["close_position_pct"] == 90.0 - - -def test_close_near_low_is_not_strong_close() -> None: - mod = _load_module() - result = mod.evaluate_strong_close(91, 100, 90) - assert result["strong_close"] is False - - -def test_degenerate_high_equals_low_returns_null() -> None: - mod = _load_module() - result = mod.evaluate_strong_close(100, 100, 100) - assert result["strong_close"] is None - assert result["close_position_pct"] is None +def test_strong_close_signal_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/transition_set_enumerator_v1_golden.py b/tests/golden/generated/transition_set_enumerator_v1_golden.py index f5a55fc..c30cf91 100644 --- a/tests/golden/generated/transition_set_enumerator_v1_golden.py +++ b/tests/golden/generated/transition_set_enumerator_v1_golden.py @@ -1,63 +1,9 @@ -"""Golden tests for TRANSITION_SET_ENUMERATOR_V1 (governance/todo/v8_9_p2_adoption_plan.yaml P2-B). +"""Auto-generated golden test stub for TRANSITION_SET_ENUMERATOR_V1.""" -Maps to v8.9 proposal golden cases V89_010 (candidate_good_portfolio_bad), -V89_048 (solver_failure / no candidates), V89_049 (rank_tie). -""" -from __future__ import annotations +def test_transition_set_enumerator_v1_golden_stub_exists() -> None: + assert 'TRANSITION_SET_ENUMERATOR_V1' -import importlib.util -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_transition_set_enumerator_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_transition_set_enumerator_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_v89_010_individually_passing_combo_rejected_when_jointly_breaching_cash_floor() -> None: - mod = _load_module() - candidates = [ - { - "candidate_id": "A", - "hard_constraint_pass": True, - "transition_utility_krw": 100000, - "post_trade_cash_floor_delta_pct": 1.0, - "post_trade_concentration_delta_pct": 0.0, - }, - { - "candidate_id": "B", - "hard_constraint_pass": True, - "transition_utility_krw": 100000, - "post_trade_cash_floor_delta_pct": -2.0, - "post_trade_concentration_delta_pct": 0.0, - }, - ] - evaluated = mod.enumerate_transition_sets(candidates, max_set_size=2) - combo_ab = next(s for s in evaluated if set(s["candidate_ids"]) == {"A", "B"}) - assert combo_ab["set_hard_constraint_pass"] is False - - best = mod.select_best_set(evaluated) - assert best["candidate_ids"] == ["A"] - - -def test_v89_048_no_candidates_yields_empty_set_not_fabricated() -> None: - mod = _load_module() - evaluated = mod.enumerate_transition_sets([], max_set_size=3) - assert evaluated == [] - assert mod.select_best_set(evaluated) is None - - -def test_v89_049_tie_prefers_smaller_lower_complexity_combination() -> None: - mod = _load_module() - sets = [ - {"candidate_ids": ["A"], "set_hard_constraint_pass": True, "set_transition_utility_krw": 100000.0}, - {"candidate_ids": ["A", "C"], "set_hard_constraint_pass": True, "set_transition_utility_krw": 100000.0}, - ] - best = mod.select_best_set(sets) - assert best["candidate_ids"] == ["A"] +def test_transition_set_enumerator_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/trend_filter_gate_v1_golden.py b/tests/golden/generated/trend_filter_gate_v1_golden.py index 364606a..8cea044 100644 --- a/tests/golden/generated/trend_filter_gate_v1_golden.py +++ b/tests/golden/generated/trend_filter_gate_v1_golden.py @@ -1,36 +1,9 @@ -"""Golden tests for TREND_FILTER_GATE_V1 (governance/todo/technical_signals_p4_adoption_plan.yaml P4-7).""" -from __future__ import annotations +"""Auto-generated golden test stub for TREND_FILTER_GATE_V1.""" -import importlib.util -from pathlib import Path +def test_trend_filter_gate_v1_golden_stub_exists() -> None: + assert 'TREND_FILTER_GATE_V1' -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_trend_filter_gate_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_trend_filter_gate_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_above_rising_ma120_passes() -> None: - mod = _load_module() - assert mod.evaluate(105, 100, 99) is True - - -def test_below_ma120_fails() -> None: - mod = _load_module() - assert mod.evaluate(95, 100, 99) is False - - -def test_above_but_falling_ma120_fails() -> None: - mod = _load_module() - assert mod.evaluate(105, 100, 101) is False - - -def test_missing_ma120_returns_null() -> None: - mod = _load_module() - assert mod.evaluate(105, None, 99) is None +def test_trend_filter_gate_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/volatility_expansion_breakout_v1_golden.py b/tests/golden/generated/volatility_expansion_breakout_v1_golden.py index 83f9083..3dbab66 100644 --- a/tests/golden/generated/volatility_expansion_breakout_v1_golden.py +++ b/tests/golden/generated/volatility_expansion_breakout_v1_golden.py @@ -1,35 +1,9 @@ -"""Golden tests for VOLATILITY_EXPANSION_BREAKOUT_V1 (governance/todo/technical_signals_p4_adoption_plan.yaml P4-3).""" -from __future__ import annotations +"""Auto-generated golden test stub for VOLATILITY_EXPANSION_BREAKOUT_V1.""" -import importlib.util -from pathlib import Path +def test_volatility_expansion_breakout_v1_golden_stub_exists() -> None: + assert 'VOLATILITY_EXPANSION_BREAKOUT_V1' -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_volatility_expansion_breakout_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_volatility_expansion_breakout_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_squeeze_then_strong_move_triggers_signal() -> None: - mod = _load_module() - prev_squeeze = mod.squeeze_detected(10) - assert prev_squeeze is True - assert mod.evaluate(prev_squeeze, 4.5) is True - - -def test_no_squeeze_does_not_trigger_even_with_strong_move() -> None: - mod = _load_module() - prev_squeeze = mod.squeeze_detected(80) - assert prev_squeeze is False - assert mod.evaluate(prev_squeeze, 4.5) is False - - -def test_missing_percentile_returns_null() -> None: - mod = _load_module() - assert mod.squeeze_detected(None) is None +def test_volatility_expansion_breakout_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/walk_forward_bootstrap_v1_golden.py b/tests/golden/generated/walk_forward_bootstrap_v1_golden.py index 6c13948..dee6fe4 100644 --- a/tests/golden/generated/walk_forward_bootstrap_v1_golden.py +++ b/tests/golden/generated/walk_forward_bootstrap_v1_golden.py @@ -1,60 +1,9 @@ -"""Golden tests for WALK_FORWARD_BOOTSTRAP_V1 (governance/todo/v8_9_p3_adoption_plan.yaml P3-B). +"""Auto-generated golden test stub for WALK_FORWARD_BOOTSTRAP_V1.""" -Maps to v8.9 proposal golden cases V89_014 (same_regime_sample_low) and -V89_048 (solver_failure -- here, no historical_returns at all). -""" -from __future__ import annotations +def test_walk_forward_bootstrap_v1_golden_stub_exists() -> None: + assert 'WALK_FORWARD_BOOTSTRAP_V1' -import importlib.util -import random -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_walk_forward_bootstrap_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_walk_forward_bootstrap_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def _sample_returns(n=30): - rng = random.Random(1) - return [ - {"date": f"2026-01-{i:02d}", "regime_state": "RISK_ON" if i % 2 == 0 else "RISK_OFF", "net_return_after_cost_pct": rng.uniform(-2, 2)} - for i in range(1, n + 1) - ] - - -def test_v89_014_regime_filter_with_no_matches_returns_empty_not_substituted() -> None: - mod = _load_module() - rng = random.Random(1) - distribution = mod.regime_matched_resample(_sample_returns(), "NEVER_SEEN_REGIME", 50, rng) - assert distribution == [] - - -def test_v89_048_no_historical_returns_yields_empty_resample() -> None: - mod = _load_module() - rng = random.Random(1) - distribution = mod.walk_forward_resample([], 50, rng) - assert distribution == [] - - -def test_walk_forward_uses_only_out_of_sample_70_30_split() -> None: - mod = _load_module() - rng = random.Random(1) - returns = _sample_returns(20) - distribution = mod.walk_forward_resample(returns, resample_count=20, rng=rng) - assert len(distribution) == 20 - - -def test_regime_matched_resamples_only_from_filtered_regime() -> None: - mod = _load_module() - rng = random.Random(1) - returns = _sample_returns(30) - risk_on_values = {r["net_return_after_cost_pct"] for r in returns if r["regime_state"] == "RISK_ON"} - distribution = mod.regime_matched_resample(returns, "RISK_ON", 50, rng) - assert all(v in risk_on_values for v in distribution) +def test_walk_forward_bootstrap_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tests/golden/generated/weekly_legacy_transfer_plan_v1_golden.py b/tests/golden/generated/weekly_legacy_transfer_plan_v1_golden.py index 60941b3..5d641db 100644 --- a/tests/golden/generated/weekly_legacy_transfer_plan_v1_golden.py +++ b/tests/golden/generated/weekly_legacy_transfer_plan_v1_golden.py @@ -1,41 +1,9 @@ -"""Golden tests for WEEKLY_LEGACY_TRANSFER_PLAN_V1 (governance/todo/v8_9_p3_adoption_plan.yaml P3-E). +"""Auto-generated golden test stub for WEEKLY_LEGACY_TRANSFER_PLAN_V1.""" -Maps to v8.9 proposal golden case V89_005 (deployable_cash_negative -- an unconfirmed -transfer plan must not inflate deployable cash). -""" -from __future__ import annotations +def test_weekly_legacy_transfer_plan_v1_golden_stub_exists() -> None: + assert 'WEEKLY_LEGACY_TRANSFER_PLAN_V1' -import importlib.util -from pathlib import Path - -ROOT = Path(__file__).resolve().parents[3] -MODULE_PATH = ROOT / "tools" / "build_weekly_legacy_transfer_plan_v1.py" - - -def _load_module(): - spec = importlib.util.spec_from_file_location("build_weekly_legacy_transfer_plan_v1", MODULE_PATH) - module = importlib.util.module_from_spec(spec) - assert spec.loader is not None - spec.loader.exec_module(module) - return module - - -def test_v89_005_unconfirmed_plan_contributes_zero_to_deployable_cash() -> None: - mod = _load_module() - result = mod.evaluate_transfer_plan(4000000.0, False, None) - assert result["deployable_cash_contribution_krw"] == 0.0 - assert result["plan_status"] == "PLANNED_NOT_DEPLOYABLE" - - -def test_confirmed_plan_uses_confirmed_amount_not_planned_amount() -> None: - mod = _load_module() - result = mod.evaluate_transfer_plan(4000000.0, True, 3800000.0) - assert result["deployable_cash_contribution_krw"] == 3800000.0 - assert result["plan_status"] == "CONFIRMED_DEPLOYABLE" - - -def test_null_transfer_confirmed_treated_as_unconfirmed() -> None: - mod = _load_module() - result = mod.evaluate_transfer_plan(4000000.0, None, None) - assert result["plan_status"] == "PLANNED_NOT_DEPLOYABLE" - assert result["deployable_cash_contribution_krw"] == 0.0 +def test_weekly_legacy_transfer_plan_v1_declares_outputs() -> None: + outputs = [] + assert isinstance(outputs, list) + assert outputs diff --git a/tools/validate_formula_owner_coverage_v1.py b/tools/validate_formula_owner_coverage_v1.py index 9ac4501..d8043e8 100644 --- a/tools/validate_formula_owner_coverage_v1.py +++ b/tools/validate_formula_owner_coverage_v1.py @@ -8,29 +8,14 @@ import yaml from refactor_master_helpers import ROOT, extract_formula_ids, extract_formula_outputs, load_yaml -def _infer_owner(formula_id: str) -> str: - fid = formula_id.upper() - if any(token in fid for token in ("REPORT", "RENDER", "NARRATIVE", "TRACE", "LEDGER", "VERDICT", "JUDGMENT", "HEADLINE", "SUMMARY", "EXPLAIN")): - return "report_owner" - if any(token in fid for token in ("DATA_", "RAW", "FRESHNESS", "HARNESS", "INGEST", "MISSING", "CONTRACT")): - return "data_owner" - if any(token in fid for token in ("GAS", "ADAPTER", "EXPORT", "RUNTIME", "BUNDLE", "ZIP", "PACKAGE")): - return "release_manager" - if any(token in fid for token in ("CASH", "HEAT", "RISK", "SIZE", "STOP", "TAKE_PROFIT", "PROFIT", "LOSS", "PORTFOLIO", "POSITION", "EXIT", "SELL", "BUY", "ALLOCATION")): - return "quant_owner" - if any(token in fid for token in ("MACRO", "REGIME", "SECTOR", "LIQUIDITY", "SMART_MONEY", "FUNDAMENTAL", "EARNINGS", "GROWTH", "MARKET_SHARE", "MOMENTUM", "FLOW", "ALPHA", "PREDICTION", "PERFORMANCE")): - return "engine_owner" - return "engine_owner" - - def main() -> int: formulas = load_yaml(ROOT / "spec" / "13_formula_registry.yaml").get("formula_registry", {}).get("formulas", {}) owners = load_yaml(ROOT / "spec" / "ownership_map.yaml").get("ownership_map", {}) formula_ids = extract_formula_ids() output_map = extract_formula_outputs() - missing_owner = [fid for fid in formula_ids if not str(formulas.get(fid, {}).get("owner") or _infer_owner(fid)).strip()] - missing_status = [fid for fid in formula_ids if not str(formulas.get(fid, {}).get("status") or "active").strip()] + missing_owner = [fid for fid in formula_ids if not str(formulas.get(fid, {}).get("owner") or "").strip()] + missing_status = [fid for fid in formula_ids if not str(formulas.get(fid, {}).get("status") or "").strip()] missing_outputs = [fid for fid, outs in output_map.items() if not outs] normalized = { @@ -40,9 +25,9 @@ def main() -> int: "formulas": [ { "formula_id": fid, - "owner": formulas.get(fid, {}).get("owner") or _infer_owner(fid), - "status": formulas.get(fid, {}).get("status") or "active", - "output_fields": output_map.get(fid, []) or ["TODO_REQUIRED"], + "owner": formulas.get(fid, {}).get("owner"), + "status": formulas.get(fid, {}).get("status"), + "output_fields": output_map.get(fid, []), } for fid in formula_ids ], @@ -60,7 +45,7 @@ def main() -> int: "missing_status_list": missing_status[:200], "missing_output_field_list": missing_outputs[:200], "owner_map_concepts": len(owners) if isinstance(owners, dict) else 0, - "gate": "PASS", + "gate": "FAIL" if missing_owner or missing_status or missing_outputs else "PASS", } out = ROOT / "Temp" / "formula_owner_coverage_v1.json" out.write_text(json.dumps(result, ensure_ascii=False, indent=2), encoding="utf-8") diff --git a/tools/validate_formula_registry.py b/tools/validate_formula_registry.py index 392e4b1..67dd550 100644 --- a/tools/validate_formula_registry.py +++ b/tools/validate_formula_registry.py @@ -17,12 +17,14 @@ def main() -> int: normalized = yaml.safe_load((ROOT / "spec" / "03_formulas" / "formula_registry.normalized.yaml").read_text(encoding="utf-8")) domain_files = manifest.get("domains") or {} formulas = normalized.get("formulas") or [] - ok = bool(domain_files) and len(formulas) > 0 + missing_owner = [row.get("formula_id") for row in formulas if not str((row or {}).get("owner") or "").strip()] + missing_status = [row.get("formula_id") for row in formulas if not str((row or {}).get("status") or "").strip()] + missing_outputs = [row.get("formula_id") for row in formulas if not (row or {}).get("output_fields")] + ok = bool(domain_files) and len(formulas) > 0 and not missing_owner and not missing_status and not missing_outputs print("FORMULA_REGISTRY_OK" if ok else "FORMULA_REGISTRY_FAIL") - print(f"domain_count={len(domain_files)} formula_count={len(formulas)}") + print(f"domain_count={len(domain_files)} formula_count={len(formulas)} missing_owner={len(missing_owner)} missing_status={len(missing_status)} missing_outputs={len(missing_outputs)}") return 0 if ok or not args.strict else 1 if __name__ == "__main__": raise SystemExit(main()) -