Story: CDM instrument domain models
Table of Contents
This page documents a story in Sprint 15. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
Goal
Lay down the CDM-inspired instrument domain model in four phases: rates, FX, credit, bond. Each phase is a full vertical slice (SQL, domain, repo, service, Qt UI).
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent sprint | Sprint 15 |
| Now | Completed 2026-03-30. |
| Waiting on | None. |
| Next | None. |
| Last touched | 2026-03-30 |
Continued in: Per-type instrument tables (sprint 16). Sprint 15's four CDM instrument models lived on a shared instruments table; sprint 16 replaces it with per-type tables for rates / FX / equity.
Acceptance
- Rates: Swap, CrossCurrencySwap, CapFloor, Swaption (instruments + swap_legs tables).
- FX: FxForward, FxSwap, FxOption (fx_instruments table).
- Bond: Bond, ForwardBond, CallableBond, ConvertibleBond, BondRepo (bond_instruments table).
- Credit: CDS, CDSIndex, SyntheticCDO (credit_instruments table).
- All four with domain + repo + service + Qt UI (Model + MDI + Detail + History + Controller).
Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| CDM Phase 1: Rates instrument domain model | DONE | 2026-05-20 | 2026-03-26 | Rates instruments: Swap, CrossCurrencySwap, CapFloor, Swaption. SQL: ores_trading_instruments_tbl + ores_trading_swap_legs_tbl + notify triggers + drop files. Domain: instrument + swap_leg structs with JSON I/O + table I/O + generator + protocol. Repository + service layer. Qt UI: ClientInstrumentModel + InstrumentMdiWindow + InstrumentDetailDialog + InstrumentHistoryDialog + InstrumentController. |
| CDM Phase 2: FX instrument domain model | DONE | 2026-05-20 | 2026-03-27 | FX instruments: FxForward, FxSwap, FxOption. SQL: ores_trading_fx_instruments_tbl (bought/sold currencies + amounts, value_date, settlement, option fields). Domain + repo + service + Qt UI (Model + MDI + Detail + History + Controller). |
| CDM Phase 4: Credit instrument domain model | DONE | 2026-05-20 | 2026-03-28 | Credit instruments: CreditDefaultSwap, CDSIndex, SyntheticCDO. SQL: ores_trading_credit_instruments_tbl (reference_entity, currency, notional, spread, recovery_rate, tenor, dates, day_count, payment_frequency, optional fields for index + seniority + restructuring). Domain + repo + service + Qt UI. |
| CDM Phase 3: Bond instrument domain model | DONE | 2026-05-20 | 2026-03-30 | Bond instruments: Bond, ForwardBond, CallableBond, ConvertibleBond, BondRepo. SQL: ores_trading_bond_instruments_tbl (issuer, currency, face_value, coupon_rate + frequency, day_count, issue_date, maturity_date, optional fields for settlement_days, call_date, conversion_ratio). Domain + repo + service + Qt UI. |
Decisions
- CDM-inspired
- industry-standard shape; we re-use the modelling language without taking on the full reference data set.
- Four phases, one table per asset class
- lets phases land independently and keeps the migration story per-table.
- CLI commands deferred
- the four Qt UIs are sufficient for sprint 15's purposes; CLI follow-up to come.
Out of scope
- Equity + commodity instruments (future phases).
- Instrument CLI commands (deferred follow-up).
- Database recreate as a deployment step (deferred follow-up).
See also
None.