ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Attributes | List of all members
swap_leg Struct Referencefinal

One leg of a rates instrument (Swap, CrossCurrencySwap, CapFloor, Swaption). More...

#include <swap_leg.hpp>

Collaboration diagram for swap_leg:
Collaboration graph

Public Attributes

int version = 0
 Version number for optimistic locking and change tracking.
 
utility::uuid::tenant_id tenant_id = utility::uuid::tenant_id::system()
 Tenant identifier for multi-tenancy isolation.
 
boost::uuids::uuid id
 UUID uniquely identifying this leg.
 
boost::uuids::uuid instrument_id
 UUID of the parent instrument.
 
int leg_number = 1
 Leg ordering within the instrument (1-based).
 
std::string leg_type_code
 Type of this leg.
 
std::string day_count_fraction_code
 Day count fraction convention for this leg.
 
std::string business_day_convention_code
 Business day convention for date adjustments.
 
std::string payment_frequency_code
 Payment frequency for this leg.
 
std::string floating_index_code
 Floating rate index (empty for fixed legs).
 
double fixed_rate = 0.0
 Fixed coupon rate as a decimal (e.g. 0.05 = 5%).
 
double spread = 0.0
 Floating spread added to the index rate, as a decimal.
 
double notional = 0.0
 Leg notional amount.
 
std::string currency
 ISO 4217 currency code for this leg (e.g. USD, EUR).
 
std::string modified_by
 Username of the person who last modified this record.
 
std::string performed_by
 Username of the account that performed this action.
 
std::string change_reason_code
 Code identifying the reason for the change.
 
std::string change_commentary
 Free-text commentary explaining the change.
 
std::chrono::system_clock::time_point recorded_at
 Timestamp when this version of the record was recorded.
 

Detailed Description

One leg of a rates instrument (Swap, CrossCurrencySwap, CapFloor, Swaption).

A plain IRS has two legs: one fixed, one floating. A cross-currency swap also has two legs but with different currencies. Fields not applicable to a leg type are left empty (e.g. floating_index_code for fixed legs, fixed_rate for floating legs).

Member Data Documentation

◆ instrument_id

boost::uuids::uuid instrument_id

UUID of the parent instrument.

Soft FK to ores_trading_instruments_tbl.

◆ leg_number

int leg_number = 1

Leg ordering within the instrument (1-based).

Leg 1 is conventionally the fixed or pay leg.

◆ leg_type_code

std::string leg_type_code

Type of this leg.

Soft FK to ores_trading_leg_types_tbl (Fixed, Floating, CMS, OIS, etc.).

◆ day_count_fraction_code

std::string day_count_fraction_code

Day count fraction convention for this leg.

Soft FK to ores_trading_day_count_fraction_types_tbl.

◆ business_day_convention_code

std::string business_day_convention_code

Business day convention for date adjustments.

Soft FK to ores_trading_business_day_convention_types_tbl.

◆ payment_frequency_code

std::string payment_frequency_code

Payment frequency for this leg.

Soft FK to ores_trading_payment_frequency_types_tbl.

◆ floating_index_code

std::string floating_index_code

Floating rate index (empty for fixed legs).

Soft FK to ores_trading_floating_index_types_tbl. Examples: EURIBOR6M, SOFR, LIBOR3M.

◆ fixed_rate

double fixed_rate = 0.0

Fixed coupon rate as a decimal (e.g. 0.05 = 5%).

Zero for floating legs.

◆ spread

double spread = 0.0

Floating spread added to the index rate, as a decimal.

Zero for plain floating legs with no spread.

◆ notional

double notional = 0.0

Leg notional amount.

May differ from the instrument notional for cross-currency swaps.