Repository navigation
Run continuous shared capital with settlement, FX and margin state - #32
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.
Summary
Continuous multi-strategy research now uses one exact QExec account with disjoint sleeve attribution. Explicit events cover fills/fees, cash and unit settlement holds, internal transfers, FX marks/conversions, outside flows, charges and linear-futures variation settlement. Every accepted event reconciles cash, positions, NAV and balanced journals; rejected events are atomic.
Native-currency futures losses are reserved directly from book cost, preventing base-FX reporting rounding from overstating buying power. Initial buying-power deficits and maintenance calls are separate. Losses remain visible, risk increases are blocked when underfunded, and explicit reductions/deposits/partial internal transfers may improve a deficit. Checkpoints bind full opening configuration and the accepted journal; mismatched or invalid restoration fails atomically. Existing APIs/schemas remain compatible. QDK is pinned to f85128307dd0e3407d24350282fe7b679b591309 (QDK PR #42).
Verification
Finite scope: long cash equities/ETFs and linear futures with declared notional-rate margin; fixed instrument ownership, no cross-sleeve offsets, inverse/options/short cash assets, automatic liquidation or broker execution. Synthetic tests do not establish market validity. No secrets or generated research artifacts are included. Roll back through revert while retaining historical results. Implements authorized batch item 4; no separate issue required.