Skip to content

promotion: check_floors' blocking reasons print win_rate 0.0 / rr_r 0 where the sample has no trades or no wins #980

Closed

Description

@eaitbrahim

Found while reviewing PR #975 (round 2, O1). PR #963's gatekeeper had held it as H-R4-1. It predates #975.

What happens. The track record now reads unknown wherever a figure has no sample behind it: the Rules view shows "—", and keel insights summary prints n/a. But the gate's blocking reasons are promotion.check_floors' own text, copied verbatim onto the Rules gate card and into the CLI gate block, and they still print the engine's zeros:

  • At n=0: - win_rate 0.0 < min_win_rate 0.3, right beside a record line that reads win_rate=n/a.
  • On an all-losses rule: - rr_r 0 < min_rr 1.5 (in R), right beside rr=n/a (no wins yet).

Fix (engine wording only, verdicts unchanged).

  • At n=0, check_floors already emits "no R: … refusing rather than passing". It could say the win rate is unknown at zero trades instead of win_rate 0.0.
  • With no wins, it could word the R:R reason as "no winning trade" instead of rr_r 0.
  • passing and the number of reasons must stay the same. Pin that with a verdict-equality test before rewording.

keel/strategy/promotion.py decides promotion, so this needs its own careful change, not a display patch.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions