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:
@@ -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]]:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user