WBS-7.3 F05/F10 완료: 실행 의사결정(F05) + 포트폴리오 라우팅(F10) 포팅
F05 (execution_decision_v1.py): - calc_exit_sell_action(): 7단계 우선순위 계층(정지/시간_종료, 강_상대약세, 추적정지, 중_약세, 익절, 시간정지) - safe_float() 헬퍼로 JavaScript Number.isFinite() 의미론 보장 - tp2→tp1→closeProtectLimit 가격 폴백 체인 - 17개 parity 테스트 PASS (우선순위, 가격 추적, 검증 상태) F10 (routing_decision_v1.py): - run_route_flow(): 5개 게이트 순차 필터링 1. Stop_Breach: EXIT_100 또는 P4 인트라데이 락시 TRIM_50 2. Relative_Stop: 베타조정 시장정지(절대_바닥, 상대_초과, 시간조건) 3. Intraday_Lock: P4 제약(BUY→WATCH, ADD→TRIM_50, 허용목록 강제) 4. Heat_Gate: 포트폴리오 열기제어(BLOCK_NEW_BUY/HALVE_NEW_BUY_QUANTITY) 5. Mean_Reversion: MRG001(close/ma20 > 1.10이면 BUY 차단) - 17개 parity 테스트 PASS (5개 게이트 모두 테스트됨) 마이그레이션 레저 업데이트: - F05: TODO → DONE - F10: TODO → DONE - 누적 parity 테스트: 64/64 PASS Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -106,7 +106,17 @@ findings:
|
||||
classification: decision_logic
|
||||
migration_action: MIGRATE_DECISIONS_ROUTING
|
||||
target_file: formulas/execution_decision_v1.py
|
||||
status: TODO
|
||||
status: DONE
|
||||
resolved_2026_06_22: >
|
||||
formulas/execution_decision_v1.py:calc_exit_sell_action() implemented with 7-tier priority hierarchy
|
||||
(stop/time exit, strong relative weakness, trailing stop, medium weakness, profit-taking, time stops).
|
||||
safe_float() helper ensures JavaScript Number.isFinite() semantics (handles None, NaN, ±Infinity).
|
||||
17 parity tests in tests/parity/test_execution_decision_parity_v1.py PASS:
|
||||
- Priority 1: STOP_OR_TIME_EXIT_READY, rwPartial >= 4 → EXIT_100
|
||||
- Priority 5: profitPct tiers (50%, 30%, 20%, 10%) → PROFIT_TRIM_50/35/25, TAKE_PROFIT_TIER1
|
||||
- Priority 4/6: trailing stops, time stops, RW signal levels → TRIM_70/50/33/25
|
||||
- Price fallback chain: tp2Price → tp1Price → closeProtectLimit (Tier2→Tier1→Close)
|
||||
Full validation (SIGNAL_CONFIRMED / NO_SELL_ACTION) matches GAS pattern.
|
||||
|
||||
- id: F06
|
||||
file: src/gas_adapter_parts/gdf_01_price_metrics.gs
|
||||
@@ -164,7 +174,18 @@ findings:
|
||||
classification: decision_logic
|
||||
migration_action: MIGRATE_DECISIONS_ROUTING
|
||||
target_file: formulas/routing_decision_v1.py
|
||||
status: TODO
|
||||
status: DONE
|
||||
resolved_2026_06_22: >
|
||||
formulas/routing_decision_v1.py:run_route_flow() implemented with 5-gate sequential filtering:
|
||||
Gate 1: Stop_Breach (EXIT_100 or TRIM_50 if P4 intraday lock)
|
||||
Gate 2: Relative_Stop (beta-adjusted market stop with absolute floor, relative excess, time conditions)
|
||||
Gate 3: Intraday_Lock (P4: downgrade BUY→WATCH, ADD→TRIM_50, enforce allowlist)
|
||||
Gate 4: Heat_Gate (portfolio heat control: BLOCK_NEW_BUY or HALVE_NEW_BUY_QUANTITY)
|
||||
Gate 5: Mean_Reversion (MRG001: block if close/ma20 > 1.10 on BUY actions)
|
||||
17 parity tests in tests/parity/test_routing_decision_parity_v1.py PASS:
|
||||
- All 5 gates tested with pass/fail/skip/inactive transitions
|
||||
- Multi-holding routing with different outcomes verified
|
||||
Full test suite: 64/64 parity tests PASS (F05/F10/F15/F07 combined).
|
||||
|
||||
- id: F11
|
||||
file: src/gas_adapter_parts/gdf_03_portfolio_gates.gs
|
||||
|
||||
Reference in New Issue
Block a user