The operator is the counterparty to its suppliers and its buyers, not an intermediary between them. What it has agreed to buy and what it has agreed to sell are positions it carries, and every quote adds to its own exposure. Material has to be allocated to sales and moved between them correctly, because a reallocation changes which sale is covered, which margin is earned and which commitment is still open. It moves real risk, not a number between two columns.
A position is what you stand to gain or lose, and the warehouse cannot tell you what it is.
Inventory answers a physical question: what is in the yard today. A position answers a financial one: if prices move tomorrow, how much does the business gain or lose. The two can be very different. A trader who has agreed to buy material that has not yet been delivered has an empty yard and a real position. A trader whose yard is full, but every load in it already sold at an agreed price, has plenty of inventory and almost no exposure to the market.
Traders describe this as being long or short. Long means the business has committed to buy more than it has committed to sell, so it loses money if prices fall. Short means it has committed to sell more than it has bought, so it loses if prices rise. The net position adds up every commitment, bought and sold, delivered or not yet delivered. For a principal, who buys and sells in its own name, that net figure is the risk the business is carrying at any given moment.
Allocation is the act of deciding which supply fills which demand: this purchase will be delivered against that sale. It decides the margin on each sale, which deliveries are covered, and which commitments are still open. Reallocation, moving material from one sale to another, is common and legitimate, because loads arrive late or turn out to be a different grade from the one expected. Every reallocation changes the shape of the book. If it is not recorded as an event of its own, the book can no longer explain how it came to look the way it does.
This is position mathematics with allocation as an operation in its own right. Counting what is in the yard answers a different question. Reallocation has to be consistent and auditable, because it changes what the operator is exposed to. A warehouse model loses the exposure view entirely and turns every reallocation into an edit to a quantity that nobody can reconstruct afterwards.
Stock systems lose the exposure first and the history second.
Teams building tools for physical traders often reach for an inventory model, because the quantities look the same: material in, material out. The exposure view then has to be assembled by hand, usually in a spreadsheet that reads contracts from one place and stock from another. It is out of date the moment it is finished, and it is the number the trader is actually managing.
The history goes next. Reallocation in a stock system is an edit to two quantities. After a few of them, nobody can say which purchase backs which sale, or why the margin on a particular sale changed last week. And when two people reallocate the same material at the same moment, both edits succeed, and the same load is promised to two buyers.
The reflex, and the fix.
Track stock levels like a warehouse
It is the familiar model, and the quantities being tracked look the same.
It loses the exposure view, and reallocation becomes an edit to a quantity with no record of the move, so the book cannot explain how it reached its current state.
Model positions and allocations explicitly
A position ledger and an allocation engine to design, in place of a quantity column to update.
Net exposure the trader can see directly, and reallocation as a recorded, consistent transition that can be reconstructed at any later date.
Model the exposure, because exposure is what the operator actually carries. The quantity on the ground follows from it.
A position ledger, not a stock count
Supply and demand are recorded as positions, so the book answers what the operator is exposed to. What is physically held is one input to that, and no longer the whole answer.
Allocation as an operation with its own record
Matching material to demand is an explicit operation, written down when it happens. It is never a side effect of editing two numbers.
Reallocation as a recorded transition
Moving material from one sale to another is written down with consistency guarantees, because it moves exposure and has to be reconstructable after the fact. Two people reallocating the same material at once is flagged, never silently allowed.
Net exposure projected for the trader
The trader's workspace shows the net position derived from the book. The number the trader acts on comes from the same record as everything else, so the screen and the book cannot disagree.
What each choice cost, and what it bought.
ARecording positions instead of stock levels
Stock levels are what everyone already understands, and a quantity column is quick to build. A position ledger asked more of the design, because it has to hold commitments that have not been delivered and distinguish what was bought from what was sold. It made the book answer the question the trader actually asks, which is what the business stands to lose, and it made the warehouse count one input among several.
BGiving allocation its own record
Allocation could have been modelled as a field on a sale pointing to a purchase. Making it an operation with its own record cost an extra concept in the system. It meant every allocation has a time, an author and a reason, and the history of which material backed which sale can be read straight from the book.
CGuarding reallocation against concurrency
Most of the time only one person touches a given load, so it is easy to treat concurrent reallocation as an edge case. It is the edge case that creates a short delivery to a real buyer. Enforcing consistency at the point where a reallocation is written, and flagging the conflicting attempt, costs some throughput in the rare busy moment. It guarantees a load is never promised twice.
DProjecting exposure from the book
The trader's screen could have computed exposure its own way, tuned for speed. Deriving it from the same ledger as everything else means the screen is only as fast as that derivation allows. It also means the number the trader acts on is the number the books hold, so the end-of-day reconciliation between screen and record does not exist.
- Load allocated to a salerecorded as its own operation
- Load arrives late or off gradethe original sale can no longer be filled by it
- Reallocation written as an eventwith consistency checks against concurrent moves
- Net exposure re-derivedthe trader's view updates from the same book
- History explains the bookevery move, its time and its reason
A single headline number hides where a system fails. This work was scored on the dimensions that actually decide whether it holds in production, measured on real, held-out cases rather than the demo path.
No measured figures are published for this engagement. Outcomes are described qualitatively.
A warehouse-style stock count where reallocation is an edit, the exposure view is assembled by hand in a spreadsheet, and nobody can reconstruct why the book says what it says.
An explicit position ledger with allocation and reallocation as recorded, consistent transitions, and net exposure projected for the trader from that same record.
What it owns, and what it hands to a person.
The book reflects what has been entered into it. A position taken outside the platform, such as a side agreement made directly with a buyer, is invisible to it until someone records it, and no amount of internal consistency changes that. A ledger can be perfectly coherent and still incomplete.
Principal-side trading, and any stock that carries exposure as well as quantity, wants the same shape: model positions explicitly, make reallocation a recorded transition, and project net exposure from the ledger. Airline seat inventory, energy supply contracts and reinsurance books all work this way.
Inventory is what is physically held. A position is what a price move would cost. A business can have lots of one and none of the other.
Long means committed to buy more than sold, and exposed to falling prices. Short means the reverse. The net of all commitments is the risk being carried.
Allocation decides which supply fills which demand, and every reallocation changes margin and exposure. Record it as an event, never as an edit.
Checking availability when reading does not protect against two people writing at once. Enforce the constraint where the write happens.
A ledger can be internally consistent and still miss the commitments made outside it. Completeness is a process question as much as a software one.