Story: Classification catalogs as data

Table of Contents

This page documents a story in Sprint 25. It captures the goal, current status, acceptance criteria, and the tasks that compose it.

1. Goal

The asset class and series subclass classification vocabularies become refdata catalogs that the database owns. The C++ enums that mirrored them are deleted. Every consumer reads the codes and their display names from the catalog tables. Code never duplicates a vocabulary that a table already holds.

2. Status

Field Value
State DONE
Parent sprint Sprint 25
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-09-17

3. Acceptance

  • refdata.asset_class_code holds the seven-class taxonomy from the analysis (interest_rates, inflation, fx, equity, commodity, credit, bond); rates is renamed and cross_asset is gone.
  • A new refdata.series_subclass_code catalog exists end to end: table, create/drop/populate SQL, domain types, repository, service, protocol, registrar, history mapper, and Qt client.
  • The ores.marketdata C++ enums asset_class and series_subclass are deleted; consumers carry the code string and read labels from the catalog.
  • Foreign keys from market data, and from trading where it is ready, reference the catalogs.
  • Full local build clean and the full ctest suite green.
  • Codegen drift stays at zero for both components; entity regeneration reproduces the checked-in output byte for byte.

4. Tasks

Task State Start End Description
Move classification into refdata catalogs DONE 2026-09-17 2026-09-17 Delete the ores.marketdata asset_class and series_subclass C++ enums, carry the codes as data end to end, and add the series_subclass_code refdata catalog the taxonomy needs.

5. Decisions

  • Classification is data, not code. The database owns the vocabularies. No C++ enum mirrors a catalog that a table already holds. This rejects the earlier compile-time exhaustiveness approach in favour of existence-based processing: the code carries the code string and reads labels from the table.
  • The taxonomy authority is doc/knowledge/domain/asset_classes.org, now a flat seven-class list. rates becomes interest_rates; cross_asset is dropped and its instruments are reclassified.
  • series_subclass_code lives in refdata, not in marketdata, because it is a shared vocabulary.

6. Out of scope

  • ores.trading classification changes. A separate workstream owns those, and the trading model is being reshaped at the same time.
  • The market data values themselves (quotes, fixings, curves). Only their classification is in scope.

Emacs 29.3 (Org mode 9.6.15)