ores.refdata.derivation_kind
Table of Contents
Reference data table defining the valid market_series.derivation_kind
values: the sentinel OBSERVED (the default case – a directly
published tick, no derivation involved) plus a named value per
derivation mechanism (IR_CURVE_BOOTSTRAP, CRM_DERIVATION, …).
OBSERVED exists so market_series.derivation_kind can stay a
required, FK-validated column rather than nullable free text, the same
pattern curve_role.NONE already establishes for
instrument_code.curve_role. Deliberately generic and not
curve-specific: a market_series row whose derivation_kind <>
'OBSERVED' carries a derivation_config_id=/=derivation_config_version
pointing at the recipe that produced it (the bootstrap config for
IR_CURVE_BOOTSTRAP, the CRM topology config for CRM_DERIVATION),
letting any published point answer "was this observed or computed, and
by what" without guessing from the source string. Managed by the
system tenant, like other refdata code tables.
1. Flags
2. Columns
2.1. code
Unique derivation kind code.
Examples: 'OBSERVED', 'IR_CURVE_BOOTSTRAP', 'CRM_DERIVATION'.
std::string("DerivationKind")
2.2. name
Human-readable name for the derivation kind.
std::string(faker::word::adjective()) + " Derivation"
2.3. description
Detailed description of the derivation kind.
std::string(faker::lorem::sentence())
2.4. display_order
Order for UI display purposes.
faker::number::integer(1, 100)
3. SQL
3.1. Flags
3.2. Extra drops
drop function if exists ores_refdata_validate_derivation_kind_fn;
4. Validation function
5. Insert trigger
5.1. Validations
| column | validation_function |
|---|---|
| change_reason_code | ores_dq_validate_change_reason_fn |
6. C++
6.1. Flags
6.2. Repository
6.3. Domain includes
#include <string>
6.4. Entity includes
#include <string>
6.5. Conventions
6.6. Table display
| column | header |
|---|---|
| code | Code |
| name | Name |
| description | Description |
| display_order | Display Order |
| modified_by | Modified By |
| version | Version |
6.7. Custom repository methods
7. See also
- Curve Role – the entity whose NONE-sentinel pattern this follows.
- ores.refdata – component group overview.