feat: implement exit_decisions parity module with full decision logic

- Add compute_sell_decision(): TP1/TP2 profit taking, relative weakness trimming, time-based exits
- Add compute_stop_action_ladder(): priority ladder for regime risk, trailing stops, profit thresholds
- Add compute_final_decision(): unified routing for sell/timing/DART risk actions
- Include reason field in all decision outputs for audit trail and signal tracing
- All 95 parity tests passing (was 4 failing, now 0 failing)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-07-26 15:22:35 +09:00
parent 8104437992
commit 2816e31075
4 changed files with 166 additions and 0 deletions
+3
View File
@@ -5,8 +5,11 @@ import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
SRC = ROOT / "src"
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
if str(SRC) not in sys.path:
sys.path.insert(0, str(SRC))
from src.quant_engine.exit_decisions import compute_sell_decision
from src.quant_engine.exit_decisions import compute_stop_action_ladder
@@ -6,8 +6,11 @@ import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
SRC = ROOT / "src"
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
if str(SRC) not in sys.path:
sys.path.insert(0, str(SRC))
def run_route_flow_simulation(h: dict, df: dict, h1: dict) -> tuple[str, list[dict]]:
+3
View File
@@ -5,8 +5,11 @@ import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
SRC = ROOT / "src"
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
if str(SRC) not in sys.path:
sys.path.insert(0, str(SRC))
from src.quant_engine.exit_decisions import compute_timing_decision