Implement the processes that act on sets of trades

Table of Contents

This page is a capture in the inbox bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.

1. What

The tree describes nine processes that act on a set of trades, and implements none of them. Implement them, one at a time, starting with a single pilot.

The processes, as Trade sets and trade groups names them:

Process What it does Roles of the trades Detail
Compression Replaces offsetting trades with fewer trades of the same net risk terminated, partially terminated, replacement Trade compression
Merge Combines several trades into one contributor, result, bridge Trade merge
Allocation Splits a block trade across the accounts it was dealt for block, allocation, bridge Trade allocation
Funding roll Rolls a book's currency balances to the next day generated Tom/Next
Sweep run Centralises residual balances generated Spot Sweep
Cleardown Resets book results at a period boundary generated Central remittance
Bulk book move Moves many trades to another book in one operation moved Book moves
Import Brings trades, market data and configuration into a sandbox created Sandbox

2. Why

Each of these is described in the domain notes and reachable from trade sets, groups and links, and several are named by a task that cannot be built without them. The tree can describe a compression and cannot perform one.

3. The enumeration has a home

ores_refdata_business_processes_tbl already exists and is empty. It is the reference table a process code belongs in, in the same way trade_link_types holds the reasons two trades are joined. Seeding it is the first step, and it is the enumeration the domain notes already carry.

4. Approach

Pilot one process end to end, then add the rest. The roll and the sweep are the better pilots than the compression, because both have a book in the tree that describes them and both run over a population rather than over a pair of trades.

Each process brings the same shape: an input set, an output set, the attributes of that kind of run in its own table, and a stamp on every trade amendment it generates.

5. References

6. See also

Emacs 29.3 (Org mode 9.6.15)