Synchronizing Strategy Positions with Account Holdings
Summary
This document describes a position reconciliation process that compares a strategy’s intended direction and size with the account’s actual holdings. The intended position is read from stored records, while the account position and current market price are obtained through separate interfaces. When both sides have the same direction but different sizes, the process submits an order for the difference. When directions conflict, it first attempts to close the account’s existing position, then opens the strategy’s intended position if the close reports complete execution.
The logic also handles cases where one side is flat by opening or closing the relevant position. Orders use the current price adjusted by a configured overprice range, and the result is returned for logging or review. This provides a practical recovery mechanism for divergence between recorded strategy state and account state, but the document does not define how often reconciliation runs or how partial fills are subsequently handled. Its behavior depends on accurate stored positions, correct direction and quantity reporting, and the exchange interface’s execution receipts.
Key ideas
- The process compares the intended strategy position with actual account direction and quantity.
- When directions match but sizes differ, it trades the quantity gap.
- When directions conflict, it closes the existing account position before opening the intended one.
- A flat position on either side triggers orders to align account holdings with strategy state.
- Order prices are adjusted around the latest market price using a configured range.
- The method depends on accurate position records and does not fully specify handling after partial fills.
Tags
From a private course collection; the original is not published.