ores.refdata.portfolio

Table of Contents

Represents organizational, risk, or reporting groupings. Never holds trades directly. Supports hierarchical structure via self-referencing parent_portfolio_id.

Flags

Primary key

UUID uniquely identifying this portfolio.

Surrogate key for the portfolio record.

Natural keys

party_id

Party that owns this portfolio.

Set server-side from the authenticated session. Enforced by RLS.

ctx.generate_uuid()

name

Human-readable name for the portfolio.

e.g., 'Global Rates', 'APAC Credit'.

std::string(faker::company::companyName()) + " Portfolio"

Columns

description

Optional free-text description of the portfolio.

std::string(faker::lorem::sentence())

parent_portfolio_id

Self-referencing FK. NULL indicates a root node.

Links to the parent portfolio in the hierarchy.

boost::uuids::uuid()

owner_unit_id

Business unit responsible for management.

References the business_units table.

ctx.generate_uuid()

purpose_type

Portfolio purpose classification.

References purpose_types lookup (Risk, Regulatory, ClientReporting, Internal).

std::string("Risk")

aggregation_ccy

Currency for P&L/risk aggregation at this node.

ISO 4217 currency code.

std::string("USD")

is_virtual

If 1, node is purely for on-demand reporting.

Not persisted in trade attribution when virtual.

0

status

Current lifecycle status (Active, Inactive, Closed).

std::string("Active")

SQL

Flags

C++

Flags

Repository

Domain includes

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

Entity includes

#include <string>
#include "sqlgen/Timestamp.hpp"
#include "sqlgen/PrimaryKey.hpp"

Conventions

Table display

column header
name Name
purpose_type Purpose
aggregation_ccy Currency
is_virtual Virtual
modified_by Modified By
version Version

Qt

Detail fields

field label widget type is_key is_required placeholder
name Name nameEdit line_edit true true Enter portfolio name
purpose_type Purpose Type purposeTypeEdit line_edit     Enter purpose type
aggregation_ccy Aggregation Currency aggregationCcyEdit line_edit     Enter aggregation currency

Columns (Qt model)

enum_name field header type width
Name name Name string 250
PurposeType purpose_type Purpose string 120
AggregationCcy aggregation_ccy Agg. Currency string 120
IsVirtual is_virtual Virtual int 70
Version version Version int 80
ModifiedBy modified_by Modified By string 120
RecordedAt recorded_at Recorded At timestamp 150

Custom repository methods

See also

Emacs 29.1 (Org mode 9.6.6)