Knowledge Base

Entities and Code Types in Quintessence

Introduction

In Quintessence, an entity is any identifiable element stored in the database that has data associated with it. Examples include instruments, portfolios, countries, managers, and many others. Each entity is identified by one or more codes, which represent that entity within a particular system.

Certain entities have TimeSeries data, meaning they carry values recorded at multiple points in time. Other entities participate in Relationships with constituents, and those connections may have associated RelationshipData describing attributes of the relationship.


Entity Codes

Entity codes are created by data providers, system authors, and users to uniquely identify an entity within a specific system. A code does not need to be globally unique – only unique in the system from which it originates.

Because Quintessence integrates data from multiple systems, a single entity may have multiple valid codes, one for each system that references it. All of these codes identify the same underlying entity.


Code Types

Every entity code belongs to a code type. A code type defines the system or context in which the code is meaningful. For example:

  • StockExchange1 Alpha Code
  • Internal Portfolio Code
  • External Instrument Identifier

Code types allow Quintessence to correctly interpret codes that may otherwise be ambiguous across systems.


How Quintessence Identifies an Entity

In some cases, a code may not be unique across different systems. This can lead to ambiguity if the same code is reused with different meanings. Quintessence resolves this in two ways.

By Specifying the Code Type Directly:

Users can qualify an entity code by explicitly providing the code type. For example:

AB05:StockExchange1 Alpha Code

This ensures Quintessence selects the correct entity based on the supplied code type.

By Using Code Type Precedence:

If no code type is provided, Quintessence applies the code type precedence configured by the system administrator.

  • The system checks all code types associated with the code.
  • It then selects the one with the highest precedence.
  • The entity linked to that code type is returned.

This mechanism ensures consistent and predictable entity resolution.


Summary

  • An entity is any data-bearing object in the Quintessence database.
  • Entities may have TimeSeries data or participate in relationships.
  • Multiple codes can identify the same entity across different systems.
  • Code types define the origin or system of the code.
  • Quintessence resolves ambiguous codes by:
    • Using the specified code type, or
    • Falling back to system-defined code type precedence.