Skip to content

v2.0.1 — PAITS-Event Pre-Execution Gate Fix

Choose a tag to compare

@rpycgo rpycgo released this 15 May 04:13
· 9 commits to main since this release

Fixed

  • Fixed event_rate mode so PAITS-Event is applied as a pre-execution signal gate rather than as a completed-trade post-filter.
  • Rewrote signal and confidence before engine.run_backtest() using admitted PAITS-Event bars.
  • Avoided re-running model.predict() in event_rate mode when saved OOS regime_prob and direction_indicator are already available from WindowResult.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_days is 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_reason labels:

    • TakeProfit
    • StopLoss
    • BreakEven
    • TrailingStop
    • TimeOut
  • Added PnL-based outcome labels:

    • Win
    • Loss
    • Flat

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