Skip to content

sim report: Avg win (R) / Avg loss (R) print a measured-looking 0.000 for an empty side #1004

Closed

Description

@eaitbrahim

Found while fixing #1000 (PR #1003).

keel/sim/report.py edge table renders avg_win_r / avg_loss_r through _r_cell. stats._r_aggregates writes 0 for an empty side of the R sample (field comment: "0 when the R sample has none of that side, the money fields' convention"), so an all-losses row prints Avg win (R) = 0.000 and an all-wins row prints Avg loss (R) = 0.000, both of which read as measured values.

Since #965 the track record uses None for these (_side_average, decided by counting). The edge table could do the same thing, with n_wins_r / n_losses_r deciding whether a side is empty. It could print a bare n/a or reuse _empty_side's no wins yet / no losses yet through undefined_reading. The engine values stay unchanged (pool_stats multiplies by them).

#1000 was limited to the profit factor, as its issue body asked.

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