Story: Rework the credit instruments to the instrument table rule
Table of Contents
This page documents a story in Sprint 27, promoted from the product backlog's next bucket where it was scaffolded on 2026-10-02. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
1. Goal
Rework the credit trade types and the risk participation agreement to the instrument table rule of the trade shape investigation (section 14), as the bonds were reworked, with the data-oriented review deciding the tables.
2. Status
3. Acceptance
- The family header's trade_type check lists exactly the family's codes, and each product fact table checks its own.
- Every instrument row is keyed by its trade and pinned to the anchor's trade type and party by a composite foreign key.
- The family's trade types route to their tables through the trade-type catalogue, not hand-written code.
- The ORE round trip stays lossless across the family's corpus, and a money value is stored and exported as the digits the document wrote.
- The credit family's dates are mapped into the blotter's common-date view.
- The family's tables have a generated eventing integration test.
RiskParticipationAgreementroutes, imports and exports through the credit family, with no table left that nothing writes.
4. Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| Analyse the credit family and propose its relational data model | DONE | 2026-10-11 | 2026-10-11 | Credit is the third family after the bond pilot and the rates rework. Survey every credit-related type and subtype in the tree (modeling orgs, SQL, domain C++, mappers, repositories, services, messaging, the ores.ore mapping), then propose the entity-relationship model in the clean data-oriented shape, taking in the risk participation agreement the rates rework left for credit. (Staging unit 1.) |
| Carry the credit digits | DONE | 2026-10-11 | 2026-10-11 | The credit money members, the upfront fee and the option strike, are bare floats in the ORE binding, so the mapper reads them through a double. Make them lexical leaves through the reapply script. Classify every credit numeric column as money or continuous, and make the tranche columns agree with their domain type. (Staging unit 2.) |
| Retire the unproduced rpa_instruments table | DONE | 2026-10-11 | 2026-10-11 | RiskParticipationAgreement routes to credit_instrument, so nothing writes ores_trading_rpa_instruments_tbl and nothing reads it. Remove the table, its model and every generated file named for it, including the shell commands and their tests. (Staging unit 3.) |
| Write the credit legs and the basket | DONE | 2026-10-11 | 2026-10-12 | A credit swap's premium leg and a credit linked swap's payment groups are rows of the shared swap leg tables, told apart by a new leg_group column. The names of a basket get a new child table. (Staging unit 4.) |
| Author the credit family header and its fact tables | DONE | 2026-10-12 | 2026-10-12 | Replace the 25-column credit table with a header holding the reference entity and the two dates, and six product fact tables keyed by the trade. Remove the two importer-less codes from the routing. (Staging unit 5.) |
| Close the credit round trip | DONE | 2026-10-12 | 2026-10-13 | Every credit product drops elements of the schema. Store the accrual and payment flags, the upfront date and fee, the cash settlement days, the index option's own elements and its option block, and export them. The agreement follows in unit 7. (Staging unit 6.) |
| Map the credit dates into the common-date view | DONE | 2026-10-13 | 2026-10-13 | Unit 5 declared the credit header's dates and generated the family's eventing tests. Prove the view: a probe reads one date column across a rates trade and a credit trade. (Staging unit 8.) |
| Close the risk participation agreement round trip | DONE | 2026-10-13 | 2026-10-13 | The agreement's export omits its required ParticipationRate, ProtectionFee and Underlying, so it is not valid ORE. The protection fee is a list of legs and the underlying holds legs, an optional option and an optional treasury lock on a bond. Store and export them. (Staging unit 7.) |
5. Decisions
The remainder is carried in Prove the credit round trip over the corpus.
Distilled from design.org, which carries the argument and the evidence.
- The family header holds the reference entity and the two dates. The six products share nothing else, and a header column must hold for every code.
- Credit reuses the swap leg tables, told apart by a nullable
leg_groupcolumn. The legs are keyed by the trade, so a second leg table would repeat the first. - The two codes with no importer leave the routing. The catalogue rule is that a type with no writer has no table.
- The agreement's facts get a table of their own. Its participation rate is
required by the schema and belongs to no other product. Its protection fee is
a list of legs and its underlying holds legs and an option block, so those are
rows of the shared leg and option tables, told apart by
leg_group. - A trade holds one option block. The agreement has no option of its own and the index option has no underlying, so no group or role column is needed on the option table.
- A column lands when a mapper writes it. The fact tables began with the columns the mappers wrote and grew with their writers.
- Every money column is an exact decimal, and a continuous quantity is a binary float. A float column stores an artifact of a money value. The recovery rate, the tranche points and the participation rate are continuous quantities, and each column agrees with its domain type.
6. Documents
| Document | What it is |
|---|---|
design.org |
The design: the inventory, the findings and the proposed model. Transitional; expires when this story lands. |
design_er.puml, design_er.png |
The proposed model's entity-relationship diagram. |
7. Out of scope
- The
CBOproduct and aCreditDefaultSwapOptionimporter. - The agreement's treasury lock underlying.