Currencies: Party-Specific Settlement Rules

Table of Contents

This page is a capture in the next bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.

Field Name Type Description
capability_id UUID PK
party_id INT/FK Reference to internal parties. This can be "The House" or a specific child entity.
currency_code CHAR(3)/FK Reference to ores_refdata_currencies_tbl.
can_settle_physically Boolean If true we can settle in this currency.
can_cash_settle Boolean If true, we can settle in cash on another currency.
default_settlement_mode ENUM physical (Deliverable) or cash_settled (Non-Deliverable/NDF).
is_active BOOL To disable capabilities if an account is frozen or closed.

Then, to determine which account to use to settle we need something like ores_refdata_party_nostro_accounts:

Field Description
party_id Which branch of yours owns this account?
currency_code The currency of the account.
agent_bank_id The external bank (e.g., HSBC, Citi).
account_number The actual IBAN/Account string.
is_primary Boolean to tell the system which one to use by default.
purpose "ENUM: General, CLS, Intercompany, Custody."

This tells us what account to use when settlement comes. We cannot have a capability without at least one account.

Then, for each currency which can be cash settled, we need to know into which currencies they can be cash settled. For that we have ores_refdata_settlement_cash_options. This is a Junction Table that defines the valid "Settlement Pairs." This table answers: "If we are cash-settling Currency X, what are the allowed 'Destination' currencies for this House Entity?"

Schema FieldType Description
capability_id FK Links to ores_refdata_settlement_capabilities.
settlement_currency CHAR(3) The "Destination" currency (e.g., USD, EUR).
is_primary BOOLEAN The default currency the desk prefers to use for NDFs.
fixing_source_id FK Which index provides the rate to convert X to the Settlement CCY?

If cash settled is true, we must have a corresponding entry in this table.

The "Relative" Logic Requirement:

The system must perform a Hierarchical Lookup: Check for a rule specific to the Child Party + Currency. If not found, check for a rule for The House + Currency. If still not found, default to physical for g10 and cash_settled for exotic.

Emacs 29.1 (Org mode 9.6.6)