Docs / Concepts / Execution and portfolio
RealPositions and portfolio
Positions and profit and loss derived from fills only.
Rule
Each instrument has one net position. A position is never edited directly; it changes only through fills.
Profit and loss
Closing quantity is matched against open lots first in, first out, so realised profit and loss is exact integer arithmetic. Commissions are tracked separately. Unrealised profit and loss is marked at the side the position would close on.
Planned
Margin accounts, per-venue fee models beyond a basis-point commission, and exposure across venues.