fix(soxl): include cash turnover and count real return intervals - #487
Merged
Conversation
Co-Authored-By: Codex <noreply@openai.com>
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 SOXL stateful replay recorded real USD cash but omitted that cash leg from half-L1 turnover, understating costs when entering or changing a cash reserve. Include cash in the existing 5/10/15-bps cost calculation. The evidence summary also appended an already-recorded terminal NAV, creating a fictitious zero-return interval; calculate statistics from the actual sessions and reject inconsistent initial/terminal NAV or execution counts.
Keep the frozen candidate configuration, UES/QPK source bindings, and next-session execution timing. Existing V3/V7 consumers share these corrected formulas, but this change does not rerun or overwrite historical evidence or authorize new promotion or trading. Prior performance comparisons require an explicitly scoped recomputation before reuse.
Validation: the original code failed 14 of 15 targeted cases (the all-flat control passed). All 46 related replay, summary, V3/V7, forward-confirmation and long-horizon observation tests pass, including actual replay-to-summary integration with synthetic strategy decisions; Ruff 0.15.9 on the four changed files and git diff --check pass. One bounded independent review found no specific P1/P2 issue. No real inputs, providers, model calls, workflow dispatches, or account actions were used for this patch.