ores.trading.bond_issue_leg

Table of Contents

One row per leg a bond issue states, keyed to the issue and the leg's ordinal within the issue's leg list.

The ORE schema declares the bond's leg list unbounded, and a bond states one leg per coupon. The legs are LegData inside bondReferenceDatum, the security, so the issue owns them: one schedule serves every instrument of that ISIN. The funding, repo and ascot legs are the product's own and stay with their trade-keyed tables.

The row carries the leg's payment terms, its day counters, its settlement block and the two flags the schema states on the leg itself. Everything else the leg states lives in a table of its own: the schedules in bond_issue_leg_schedule, the amortizations, the named amounts and the rate group below. Those tables key on issue_id as well, so a schedule or an amount reaches the leg that stated it.

The leg's currency and day counter live here and nowhere else. The issue row keeps no copy of the coupon terms: bondReferenceDatum states them on legData alone, so a leg whose terms differ from its neighbour's still round trips.

Every member the schema declares optional is nullable here and an std::optional in C++, so a member the document states and the row cannot hold stays distinguishable from one the document omits.

1. Flags

2. Columns

2.1. issue_id

The bond issue this leg belongs to.

The issue row carries the party. The leg rows are family-owned and ride the issue's scope.

2.2. leg_number

Ordinal of the leg within the issue's leg list, counting from one.

The issue's leg list is unbounded, and a bond states one leg per coupon.

2.3. payer

True when the leg's payer is the counterparty rather than the party.

2.4. leg_type

The leg's type as the document spells it, such as Fixed or Floating.

The type is the document's own member and drives which arm of the rate group a document states. It is kept as text, not decoded, so export re-emits the spelling.

Soft FK to ores_refdata_leg_types_tbl: leg types belong to ores.refdata (Fixed, Floating, OIS, CMS, …), so the dependency is recorded rather than copied. PR 4 tightens the soft reference into a real foreign key.

2.5. currency

ISO 4217 currency code of the leg.

Soft FK to ores_refdata_currencies_tbl: ISO 4217 currency codes belong to ores.refdata, so the dependency is recorded rather than copied. PR 4 tightens the soft reference into a real foreign key.

2.6. payment_convention

Business day convention the leg's payments are adjusted by.

2.7. payment_lag

Number of business days between a payment's accrual end and its pay date.

The column is text rather than a number because the container holds the document's text and export re-emits it unchanged.

2.8. payment_calendar

Calendar the leg's payment dates are adjusted against.

2.9. day_counter

Day count convention of the leg.

2.10. last_period_day_counter

Day count convention the leg applies to its final coupon period.

2.11. notional_payment_lag

Number of business days between a notional exchange and its pay date.

2.12. strict_notional_dates

True when the leg's notional exchanges fall on the schedule's dates without adjustment.

2.13. indexings_from_asset_leg

True when the leg takes its indexings from the asset leg rather than stating them.

2.14. settlement_fx_index

FX index the leg's settlement block fixes against.

The block is present when this column is set. The schema requires the index on a settlement block, so a null column and an absent block are the same statement, and one column carries both.

2.15. settlement_fixing_date

Date the settlement block's FX index fixes on (ISO 8601 date string).

3. Foreign keys

3.1. issue_id

The bond issue this row belongs to. A bond's legs belong to the security, so a fact or child row names the issue its document states and the insert trigger checks it there.

4. SQL

4.1. Flags

4.2. Checks

expression
"leg_number" > 0

5. C++

5.1. Flags

5.2. Repository

5.3. Domain includes

#include <cstdint>
#include <optional>
#include <string>
#include <boost/uuid/uuid.hpp>

5.4. Conventions

5.5. Table display

column header
leg_number Leg
leg_type Type
currency Currency
day_counter Day Counter
payment_calendar Calendar
modified_by Modified By
version Version

5.6. Custom repository methods

6. See also

Emacs 29.3 (Org mode 9.6.15)