Positions, Not Stock Levels: What Changes When the Operator Is the Counterparty
An operator who buys and sells on their own book is not an intermediary moving other people's goods. What they hold is exposure, and exposure is not a quantity. A warehouse model tracking units in and units out loses the exposure view entirely, and turns a reallocation into an untraceable edit to two numbers. Modelling positions explicitly, with allocation and reallocation recorded as transitions, lets the book explain itself.
Positions, Not Stock Levels: What Changes When the Operator Is the Counterparty
The short answer. If the operator takes the other side of the trade rather than connecting two parties, they are carrying exposure on their own book, and exposure is not a stock level. A warehouse model records quantities in and quantities out, and from those quantities the exposure view cannot be recovered, because the price at which each unit was acquired, the commitment it was bought against and the direction of the risk were never stored. The same model turns a reallocation into an update to two numbers with no record of why, so the book cannot explain itself. Modelling positions explicitly, with allocation and reallocation as recorded transitions, keeps both the exposure and the explanation.
The system brief said inventory. Quantities by product, quantities by location, goods in, goods out, a stock level per line. A well-understood problem with a well-understood schema, and the first version of it works.
Then a question comes from the commercial side. What is our net exposure on this product if the price moves. The system cannot answer, not because the query is hard but because the information required was never captured.
Principal and intermediary are different businesses
The distinction that decides the data model is whether the operator is a principal or an agent.
An agent introduces a buyer to a seller and takes a fee. The goods pass through, the agent never owns them, and their risk is credit and operational rather than price. For an agent, quantities are close to sufficient. Units arrived, units left, a fee was earned on each movement.
A principal buys from the seller on their own account and sells to the buyer on their own account. Between those two events they own the thing and are exposed to what happens to its price. Bought and not yet sold, they are long. Sold forward and not yet bought, they are short. Their economics are the spread between the two prices, and their risk is that the second price moves against them before they get to it.
The two businesses can look identical from outside. Same counterparties, same goods, same warehouse, same paperwork. What differs is where the price risk sits, and price risk is invisible in a quantity.
The practical tell in a requirements conversation is the word "margin". If somebody describes the business as earning a margin on the spread rather than a fee on the movement, the operator is a principal and the system needs positions.
What a quantity cannot tell you
A stock level is one number per product and location. Here is what it has discarded.
The price each unit was acquired at. Without a cost basis there is no profit on a sale, only a price. A warehouse model can tell you that forty units left at a given price. It cannot tell you whether that was a good trade, because the figure it was bought at is not attached to anything.
The direction of the exposure. A stock level of zero can mean no exposure at all, or a long and a short that happen to cancel in units while carrying different prices and dates. Those situations have different economics and the stock level renders them identical.
The commitment the units were bought against. Principals buy to cover specific obligations. A quantity in a warehouse is anonymous, so the link between what was acquired and what it was for is lost at receipt.
The tenor. When the obligation falls due changes the risk. A long position against a sale next week and the same long against a sale next quarter are not the same exposure, and neither is a quantity.
Who the counterparty is. Credit exposure is per counterparty and does not aggregate by product.
So the exposure view is not a missing report. It is a report that cannot be produced from the stored data at any cost, which no amount of query work resolves.
Reallocation is where the model fails visibly
Everything above is a quiet loss. Reallocation is the loud one, and it is usually what prompts someone to call.
A principal has allocated a parcel of product to one obligation. Then something changes. A buyer defers, a vessel is late, a better price appears, a higher-priority commitment needs covering. The parcel moves from one obligation to the other.
In the warehouse model that is two updates. Decrement the quantity committed against obligation A, increment the quantity against obligation B. Both rows end up correct and the operation leaves no trace.
Consider what has been lost. There is no record that a reallocation happened, so both obligations look as though they were always covered the way they currently are. There is no record of who did it, when, or why, so nobody can review the decision later. The cost basis does not travel with the parcel, because the warehouse model never had one, so profit attributed to obligation B is computed against whatever basis that obligation happens to assume. And if the reallocation was a mistake, reversing it means two more updates against remembered figures.
This is the same failure as a mutable balance column, and in a trading book the consequences are larger, because the numbers feed profit attribution and risk limits.
Model the position
The change is to make the position a first-class record and every change to it a recorded transition.
A position has an identity, a product, a direction, a quantity, an acquisition price, an acquisition date, a counterparty, and the obligation it is currently allocated to, which may be nothing. It is not a row that gets updated in place. It is a record whose current shape is derived from the transitions applied to it.
The transitions are the vocabulary of the business, and writing them down is most of the design work. Acquired, which creates the position with its price and counterparty. Allocated, which binds it to an obligation. Reallocated, which names the obligation it moved from, the one it moved to, the actor and the reason. Partially allocated, where a parcel is split, which creates child positions carrying the parent's basis in proportion. Delivered, which discharges it against an obligation. Closed, where an offsetting trade removes the exposure. Written down or adjusted, where a quantity or quality claim changes the economics.
Each transition is appended. Nothing is overwritten. The current book is a fold over those transitions, and so is the exposure view, and so is profit attribution.
Three things become available that were not before.
Net exposure by product, direction and tenor, computed by summing open positions rather than by inspecting a stock level. Longs and shorts stay distinct because direction is stored rather than inferred from a sign on a quantity that also means something else.
Profit attributed to the right place. Each position carries its own basis, so a delivery produces a figure that is the difference between two known prices rather than between a price and an assumption. When a parcel is split, the basis splits with it by an explicit rule, and the rule is recorded with the split.
An explanation. Asked why a given obligation is covered the way it is, the answer is the sequence of transitions that got it there, including the reallocation that moved a parcel across in response to a specific event. Asked what the book looked like at the end of last month, the answer is the same fold stopped at a date.
Two costs worth stating
The schema is bigger and the queries are longer. A stock level is one lookup. A position book is an aggregate over transitions, and on a book of any size it needs the same treatment as any other derived figure: a periodic snapshot that bounds the read, written only by the derivation and checked by a job that rebuilds and compares.
The transition vocabulary also has to be elicited before it can be modelled. That is a conversation with the commercial team about what they actually do to the book, and it surfaces operations nobody wrote down, usually because a spreadsheet handles them. Those are exactly the operations worth modelling, and finding them is slower than accepting the word inventory.
The honest limit
Positions are not a risk system. A position book tells you what you hold and how you came to hold it. It does not value the exposure, which needs a price source and a mark-to-market policy, and it does not say whether the exposure is acceptable, which needs limits and somebody accountable for setting them. Teams sometimes read a position model as having solved risk management. It has supplied the input to it.
There is also a real case for the warehouse model, and it is not rare. Plenty of operators genuinely are intermediaries, and plenty of principals hold goods so briefly, or match them so tightly against a prior sale, that exposure is not a question they need answered. A position ledger for those operators is cost without return, which is why the margin question comes before the model.
The migration case is the awkward one. An operator running a warehouse model who now needs positions has history containing quantities and no prices, so the book can only be reconstructed from the date positions were introduced. Earlier history becomes an opening set of positions with an assumed basis, unexplainable by construction. That is survivable and worth stating rather than glossing over, because the first question anybody asks of a new position book is what the figures looked like last year.
FAQ
What makes an operator a principal rather than an intermediary? Whether they take the other side of the trade on their own account. An agent introduces buyer to seller and earns a fee on the movement, so their risk is credit and operational. A principal buys on their own book and sells on their own book, owns the goods in between, and is exposed to the price moving against them. The tell in conversation is whether the business describes itself as earning a margin on a spread or a fee on a movement.
Why can exposure not be derived from stock levels? Because the information needed to compute it was never stored. A quantity has no acquisition price, so there is no cost basis and therefore no profit on a sale. It has no direction, so a long and a short that cancel in units look identical to no exposure at all. It has no tenor and no counterparty, so neither the timing of the risk nor the credit concentration can be recovered. This is not a missing report, it is an unanswerable query.
What specifically goes wrong when a parcel is reallocated? In a quantity model it is two updates, one decrement and one increment, and both rows end up looking correct. There is no record that the reallocation happened, who did it, when, or why. The cost basis does not travel with the parcel because it was never attached, so profit on the receiving obligation is computed against an assumption. Reversing a mistaken reallocation means two more updates against remembered figures.
What does modelling a position explicitly involve? A record with identity, product, direction, quantity, acquisition price and date, counterparty and current allocation, whose state is derived from appended transitions rather than updated in place. The transitions are the business vocabulary: acquired, allocated, reallocated with a reason and an actor, split with a basis-apportionment rule, delivered, closed, adjusted. Eliciting that vocabulary is most of the design work.
Does a position ledger make the book slow to read? It makes the naive read slower, because the current book is an aggregate over transitions rather than a lookup. The remedy is the same as for any derived figure: a periodic snapshot that bounds the read, written only by the derivation itself, with a scheduled job that rebuilds from transitions and alerts on any difference. A snapshot that other code can write has become a stock level again.
Is a position model always the right choice? No. Operators who really are intermediaries, and principals who match goods so tightly against a prior sale that exposure is never a question, get no return from it. The right move is to ask whether the business earns a margin on a spread before assuming the heavier model. A position ledger built for an agent is cost without benefit.
The five signs that a failure is in the seams, then one register per boundary covering units, ranges, timing, retry ownership and partial-success behaviour. Filled in separately by both sides, which is the whole method.
Tell us the system, the stakes, and the date that matters. You get a straight technical reply from the person who would lead the work, within 24 hours.
Bring us the program