Functions Data

ReverseHierarchy

The ReverseHierarchy() function returns the levels of parents that are linked to a child on a specific date for a relationship that is common to all levels. A hierarchy in Quintessence consists of the same type of relationship that repeats from the parent to the child, from the child to the next child etc.

Related functions: Hierarchy, Relationship, ReverseRelationship

Syntax


ReverseHierarchy (Entity Code, Relationship, Levels, IAAD, Projection, Headers, Source)

Classification Codes The root node to traverse to.
Entity Codes

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.

The ReverseHierarchy() function requires an entity code that is at the leaf node (lowest level) of a hierarchy, in other words, the last child in a hierarchy of the same type of relationship.

More on Entities…

Relationship The relationship between the parent and child entities, for example “Constituent”. This relationship needs to apply to the entire hierarchy.
Levels The levels to be displayed (the first level is 0).
IAAD The information ‘as at’ date.
Projection The projection of the hierarchy. Possible options: none, parents, leaves.
Headers Whether to include headers in the output or not. Possible options: none, row, column or both.
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 all levels of the ABCStockExchange’s 5-tier classification hierarchy

Example 2. Return specific levels of the ABCStockExchange’s 5-tier classification hierarchy

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 all levels of ABCStockExchange’s 5-tier classification hierarchy


Function
=ReverseHierarchy(“ABCStockExchange 5 tier classification”,”CZA,KIO”,”ICB Classification”,”0,1,2,3,4,5″)
Output
ABCStockExchange 5 Tier Classification Basic Materials Basic Resources Mining Coal CZA
ABCStockExchange 5 Tier Classification Basic Materials Basic Resources Industrial Metals Steel KIO

Example 2. Return specific levels of ABCStockExchange’s 5-tier classification hierarchy


Function
=ReverseHierarchy(“ABCStockExchange 5 tier classification”,”CZA,KIO”,”ICB Classification”,”0,2,4″)
Output
ABCStockExchange 5 Tier Classification Basic Resources Coal
ABCStockExchange 5 Tier Classification Basic Resources Steel