]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
style(docs): format Markdown with Prettier
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 23 Sep 2026 19:52:28 +0000 (21:52 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 23 Sep 2026 19:52:28 +0000 (21:52 +0200)
ReforceXY/reward_space_analysis/README.md
ReforceXY/reward_space_analysis/tests/README.md

index 65744f31f1e2e0b0026d4d4eaa0ee05f88266789..b4cda5c2bab8df9935193c14d082d7760221d79b 100644 (file)
@@ -281,6 +281,7 @@ fallback). Then `loss_threshold = pnl_target / effective_rr` and
 Let `max_u = max_unrealized_profit`, `min_u = min_unrealized_profit`,
 `range = max_u - min_u`, `ratio = (pnl - min_u)/range`,
 `min_range = max(1e-6, 0.01 · pnl_target)`. Then:
+
 - If `range < min_range`: `efficiency_coefficient = 1` (guard against division
   explosion)
 - If `pnl > 0`:
index e4203b21818e659f2cdf8b382f8eb708084d7b40..9bbd1901f9727a1d279fd448d17c67d6dcab7ddc 100644 (file)
@@ -181,44 +181,44 @@ Columns:
   stable across unrelated line insertions.
 - Notes: Sub-modes, non-owning references and multi-path coverage.
 
-| ID                                            | Category    | Description                                                                         | Owning test                                                                                        | Notes                                                                                                                                                                          |
-| --------------------------------------------- | ----------- | ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| report-additives-deterministic-092            | components  | Additives deterministic report section                                              | components/test_additives.py::test_additive_activation_deterministic_contribution                  | Integration/PBRS may reference outcome non-owning                                                                                                                              |
-| robustness-decomposition-integrity-101        | robustness  | Single active core component equals total reward under mutually exclusive scenarios | robustness/test_robustness.py::test_decomposition_integrity                                        | Scenarios: idle, hold, exit, invalid; non-owning refs integration/test_reward_calculation.py                                                                                   |
-| robustness-exit-mode-fallback-102             | robustness  | Unknown exit_attenuation_mode falls back to linear w/ warning                       | robustness/test_robustness.py::test_robustness_102_unknown_exit_mode_fallback_linear               |                                                                                                                                                                                |
-| robustness-negative-grace-clamp-103           | robustness  | Negative exit_plateau_grace clamps to 0.0 w/ warning                                | robustness/test_robustness.py::test_robustness_103_negative_plateau_grace_clamped                  |                                                                                                                                                                                |
-| robustness-invalid-power-tau-104              | robustness  | Invalid power tau falls back alpha=1.0 w/ warning                                   | robustness/test_robustness.py::test_robustness_104_invalid_power_tau_fallback_alpha_one            |                                                                                                                                                                                |
-| robustness-near-zero-half-life-105            | robustness  | Near-zero half life yields no attenuation (factor≈base)                             | robustness/test_robustness.py::test_robustness_105_half_life_near_zero_fallback                    |                                                                                                                                                                                |
-| pbrs-canonical-exit-semantic-106              | pbrs        | Canonical exit uses shaping=-prev_potential and next_potential=0.0                  | pbrs/test_pbrs.py::test_exit_step_shaping_matches_exit_step_rules                                  | Uses stored potential across steps; no drift correction applied                                                                                                                |
-| statistics-partial-deps-skip-107              | statistics  | skip_partial_dependence => empty PD structures                                      | statistics/test_statistics.py::test_statistics_feature_analysis_skip_partial_dependence            |                                                                                                                                                                                |
-| helpers-transitions-preserve-multiplicity-108 | helpers     | Repeated transitions retain their empirical multiplicity                            | helpers/test_utilities.py::test_repeated_transitions_preserve_multiplicity                         |                                                                                                                                                                                |
-| helpers-missing-cols-fill-109                 | helpers     | Missing required columns filled with NaN + single warning                           | helpers/test_utilities.py::test_missing_multiple_required_columns_single_warning                   |                                                                                                                                                                                |
-| statistics-binned-stats-min-edges-110         | statistics  | <2 bin edges raises ValueError                                                      | statistics/test_statistics.py::test_statistics_binned_stats_invalid_bins_raises                    | Docstring line                                                                                                                                                                 |
-| statistics-constant-cols-exclusion-111        | statistics  | Constant columns excluded & listed                                                  | statistics/test_statistics.py::test_statistics_correlation_dropped_constant_columns                | Docstring line                                                                                                                                                                 |
-| statistics-degenerate-distribution-shift-112  | statistics  | Constants: zero distances; KS p only with declared independent observations         | statistics/test_statistics.py::test_statistics_distribution_shift_metrics_degenerate_zero          | Docstring line                                                                                                                                                                 |
-| statistics-constant-dist-exact-ci-113a        | statistics  | Both modes retain exact constant CI bounds                                          | statistics/test_statistics.py::test_stats_bootstrap_constant_distribution_exact_bounds             |                                                                                                                                                                                |
-| statistics-percentile-outside-mean-113b       | statistics  | Percentile bounds need not contain the sample mean                                  | statistics/test_statistics.py::test_stats_bootstrap_percentiles_need_not_contain_mean              |                                                                                                                                                                                |
-| statistics-constant-diagnostics-115           | statistics  | Constants have N/A higher moments, normality tests and Q-Q fits in both modes       | statistics/test_statistics.py::test_statistics_distribution_constant_diagnostics                   |                                                                                                                                                                                |
-| pbrs-canonical-near-zero-report-116           | pbrs        | Canonical trajectories with valid evidence are classified as verified               | pbrs/test_pbrs.py::test_pbrs_canonical_near_zero_report                                            | Requires local identity, continuity, discounted terminal boundary, and zero observed additives; the non-owning boundary test also covers a complete singleton terminal episode |
-| robustness-exit-pnl-only-117                  | robustness  | Only exit actions have non-zero PnL                                                 | robustness/test_robustness.py::test_pnl_invariant_exit_only                                        |                                                                                                                                                                                |
-| pbrs-absence-shift-placeholder-118            | pbrs        | Placeholder shift line present when shaping shift is absent                         | pbrs/test_pbrs.py::test_pbrs_absence_and_distribution_shift_placeholder                            |                                                                                                                                                                                |
-| components-pbrs-breakdown-fields-119          | components  | PBRS breakdown fields finite and mathematically aligned                             | components/test_reward_components.py::test_pbrs_breakdown_fields_finite_and_aligned                | Tests base_reward, pbrs_delta and invariance_correction alignment                                                                                                              |
-| integration-pbrs-metrics-section-120          | integration | PBRS Metrics section present in report with tracing metrics                         | integration/test_report_formatting.py::test_report_includes_pbrs_metrics_section                   |                                                                                                                                                                                |
-| cli-pbrs-csv-columns-121                      | cli         | PBRS columns in reward_samples.csv when shaping enabled                             | cli/test_cli_params_and_csv.py::test_csv_contains_pbrs_columns_when_shaping_present                | Verifies finite reward_base, reward_pbrs_delta and reward_invariance_correction values                                                                                         |
-| statistics-bh-finite-family-122               | statistics  | Undefined tests excluded from finite-only BH family; marked non-applicable          | statistics/test_statistics.py::test_bh_excludes_undefined_tests_from_finite_family                 |                                                                                                                                                                                |
-| statistics-independence-contract-123          | statistics  | Inferential helpers require independent_observations=True                           | statistics/test_statistics.py::test_inference_helpers_require_independent_observations             | Covers hypothesis tests and bootstrap intervals                                                                                                                                |
-| report-independent-sections-124               | integration | CI, diagnostics and shift sections do not depend on hypothesis-test output          | integration/test_report_formatting.py::test_statistical_sections_do_not_depend_on_hypothesis_tests | Also verifies the reported bootstrap resample count                                                                                                                            |
-| pbrs-discounted-evidence-125                  | pbrs        | Verification requires local identity, continuity and discounted terminal boundary   | pbrs/test_pbrs.py::test_pbrs_canonical_discontinuous_potentials_report                             | Discontinuous potentials are not verified                                                                                                                                      |
-| statistics-proportional-histograms-126        | statistics  | Proportional histograms ignore sample count; moved mass yields positive KL/JS       | statistics/test_statistics.py::test_distribution_shift_proportional_histograms_ignore_sample_count | KL and JS remain finite and non-negative                                                                                                                                       |
-| pbrs-near-bound-clamp-127                     | pbrs        | Relaxed near-bound clamps apply exact endpoints and retain all reasons              | pbrs/test_pbrs.py::test_validate_reward_parameters_records_near_bound_clamps_exactly               | Includes numeric-string coercion                                                                                                                                               |
-| pbrs-exit-mode-validation-128                 | pbrs        | Exit-potential choices are strict or canonicalized; direct calls fail safe          | pbrs/test_pbrs.py::test_invalid_exit_mode_warns_at_direct_and_simulation_boundaries                | Direct calculation and simulation boundaries warn before fallback; PBRS calls suppress additives                                                                               |
-| cli-invalid-exit-mode-129                     | cli         | Invalid `--params exit_potential_mode` fails before artifacts                       | cli/test_cli_params_and_csv.py::test_invalid_exit_potential_mode_params_fails_before_artifacts     | Strict CLI validation                                                                                                                                                          |
-| cli-warning-header-recognition-130            | cli         | Warning counts accept only anchored Python warning header formats                   | cli/test_cli_params_and_csv.py::test_warning_header_positive_and_negative_formats                  | Covers POSIX, relative, synthetic and Windows source locations                                                                                                                 |
-| pbrs-invalid-mode-provenance-131              | pbrs        | Invalid imported exit-mode metadata cannot certify canonical invariance             | pbrs/test_pbrs.py::test_report_rejects_invalid_exit_mode_provenance                                | Preserves the invalid raw value and reports effective additive settings as unknown                                                                                             |
-| pbrs-synthetic-fee-floor-132                  | pbrs        | High-fee entry loss remains in long/short synthetic PnL and exit rewards            | pbrs/test_pbrs.py::test_synthetic_fee_loss_extrema_match_retained_pnl                              | Direct and transformed trajectories                                                                                                                                            |
-| pbrs-synthetic-profitable-mark-133            | pbrs        | Favorable long/short marks remain profitable after high-fee synthetic transformation | pbrs/test_pbrs.py::test_synthetic_high_fee_winner_retains_profitable_mark                           | Covers immediate gains and recovery after an initial loss on the independent sampled market path                                                                                |
-| pbrs-synthetic-fee-boundary-134               | pbrs        | Fee-boundary rounding is accepted while materially extreme PnL is rejected          | pbrs/test_pbrs.py::test_synthetic_high_fee_short_boundary_rejects_real_excess                        | Non-unit entry price exposes floating-point roundoff                                                                                                                           |
-| pbrs-synthetic-latent-price-135               | pbrs        | Clipped candidate PnL does not erase the sampled market path for later holds         | pbrs/test_pbrs.py::test_unrealized_pnl_retains_sampled_market_path_after_candidate_cap            | Equal first retained marks from distinct market prices diverge after the same adverse return                                                                                    |
+| ID                                            | Category    | Description                                                                          | Owning test                                                                                        | Notes                                                                                                                                                                          |
+| --------------------------------------------- | ----------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| report-additives-deterministic-092            | components  | Additives deterministic report section                                               | components/test_additives.py::test_additive_activation_deterministic_contribution                  | Integration/PBRS may reference outcome non-owning                                                                                                                              |
+| robustness-decomposition-integrity-101        | robustness  | Single active core component equals total reward under mutually exclusive scenarios  | robustness/test_robustness.py::test_decomposition_integrity                                        | Scenarios: idle, hold, exit, invalid; non-owning refs integration/test_reward_calculation.py                                                                                   |
+| robustness-exit-mode-fallback-102             | robustness  | Unknown exit_attenuation_mode falls back to linear w/ warning                        | robustness/test_robustness.py::test_robustness_102_unknown_exit_mode_fallback_linear               |                                                                                                                                                                                |
+| robustness-negative-grace-clamp-103           | robustness  | Negative exit_plateau_grace clamps to 0.0 w/ warning                                 | robustness/test_robustness.py::test_robustness_103_negative_plateau_grace_clamped                  |                                                                                                                                                                                |
+| robustness-invalid-power-tau-104              | robustness  | Invalid power tau falls back alpha=1.0 w/ warning                                    | robustness/test_robustness.py::test_robustness_104_invalid_power_tau_fallback_alpha_one            |                                                                                                                                                                                |
+| robustness-near-zero-half-life-105            | robustness  | Near-zero half life yields no attenuation (factor≈base)                              | robustness/test_robustness.py::test_robustness_105_half_life_near_zero_fallback                    |                                                                                                                                                                                |
+| pbrs-canonical-exit-semantic-106              | pbrs        | Canonical exit uses shaping=-prev_potential and next_potential=0.0                   | pbrs/test_pbrs.py::test_exit_step_shaping_matches_exit_step_rules                                  | Uses stored potential across steps; no drift correction applied                                                                                                                |
+| statistics-partial-deps-skip-107              | statistics  | skip_partial_dependence => empty PD structures                                       | statistics/test_statistics.py::test_statistics_feature_analysis_skip_partial_dependence            |                                                                                                                                                                                |
+| helpers-transitions-preserve-multiplicity-108 | helpers     | Repeated transitions retain their empirical multiplicity                             | helpers/test_utilities.py::test_repeated_transitions_preserve_multiplicity                         |                                                                                                                                                                                |
+| helpers-missing-cols-fill-109                 | helpers     | Missing required columns filled with NaN + single warning                            | helpers/test_utilities.py::test_missing_multiple_required_columns_single_warning                   |                                                                                                                                                                                |
+| statistics-binned-stats-min-edges-110         | statistics  | <2 bin edges raises ValueError                                                       | statistics/test_statistics.py::test_statistics_binned_stats_invalid_bins_raises                    | Docstring line                                                                                                                                                                 |
+| statistics-constant-cols-exclusion-111        | statistics  | Constant columns excluded & listed                                                   | statistics/test_statistics.py::test_statistics_correlation_dropped_constant_columns                | Docstring line                                                                                                                                                                 |
+| statistics-degenerate-distribution-shift-112  | statistics  | Constants: zero distances; KS p only with declared independent observations          | statistics/test_statistics.py::test_statistics_distribution_shift_metrics_degenerate_zero          | Docstring line                                                                                                                                                                 |
+| statistics-constant-dist-exact-ci-113a        | statistics  | Both modes retain exact constant CI bounds                                           | statistics/test_statistics.py::test_stats_bootstrap_constant_distribution_exact_bounds             |                                                                                                                                                                                |
+| statistics-percentile-outside-mean-113b       | statistics  | Percentile bounds need not contain the sample mean                                   | statistics/test_statistics.py::test_stats_bootstrap_percentiles_need_not_contain_mean              |                                                                                                                                                                                |
+| statistics-constant-diagnostics-115           | statistics  | Constants have N/A higher moments, normality tests and Q-Q fits in both modes        | statistics/test_statistics.py::test_statistics_distribution_constant_diagnostics                   |                                                                                                                                                                                |
+| pbrs-canonical-near-zero-report-116           | pbrs        | Canonical trajectories with valid evidence are classified as verified                | pbrs/test_pbrs.py::test_pbrs_canonical_near_zero_report                                            | Requires local identity, continuity, discounted terminal boundary, and zero observed additives; the non-owning boundary test also covers a complete singleton terminal episode |
+| robustness-exit-pnl-only-117                  | robustness  | Only exit actions have non-zero PnL                                                  | robustness/test_robustness.py::test_pnl_invariant_exit_only                                        |                                                                                                                                                                                |
+| pbrs-absence-shift-placeholder-118            | pbrs        | Placeholder shift line present when shaping shift is absent                          | pbrs/test_pbrs.py::test_pbrs_absence_and_distribution_shift_placeholder                            |                                                                                                                                                                                |
+| components-pbrs-breakdown-fields-119          | components  | PBRS breakdown fields finite and mathematically aligned                              | components/test_reward_components.py::test_pbrs_breakdown_fields_finite_and_aligned                | Tests base_reward, pbrs_delta and invariance_correction alignment                                                                                                              |
+| integration-pbrs-metrics-section-120          | integration | PBRS Metrics section present in report with tracing metrics                          | integration/test_report_formatting.py::test_report_includes_pbrs_metrics_section                   |                                                                                                                                                                                |
+| cli-pbrs-csv-columns-121                      | cli         | PBRS columns in reward_samples.csv when shaping enabled                              | cli/test_cli_params_and_csv.py::test_csv_contains_pbrs_columns_when_shaping_present                | Verifies finite reward_base, reward_pbrs_delta and reward_invariance_correction values                                                                                         |
+| statistics-bh-finite-family-122               | statistics  | Undefined tests excluded from finite-only BH family; marked non-applicable           | statistics/test_statistics.py::test_bh_excludes_undefined_tests_from_finite_family                 |                                                                                                                                                                                |
+| statistics-independence-contract-123          | statistics  | Inferential helpers require independent_observations=True                            | statistics/test_statistics.py::test_inference_helpers_require_independent_observations             | Covers hypothesis tests and bootstrap intervals                                                                                                                                |
+| report-independent-sections-124               | integration | CI, diagnostics and shift sections do not depend on hypothesis-test output           | integration/test_report_formatting.py::test_statistical_sections_do_not_depend_on_hypothesis_tests | Also verifies the reported bootstrap resample count                                                                                                                            |
+| pbrs-discounted-evidence-125                  | pbrs        | Verification requires local identity, continuity and discounted terminal boundary    | pbrs/test_pbrs.py::test_pbrs_canonical_discontinuous_potentials_report                             | Discontinuous potentials are not verified                                                                                                                                      |
+| statistics-proportional-histograms-126        | statistics  | Proportional histograms ignore sample count; moved mass yields positive KL/JS        | statistics/test_statistics.py::test_distribution_shift_proportional_histograms_ignore_sample_count | KL and JS remain finite and non-negative                                                                                                                                       |
+| pbrs-near-bound-clamp-127                     | pbrs        | Relaxed near-bound clamps apply exact endpoints and retain all reasons               | pbrs/test_pbrs.py::test_validate_reward_parameters_records_near_bound_clamps_exactly               | Includes numeric-string coercion                                                                                                                                               |
+| pbrs-exit-mode-validation-128                 | pbrs        | Exit-potential choices are strict or canonicalized; direct calls fail safe           | pbrs/test_pbrs.py::test_invalid_exit_mode_warns_at_direct_and_simulation_boundaries                | Direct calculation and simulation boundaries warn before fallback; PBRS calls suppress additives                                                                               |
+| cli-invalid-exit-mode-129                     | cli         | Invalid `--params exit_potential_mode` fails before artifacts                        | cli/test_cli_params_and_csv.py::test_invalid_exit_potential_mode_params_fails_before_artifacts     | Strict CLI validation                                                                                                                                                          |
+| cli-warning-header-recognition-130            | cli         | Warning counts accept only anchored Python warning header formats                    | cli/test_cli_params_and_csv.py::test_warning_header_positive_and_negative_formats                  | Covers POSIX, relative, synthetic and Windows source locations                                                                                                                 |
+| pbrs-invalid-mode-provenance-131              | pbrs        | Invalid imported exit-mode metadata cannot certify canonical invariance              | pbrs/test_pbrs.py::test_report_rejects_invalid_exit_mode_provenance                                | Preserves the invalid raw value and reports effective additive settings as unknown                                                                                             |
+| pbrs-synthetic-fee-floor-132                  | pbrs        | High-fee entry loss remains in long/short synthetic PnL and exit rewards             | pbrs/test_pbrs.py::test_synthetic_fee_loss_extrema_match_retained_pnl                              | Direct and transformed trajectories                                                                                                                                            |
+| pbrs-synthetic-profitable-mark-133            | pbrs        | Favorable long/short marks remain profitable after high-fee synthetic transformation | pbrs/test_pbrs.py::test_synthetic_high_fee_winner_retains_profitable_mark                          | Covers immediate gains and recovery after an initial loss on the independent sampled market path                                                                               |
+| pbrs-synthetic-fee-boundary-134               | pbrs        | Fee-boundary rounding is accepted while materially extreme PnL is rejected           | pbrs/test_pbrs.py::test_synthetic_high_fee_short_boundary_rejects_real_excess                      | Non-unit entry price exposes floating-point roundoff                                                                                                                           |
+| pbrs-synthetic-latent-price-135               | pbrs        | Clipped candidate PnL does not erase the sampled market path for later holds         | pbrs/test_pbrs.py::test_unrealized_pnl_retains_sampled_market_path_after_candidate_cap             | Equal first retained marks from distinct market prices diverge after the same adverse return                                                                                   |
 
 ### Non-Owning Smoke / Reference Checks