Functions Data

Relationship

Relationships exist between entities. For example, a portfolio has constituents (a set of instruments). The portfolio is said to be related to these instruments through the relationship type “constituent”. The Relationship() function returns the entities linked to a primary entity according to a specified relationship type.

Related functions: RelationshipData, Relationship.Period, Hierarchy, ReverseHierarchy, ReverseRelationship

Syntax


Relationship (Entity, Relationships, IAAD, View, Source, ShowError)

Entity

An entity is any element in the Quintessence database that has data associated with it and is identified by a code, for example, an instrument, portfolio, country or manager.

More on entities…

Relationships The relationship type linking the entities, for example “constituent”.
IAAD The information ‘as at’ date.
View

This parameter takes the form ‘DataView(*):Headers’.

To return specific columns, reference them by name, for example, “DataView(Entity,ValueDate)”.

Using (*) returns all columns.

The value for Headers can be:

    • column (show column headers)
    • row (show row headers, if any)
    • both (show both row and column headers)
    • none (show no headers).

For example, “DataView(*):column” or “DataView():none”

More on Views…

Source The source of the data. Examples of sources: MarketDataProvider2, PortfolioAdministrator1, MarketDataProvider1 etc.
ShowError If ShowError is set to TRUE, a standard Excel error message will be displayed if the function fails.

Note:

Input parameters can consist of Quintessence functions. This includes functions that return ranges in cases where a parameter value can be a range.

Examples


Example 1. Return the constituents linked to a portfolio

Example 2. Return the countries linked to a portfolio

Note:

How your system administrator configured Quintessence determines which function parameters are required. In most implementations, administrators configure functions so that certain parameters default to specific values when left blank.

Example 1. Return the constituents linked to a portfolio


Return the constituents linked to fund 5030, as at 1 January 2015, showing all columns, with headers.

Function
=Relationship(“5030″,”Constituent”,”1 Jan 2015″,”Dataview(*):column”)
Output
Parent Relationship Source Date Child
5030 Constituent StockExchange1 2015/01/01 CEB
5030 Constituent StockExchange1 2015/01/01 MBD
5030 Constituent StockExchange1 2015/01/01 KVJ
5030 Constituent StockExchange1 2015/01/01 GMP
5030 Constituent StockExchange1 2015/01/01 YKG
5030 Constituent StockExchange1 2015/01/01 PHO

Example 2. Return the countries linked to a portfolio


Return the countries in which fund 5070 has a presence, as at 31 May 2015, showing all columns, with headers.

Function
=Relationship(“5070″,”Presence”,”31 May 2015″,”Dataview(*):column”)
Output
Parent Relationship Source Date Child
5070 Presence MarketDataProvider2 2015/05/31 Singapore
5070 Presence MarketDataProvider2 2015/05/31 Argentina
5070 Presence MarketDataProvider2 2015/05/31 Botswana