ores.trading.bond_issue
Table of Contents
One row per bond issue (ISIN), the stable row every instrument of the
family references. The columns map one to one from bondData
(instruments.xsd lines 382-403): security_id, issuer, currency,
face_value, coupon_rate, coupon_frequency_code, day_count_code,
issue_date and settlement_days. Only SecurityId is required by that
schema; every other element is optional, so every other column is
nullable and an absent element is stored as NULL rather than as an
empty string or a zero.
The coupon terms denormalise the first leg of the issue's LegData,
which is itself optional: a document may identify a bond by its ISIN
alone.
1. Flags
2. Columns
2.1. issue_id
UUID uniquely identifying this bond issue.
Surrogate key of the issue row. Instrument rows and the issue's own child rows reference it; the row is stable while instruments open against it are amended.
2.2. security_id
ISIN or other security identifier of the issue.
Unique among the current rows of a tenant (the partial unique index below). The deduplication key of the migration: one issue row per ISIN, shared by every trade of it.
std::string("US9128283M42")
2.3. issuer
Issuer of the bond.
std::string("US Treasury")
2.4. currency
ISO 4217 currency code of the bond.
std::string("USD")
2.5. face_value
Face value per unit of the bond.
1000.0
2.6. coupon_rate
Coupon rate of the bond, as a decimal.
0.0425
2.7. coupon_frequency_code
Coupon payment frequency (Annual, SemiAnnual, Quarterly).
std::string("SemiAnnual")
2.8. day_count_code
Day count convention of the bond (30/360, Actual/360, Actual/Actual).
std::string("30/360")
2.9. issue_date
Issue date of the bond (ISO 8601 date string).
std::string("2024-01-15")
2.10. settlement_days
Settlement days of the bond, a market convention of the issue.
2
2.11. calendar
Calendar the issue's dates are adjusted against, when the document states one at the bond level rather than on a leg.
2.12. credit_curve_id
Credit curve the document names for the issue.
2.13. reference_curve_id
Reference curve the document names for the issue.
2.14. income_curve_id
Income curve the document names for the issue.
2.15. bond_notional
Notional the document states at the bond level, as the document spells it.
The column is text so that export re-emits the document's own spelling rather than a reformatted number.
3. SQL
3.1. Flags
3.2. Checks
Each check holds only for a value the document stated. An absent value is NULL, and a NULL comparison passes, so an issue that carries no notional is admitted while a stated non-positive one is not. The empty-string checks went with the columns that needed them: absence is now NULL, not an empty string.
| expression |
|---|
| "face_value" > 0 |
| "coupon_rate" >= 0 |
3.3. Indexes
| name | columns | unique | current_only | where_extra |
|---|---|---|---|---|
| security | tenant_id, security_id | true | true |
4. C++
4.1. Flags
4.2. Repository
4.3. Domain includes
#include <optional> #include <string> #include <boost/uuid/uuid.hpp>
4.4. Conventions
4.5. Table display
| column | header |
|---|---|
| security_id | ISIN |
| issuer | Issuer |
| currency | Currency |
| coupon_rate | Coupon Rate |
| modified_by | Modified By |
| version | Version |
4.6. Custom repository methods
5. See also
- ores.trading — component group overview.