From 82c7de762a6530e09e10ae132e7c7cfe390e9457 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 4 Oct 2025 14:44:56 +0200 Subject: [PATCH] refactor(reforcexy): cleanup reward space analysis code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../reward_space_analysis/reward_space_analysis.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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) -- 2.43.0