Relationship.Period
The Relationship.Period() function returns the dates when a relationship existed between a parent (for example, an entity such as a fund) and its children (for example, its constituents), between two specified dates.
Related functions: RelationshipData, Relationship
Syntax
Relationship.Period (Entity, Relationships, Start Date, End Date, Frequency, Interp Method, View, Source(s), 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.
|
Relationships | The type of connection between the primary entity and other entities, for example, “Constituent”, “Country”, “Region”, “Broker”. |
Start Date |
The start date delimiting the range of value dates to return. Note: depending on the frequency selected, the start date or end date may not be included in the TimeSeries results, for example, if the chosen frequency is trading days only, the start date or end date may not be a trading day. |
End Date | The end date delimiting the range of value dates to return. |
Frequency |
The sequence of value dates to return. Possible values: “WS” (week starts), “WE” (week ends), “MS” (month starts), “ME” (month ends), “QS” (quarter starts), “QE” (quarter ends), “YS” (year starts), “YE” (year ends),
Any value prefixed by a ‘T’ means trading days only. For example, ‘TWE’ means week ends that are also trading days. |
Interp Method |
This takes the form “interpolation:extrapolation”. Interpolation is an estimation of a value within two known values in a sequence of values. Extrapolation is an estimation of a value based on extending a known sequence of values or facts beyond what is known. The interpolation value can either be “Linear”, “Forward” or “None”. The extrapolation can either be “Forward” or “None”. |
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:
For example, “DataView(*):column” or “DataView():none”
|
Source(s) | The source(s) of the data under consideration. Examples of sources: MarketDataProvider2, PortfolioAdministrator1, MarketDataProvider1 etc. Note: If only one source is specified, it applies to all the factors. When multiple sources are specified, they must correlate with the list of factors specified on a one-to-one basis. |
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
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 month starts when a relationship existed between a fund and its constituent, within a range of dates
This example retrieves the month starts when constituents belonged to fund 5000 within a stipulated date range (31 December 2006 to 30 June 2007).
Function |
=Relationship.Period(“5000″,”constituent”,”31 Dec 2006″,”30 Jun 2007″,”MS”,,”dataview(parent,child,date)”,”MarketDataProvider2″) |
Output | ||
Parent | Child | Date |
5000 | CEB | 1 Jan 2007 |
5000 | MBD | 1 Feb 2007 |
5000 | CEB | 1 Feb 2007 |
5000 | MBD | 1 Mar 2007 |
5000 | KVJ | 1 Mar 2007 |
5000 | GMP | 1 Mar 2007 |
5000 | CEB | 1 Mar 2007 |
5000 | MBD | 1 Apr 2007 |
5000 | KVJ | 1 Apr 2007 |
5000 | GMP | 1 Apr 2007 |
5000 | CEB | 1 Apr 2007 |
Example 2. Pivot the set of dates and relationships for readability
This example pivots the results from the example above to make them more readable.
Function |
=Pivot(Relationship.Period(“5000″,”constituent”,”31 Dec 2006″,”30 Jun 2007″,”MS”,,”dataview(parent,child,date)”,”MarketDataProvider2″),”C2″,”C3″,”Top(C2″) |
Output | ||||
1 Jan 2007 | 1 Feb 2007 | 1 Mar 2007 | 1 Apr 2008 | |
CEB | CEB | CEB | CEB | CEB |
MBD | MBD | MBD | MBD | |
KVJ | KVJ | KVJ | ||
GMP | GMP | GMP |