Story: Define the trade set model
Table of Contents
This page documents a story in Sprint 27. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
1. Goal
Lay the domain knowledge of grouping trades on one foundation. A trade set is the primitive: a well-defined set of trades. A trade group is the set a run of a process creates, a structure is the set that is also a product, and a link is neither. Batching, every process and every report then stands on a stated model rather than an assumed one.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent sprint | Sprint 27 |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing; the story is closed. |
| Last touched | 2026-10-08 |
3. Acceptance
- The grouping vocabulary is stated once, in one place: trade set, trade group, structure and link.
- A taxonomy diagram shows how the groupings relate to each other and to the constructs above them.
- Each document names what it excludes, so batching, the processes and the reports keep their own homes.
4. Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| Scaffold story: Define the trade set model | DONE | 2026-10-07 | 2026-10-08 | Story scaffolding rides this task: documents, sprint wiring, and the scaffold PR. Close it before merging that PR. |
| Write the trade set knowledge documents | DONE | 2026-10-07 | 2026-10-08 | Write the trade-set cluster: the primitive, its membership, the nesting test, the trade group and its run, the taxonomy diagram, and the rewiring of the documents that carried the old vocabulary. |
5. Decisions
5.1. A trade set is the primitive, and a trade group is the set a run creates
Taken 2026-10-08 with the owner.
A trade set is any well-defined set of trades, and a context defines it: a book, a counterparty, a portfolio, a netting set, a structure, a recorded selection, or an operation. Set is the general word. Group is not a second kind of thing; it is the case where the context is an operation. A trade group carries a foreign key to the run, the run is an instance of the process, and the process declares the roles. A structure is a trade set that is also a product, and a link is not a set at all.
Roles come at two levels and the process fixes both: the group's role in its run, and the trade's role in its group. A funding roll declares an input and an output group; a batch declares one group and gives its members no role. Input means what the run read and output what it wrote, so the two overlap: a partially terminated trade is in both.
The run's properties belong to the run, and the process declares which it has. A funding roll creates trades together and is undone as a whole. A batch changes no trade, so it has neither obligation.
Where sets nest, membership is part of the trade's identity and is a key on the trade. Where they do not, membership is rows in the group and the trade outlives it.