test(margin): update qty_step nibble expectation for floor-before-4x (KI-31)#74
Merged
Merged
Conversation
…(KI-31) test_short_margin_call_qty_step asserted the old floor-AFTER value (first forced lot 3.5 = floor(4*shortfall/step)*step). PR #73 corrected the engine to floor the restore qty to the lot step BEFORE the 4x over-liquidation (matching TradingView, 19/19 alpha-wizard nibbles bit-exact). The synthetic scenario's first lot is now 4*floor(0.95238095/0.5)*0.5 = 4*0.5 = 2.0 (still an exact step multiple, still <= the 3.80952381 unquantized cap). Test-only; ctest 79/79. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
Fixes the CI failure introduced by #73.
test_short_margin_call_qty_stepasserted the old floor-after value (3.5); the engine now floors the restore qty to the lot step before the 4x over-liquidation (TV-validated, 19/19 alpha-wizard nibbles bit-exact), so the synthetic first lot is4*floor(0.95238/0.5)*0.5 = 2.0. Test-only; ctest 79/79 locally with freshly-built binaries.🤖 Generated with Claude Code