Trade blotter prototype
Table of Contents
| Item | Where |
|---|---|
| Prototype | the prototype |
| Gemini review | none |
| Signed off | the owner, 2026-10-29 |
| Group | Trades prototypes |
1. Summary
The arc built two screens: a blotter of trades and a list of structures with a page of its own. Neither can answer a question that spans them. "What does this book hold?" needs the trades and the structures, and "what have we done with this counterparty?" needs both again under a different order.
This prototype argues for one screen, as the owner shaped it on 2026-10-29: a portfolio tree on the left, the trade list beside it, and rows that are the top-level trades and the structures. A structure is one row and its legs are inside it, so a click opens the structure view; a trade that belongs to no structure opens the trade view. A flat option reads the same list as leaves.
The screens it replaces are the structure page and the structures list inside it. The trade view it opens is the trade list and page.
2. Detail
2.1. The tree, and where a structure sits
The tree is the portfolio: the party, its desks and their books, from the mock book table. A row's book is the book it was booked in. A structure has no book of its own, so it takes the book its legs share; when its legs span books it sits at the node that holds them all — the desk when they share one, the party when they do not — and the row says spans books. The investigation The book of a structure records why the rule is not enforced.
The mock data has both cases. PKG-0004, STR-0009 and STR-0007 sit in one
book each. STR-0010 spans EMEA-FX and EMEA-CREDIT through its inner package,
so it sits at the party and carries the chip.
2.2. The list
The rows are the top-level trades and the whole structures. A structure's legs are never rows of it: they are inside the structure. The row states the structure's kind, and the one chip it carries is spans books, when its legs are booked in more than one book. The columns are the identifier, what it is, the book, the counterparty, the trade date, the state and the external version, and a count of legs for a structure. A structure has no state and no external version, and the cells say so rather than borrowing one leg's.
2.3. Flat
Flat expands every structure into its legs, so every row is a trade and the
structure a leg belongs to becomes a column of its own. The flat list is what a
reader uses to see risk trade by trade; it loses the commercial unit, which is why
it is an option and not the default.
2.4. Perspectives
The toolbar holds three: Portfolio, Counterparty and Asset class. The first is the default and the one that ships first. A perspective is a topology over the same rows and not a different read: the rail changes, the rows narrow, and the columns stay the ones a trade has. The task Merge the trades and structures screens carries the exploration of the word itself.
2.5. States
| Query | What it shows |
|---|---|
| (none) | The portfolio tree, with the party open and every row under it |
?flat=1 |
The same list as leaves, one row per trade, with the structure in its own column |
?view=counterparty& |
The counterparty topology: one counterparty at a time |
?view=counterparty&sel=MRDN |
One counterparty's rows, which at the top level is the structure it is party to |
?view=instrument& |
The asset-class topology: one family at a time |
?view=instrument&sel=fx |
Every FX row, with the structures that mix families listed under each family they touch |
?sel=EMEA-FX |
One book's rows, in the portfolio perspective |
3. What is fake
Every number and row is the shared mock data of the prototypes; nothing is read from a server. A row's link opens the trade page or the structure page prototype rather than a record page of this screen. Paging is stated and not drawn: the list is one page of 32 top-level rows, which is small enough to show whole. The "spans books" chip is real for the mock data and would be computed from the legs in the product.
4. Where the code lives
doc/prototypes/trades/blotter/.
5. See also
- Merge the trades and structures screens — the task this prototype answers to.
- The book of a structure — why a spanning structure is not refused.
- Trade Blotter — the grid's columns and its structure view.
- Trade Structures and Deal Composition — the composition ladder and the row kinds.
- Trade journeys