ores.refdata.netting_set

Table of Contents

A netting set is the group of trades with one counterparty whose values offset one another when credit exposure is computed. Every trade names exactly one set, as ORE requires; a trade with nothing to net against sits in a set of its own. See Netting sets for the analysis.

A set opened under a netting agreement copies the agreement's counterparty and legal entity, and a pinned key holds the copy to the agreement, so a set cannot be filed under another counterparty's agreement. A set with no agreement holds trades that do not net; its counterparty may be unknown, as it is for a set read from an ORE document, which names none. Every set belongs to a legal entity of the firm, and the entity that imports the document is the one it belongs to.

The limit is the other half of a nettable set's identity: where one agreement covers trades under several limits, netting is restricted to the trades within one limit, so a set names a credit limit as it names an agreement. A separate pinned key holds the set's counterparty and party to the limit's, for the same reason the agreement pin exists. The two pins are separate because the limit is a credit fact and the agreement a legal one: one agreement covers several limits, so no single limit column can sit on the agreement.

The code is the netting set id ORE uses. The call type and initial margin type are the remaining parts of ORE's netting set details, and the risk weight is ORE's.

1. Flags

2. Columns

2.1. id

UUID uniquely identifying this netting set.

Surrogate key for the netting set record.

2.2. code

The netting set id, as ORE names it.

Unique within the legal entity the set belongs to. A trade's envelope names its set by this code.

std::string("NS-") + std::string(faker::string::alphanumeric(10))

2.3. netting_agreement_id

The agreement the set is opened under.

Absent when the trades in the set do not net.

std::nullopt

2.4. credit_limit_id

The credit limit the set's trades net within.

Absent when the set names no limit. Required when the set has one, and then its counterparty and party are the limit's.

std::nullopt

2.5. counterparty_id

The counterparty whose trades the set holds.

Required when the set has an agreement, and then equal to the agreement's.

std::nullopt

2.6. party_id

The legal entity of the firm the set belongs to.

References the parties table. Fixed for the set's life, so the CSAs and the identifiers that take their party from the set can never be left on another party. When the set has an agreement it equals the agreement's.

ctx.generate_uuid()

2.7. call_type

ORE's call type for the set.

Part of ORE's netting set details. Free text: ORE's schema types it as a plain string and no example uses it, so there is no list to check against.

std::nullopt

2.8. initial_margin_type

ORE's initial margin type for the set.

Part of ORE's netting set details. Free text: ORE's schema types it as a plain string and no example uses it, so there is no list to check against.

std::nullopt

2.9. risk_weight

ORE's risk weight for the set.

Not negative.

std::nullopt

2.10. description

Optional description of the set.

std::optional<std::string>("Test netting set")

3. Artefact columns

The import names the agreement by number and the counterparty by LEI where the store holds their uuids and the party. Publishing resolves them in the target tenant.

3.1. code

3.2. version

3.3. agreement_number

3.4. counterparty_lei

3.5. call_type

3.6. initial_margin_type

3.7. risk_weight

3.8. description

4. Artefact indexes

4.1. agreement_number

5. SQL

5.1. Flags

5.2. Checks

expression
"netting_agreement_id" is null or "counterparty_id" is not null
"credit_limit_id" is null or "counterparty_id" is not null
"risk_weight" is null or "risk_weight" >= 0

5.3. Pinned keys

name columns table target_columns error_message
agreement netting_agreement_id, counterparty_id, party_id ores_refdata_netting_agreements_tbl id, counterparty_id, party_id Invalid netting_agreement_id: %. The set's parties must be the agreement's.
credit_limit credit_limit_id, counterparty_id, party_id ores_refdata_credit_limits_tbl id, counterparty_id, party_id Invalid credit_limit_id: %. The set's parties must be the limit's.

6. Foreign keys

6.1. netting_agreement_id

6.2. credit_limit_id

6.3. counterparty_id

6.4. party_id

7. C++

7.1. Flags

7.2. Repository

7.3. Domain includes

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

7.4. Entity includes

#include <optional>
#include <string>

7.5. Conventions

7.6. Table display

column header
code Code
call_type Call Type
initial_margin_type IM Type
risk_weight Risk Weight
modified_by Modified By
version Version

7.7. Presentation

7.7.1. Detail fields

field label widget type is_key is_required placeholder
code Code codeEdit line_edit true true Netting set id
call_type Call Type callTypeEdit line_edit false false ORE call type
initial_margin_type IM Type initialMarginTypeEdit line_edit false false ORE IM type
description Description descriptionEdit line_edit false false Enter description

7.7.2. Columns

enum_name field header type width
Code code Code string 140
CallType call_type Call Type string 100
InitialMarginType initial_margin_type IM Type string 100
Description description Description string 200
Version version Version int 80
ModifiedBy modified_by Modified By string 120
RecordedAt recorded_at Recorded At timestamp 150

8. See also

Emacs 29.3 (Org mode 9.6.15)