Repository navigation
Rank sort_by="ruined" survivors first, as documented - #161
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #160
Summary
"ruined"is now in_ASCENDINGinkeeks/comparison.py, sosort_by="ruined"ranks survivors (False) before ruined policies (True) in bothcompare_strategiesandcompare_multi_outcome_strategies(they share_rank). Thecompare_strategiesdocstring already said "max_drawdownandruinedrank smaller first", so no docs changed. The multi-outcome function reuses the same sort-key contract.Changelog:
CHANGELOG.mdhas no unreleased section (v0.9.0 is already tagged), so I left it alone.Verification
pytest tests/test_comparison.py tests/test_compare_multi_outcome.py: 68 passed."ruined"from_ASCENDINGfails both new tests (2 failed, 66 passed). Restored and re-ran green.tests/test_bit_exactness.pygolden-fixture failures that already fail on master here (CPython 3.13 / NumPy 2.5.3) and are unrelated to this change.ruff checkandruff format --checkpass.Screenshots
n/a — no user-visible change.