20#ifndef ORES_TRADING_DOMAIN_CREDIT_INSTRUMENT_HPP
21#define ORES_TRADING_DOMAIN_CREDIT_INSTRUMENT_HPP
26#include <boost/uuid/uuid.hpp>
27#include "ores.utility/uuid/tenant_id.hpp"
29namespace ores::trading::domain {
Credit instrument economics for CreditDefaultSwap, CDSIndex, SyntheticCDO, CreditDefaultSwapOption,...
Definition credit_instrument.hpp:39
std::string option_type
Option type: "Call" or "Put" — CreditDefaultSwapOption. Empty otherwise.
Definition credit_instrument.hpp:184
std::string modified_by
Username of the person who last modified this record.
Definition credit_instrument.hpp:154
std::optional< double > tranche_detachment
CBO tranche detachment point as decimal. Null when not set.
Definition credit_instrument.hpp:209
boost::uuids::uuid instrument_id
UUID uniquely identifying this credit instrument.
Definition credit_instrument.hpp:53
std::optional< boost::uuids::uuid > trade_id
UUID of the associated trade record.
Definition credit_instrument.hpp:65
std::string start_date
Start date (ISO 8601 date string, e.g. 2026-01-15).
Definition credit_instrument.hpp:105
std::string change_commentary
Free-text commentary explaining the change.
Definition credit_instrument.hpp:169
int index_series
Optional index series number for CDSIndex trades. Zero means not specified.
Definition credit_instrument.hpp:132
double notional
Notional amount of the credit instrument.
Definition credit_instrument.hpp:85
std::string restructuring
Optional restructuring clause (e.g. "MM", "MR", "CR", "XR"). Empty if not applicable.
Definition credit_instrument.hpp:144
std::string description
Optional free-text description.
Definition credit_instrument.hpp:149
double recovery_rate
Recovery rate as a decimal (e.g. 0.4 for 40%).
Definition credit_instrument.hpp:95
std::string linked_asset_code
Reference asset code for CreditLinkedSwap. Empty otherwise.
Definition credit_instrument.hpp:199
double spread
Credit spread in basis points (e.g. 100.0 for 100 bps).
Definition credit_instrument.hpp:90
std::string index_name
Optional index name for CDSIndex trades (e.g. "CDX.NA.IG"). Empty for non-index products.
Definition credit_instrument.hpp:126
boost::uuids::uuid party_id
Party that owns this instrument.
Definition credit_instrument.hpp:58
std::chrono::system_clock::time_point recorded_at
Timestamp when this version of the record was recorded.
Definition credit_instrument.hpp:174
std::string payment_frequency_code
Payment frequency code (e.g. Quarterly, SemiAnnual).
Definition credit_instrument.hpp:120
int version
Version number for optimistic locking and change tracking.
Definition credit_instrument.hpp:43
std::string day_count_code
Day count convention code (e.g. Actual365Fixed, Thirty360).
Definition credit_instrument.hpp:115
std::optional< double > tranche_attachment
CBO tranche attachment point as decimal. Null when not set.
Definition credit_instrument.hpp:204
std::string maturity_date
Maturity date (ISO 8601 date string, e.g. 2031-01-15).
Definition credit_instrument.hpp:110
std::string performed_by
Username of the account that performed this action.
Definition credit_instrument.hpp:159
std::string reference_entity
Name or identifier of the reference entity.
Definition credit_instrument.hpp:75
std::optional< double > option_strike
Option strike spread in bps for CDS options. Null when not set.
Definition credit_instrument.hpp:194
std::string tenor
Tenor of the instrument (e.g. "5Y", "3Y").
Definition credit_instrument.hpp:100
std::string seniority
Optional seniority (e.g. "Senior", "Subordinated"). Empty if not applicable.
Definition credit_instrument.hpp:138
std::string trade_type_code
ORE product type code (CreditDefaultSwap, CDSIndex, SyntheticCDO).
Definition credit_instrument.hpp:70
utility::uuid::tenant_id tenant_id
Tenant identifier for multi-tenancy isolation.
Definition credit_instrument.hpp:48
std::string change_reason_code
Code identifying the reason for the change.
Definition credit_instrument.hpp:164
std::string currency
ISO 4217 currency code (e.g. USD).
Definition credit_instrument.hpp:80
std::string option_expiry_date
Option expiry date (ISO 8601) for CDS options. Empty otherwise.
Definition credit_instrument.hpp:189
A strongly-typed wrapper around a UUID representing a tenant identifier.
Definition tenant_id.hpp:66
static tenant_id system()
Creates a tenant_id representing the system tenant.
Definition tenant_id.cpp:41