Repository navigation
feat(research): distinguish win rate, payoff and Profit Factor - #668
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.
The unified research report has growth/risk/inference metrics but does not expose win rate, mean payoff, Profit Factor or arithmetic net expectancy. Existing window
win_rateandprofit_factordescribe daily returns; Profit Factor is not average payoff, and neither is a closed-trade statistic.Add four optional, descriptive net period-return diagnostics via
include_outcome_diagnostics=True: excluding-zero win rate, mean gain/loss payoff, aggregate gain/loss Profit Factor and sample mean net return. Report positive/negative/zero counts and explicit observation-level semantics. Undefined one-sided samples and unrepresentable values retain UNCOMPUTABLE/null; genuine exact zero remains known. Default output preserves the original eight results. No trade pairing is inferred.Add a linked bilingual metric catalog describing return/benchmark, risk-adjusted return, drawdown/tails, outcomes, statistical reliability, cost/execution, portfolio/capacity and operations/source evidence, with actual capability and missing-input boundaries. Clarify payoff versus Profit Factor in the existing window/backtest docs. No new pass/fail thresholds, ranking roles or permissions are introduced.
Validation: 13 analytic synthetic regressions pass; original unified-report and lifecycle golden tests pass (50 focused cases). Independent review found and reproduced nonzero float underflow being reported as zero; corrected and rechecked, with eight base/default compatibility scenarios unchanged. CONTRIBUTING full unittest completed 1366 cases / one existing skip. Local first-run failures were missing the existing required monitor source-revision environment; reproduced on the unmodified base and resolved by binding the real checked-out base SHA, without test/source weakening. Ruff, whitespace and document links pass. Final head aab4083 passed CI38356900706: 2563 passed / 2 existing skipped / 1013 subtests passed, Ruff and constraint-ref checks passed. Normal merge b23511c has the identical reviewed tree bdd500aca5033cb800335e5445ad7282e6d696b1; no branch protection bypass. Main automatic CI is tracked separately.
Refs QuantStrategyLab/QuantRuntimeSettings#659 and QuantStrategyLab/QuantInternalOps#3. Closed-trade metrics, actual costs/source attestation, drawdown recovery/capacity/live execution projections and consumer adoption remain separate. No production pin, sizing, gate, strategy trial/ledger, posterior model, account, budget, live order or notification is changed.