ores.trading.knock_out_swap_instrument
Table of Contents
Represents a knock-out interest rate swap that terminates automatically if the floating rate breaches a specified barrier level.
Flags
Primary key
UUID uniquely identifying this knock-out swap instrument.
Surrogate key for the instrument record.
Natural keys
Columns
trade_type_code
Trade type code (soft FK to ores_trading_trade_types_tbl).
std::string("KnockOutSwap")
party_id
Party that owns this instrument.
Set from session variable app.current_party_id.
trade_id
Optional soft FK to the parent trade.
Links instrument to a trade if applicable.
start_date
Swap effective start date.
ISO 8601 date string (YYYY-MM-DD).
std::string("2024-01-15")
maturity_date
Swap maturity date.
Must be after start_date.
std::string("2029-01-15")
barrier_level
Barrier level that triggers knock-out.
Expressed as a decimal fraction.
0.05
barrier_type
Barrier type: UpAndOut or DownAndOut.
UpAndOut knocks out when rate rises above barrier; DownAndOut when it falls below.
std::string("UpAndOut")
knock_out_dates_json
Optional JSON array of knock-out observation dates.
ISO 8601 date strings for discrete barrier observation.
description
Optional free-text description.
Human-readable notes about this instrument.
SQL
Flags
C++
The C++ domain class is decomposed into nested sub-structs (the C1202
pattern from PRs #1047/#1071/#1075/#1083/#1085): the implicit scaffolding
columns (version, tenant_id, workspace_id, the primary key) and the
columns marked :group: identity below fold into an
instrument_identity identity; member (see the
ores.trading.instrument_identity field-group model), the implicit audit
columns fold into an ores::dq::domain::audit_record audit; member (see
the ores.dq.audit_record field-group model), and the remaining columns
stay flat in between. The SQL schema, DB entity and column lists are
unaffected — only the domain class and the mapper's domain-side accesses
nest. The entity templates consume these annotations; domain and
repository profiles regenerate correctly.
Flags
Repository
Domain includes
#include <chrono> #include <string>
Conventions
Custom repository methods
See also
- ores.trading — component group overview.