Repository navigation
v2.0.1 — PAITS-Event Pre-Execution Gate Fix
Fixed
- Fixed
event_ratemode so PAITS-Event is applied as a pre-execution signal gate rather than as a completed-trade post-filter. - Rewrote
signalandconfidencebeforeengine.run_backtest()using admitted PAITS-Event bars. - Avoided re-running
model.predict()inevent_ratemode when saved OOSregime_probanddirection_indicatorare already available fromWindowResult.signal_df. - Removed the path-dependent artifact caused by filtering completed raw MDRS trades after backtest execution.
- Fixed timestamp mismatch between signal-bar event timestamps and next-bar
entry_time.
Changed
- Clarified that PAITS-Event bisection solves only for the regime-probability event threshold.
- Clarified that
cooldown_daysis a fixed event de-duplication parameter, not a bisection target. - Updated event-rate documentation to describe PAITS-Event as a pre-execution signal-generation layer.
Improved
-
Added explicit trade
exit_reasonlabels:TakeProfitStopLossBreakEvenTrailingStopTimeOut
-
Added PnL-based
outcomelabels:WinLossFlat
This prevents profitable trailing-stop or break-even exits from being reported as generic StopLoss trades.
Notes
- This patch does not change transaction-cost, funding, TP/SL, break-even, trailing-stop, or max-hold economics.
- Performance metrics remain PnL-based.
- The main behavioral fix is that PAITS-Event now gates candidate signals before backtest execution, which is required for path-dependent single-position backtesting.
Expected behavior
A correct event_rate run should now log pre-execution event counts, for example:
PAITS-Event pre-execution events: 223 / 605088 bars admitted