From: Jérôme Benoit Date: Sat, 4 Oct 2025 12:44:56 +0000 (+0200) Subject: refactor(reforcexy): cleanup reward space analysis code X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=82c7de762a6530e09e10ae132e7c7cfe390e9457;p=freqai-strategies.git refactor(reforcexy): cleanup reward space analysis code Signed-off-by: Jérôme Benoit --- diff --git a/ReforceXY/reward_space_analysis/reward_space_analysis.py b/ReforceXY/reward_space_analysis/reward_space_analysis.py index 066b632..03463a8 100644 --- a/ReforceXY/reward_space_analysis/reward_space_analysis.py +++ b/ReforceXY/reward_space_analysis/reward_space_analysis.py @@ -375,11 +375,7 @@ def _compute_exit_reward( context: RewardContext, params: Dict[str, float | str], ) -> float: - """Compose the exit reward: pnl * exit_factor. - - The exit_factor already includes time attenuation AND pnl_factor multiplication - as done in ReforceXY._get_exit_factor(). - """ + """Compose the exit reward: pnl * exit_factor.""" duration_ratio = context.trade_duration / max(1, context.max_trade_duration) exit_factor = _get_exit_factor( base_factor, @@ -837,9 +833,7 @@ def write_relationship_reports( def _compute_representativity_stats( - df: pd.DataFrame, - profit_target: float, - max_trade_duration: int, + df: pd.DataFrame, profit_target: float ) -> Dict[str, Any]: """Compute representativity statistics for the reward space.""" total = len(df)