ores.trading.rpa_instrument
Table of Contents
Represents a Risk Participation Agreement where one bank (protection buyer) pays a fee to another (protection seller) to assume a portion of credit risk on a reference counterparty.
1. Flags
2. Natural keys
3. Columns
3.1. instrument_id
UUID uniquely identifying this RPA instrument.
Surrogate key for the instrument record.
3.2. party_id
Party that owns this instrument.
Set from session variable app.current_party_id.
3.3. trade_id
Optional soft FK to the parent trade.
Links instrument to a trade if applicable.
3.4. start_date
Agreement effective start date.
ISO 8601 date string (YYYY-MM-DD).
std::string("2024-01-15")
3.5. maturity_date
Agreement maturity date.
Must be after start_date.
std::string("2027-01-15")
3.6. reference_counterparty
Identifier of the reference counterparty whose credit risk is shared.
e.g., LEI code or name of the reference entity.
std::string("ACME Corp")
3.7. participation_rate
Participation rate (0, 1] representing the fraction of risk transferred.
Expressed as a decimal fraction (e.g., 0.5 for 50%).
0.5
3.8. protection_fee
Optional protection fee paid by the buyer.
Expressed as a decimal fraction. Must be non-negative if set.
3.9. description
Optional free-text description.
Human-readable notes about this instrument.
4. SQL
4.1. Flags
5. 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.
5.1. Flags
5.2. Repository
5.3. Domain includes
#include <chrono> #include <string>
5.4. Conventions
5.5. Table display
| column | header |
|---|---|
| identity.instrument_id | ID |
| start_date | Start Date |
| maturity_date | Maturity Date |
| reference_counterparty | Counterparty |
| participation_rate | Participation Rate |
| protection_fee | Protection Fee |
| audit.recorded_at | Recorded At |
5.6. Custom repository methods
6. See also
- ores.trading — component group overview.