OpenHedgeDocs
Menu

Part VII · Risk Management

Section 073

Orphan Positions

Every 5 minutes, rule R7 closes any position the book holds that its leaders no longer hold.

readmatchnoneexitEvery 5 minR7 timerLeaderpositionsRebuilt from venueCompare bookIs a leader stillholding?Orphan foundLeaders flat oroppositeCloseReduce-only IOC,recorded
Figure 73The R7 orphan check, every 5 minutes.

An orphan is a position the strategy book holds without a leader position that justifies it. Orphans can appear in several ways: an exit missed during a long disconnection, a fill that arrived after its order was reported complete, a leader closing and reopening faster than the executor could follow, or a fill that could not be attributed.

Rule R7 of the Resilient model runs every 5 minutes:

  1. Rebuild every leader's current position from the venue.
  2. For each coin the book holds, compute the position the model would hold given the leaders' current positions.
  3. If the leaders that justified the position are now flat, or hold the opposite side, the position is an orphan.
  4. Close the orphan with reduce-only IOC orders and record the cause.

Fills whose oid does not belong to any order the executor sent are flagged as foreign fills and alerted. They are never booked as the strategy's profit or loss without review.

R7 deliberately acts only when the leader side is flat or reversed. When a leader still holds the position at a different size, the normal proportional exit logic handles the difference on the next leader event, which avoids fighting the model with constant small adjustments.

© 2026 HedgeFund DAO · OpenHedgeNot investment advice. Trading leveraged perpetuals can lose all deposited funds.