UpdateRelationshipData
The UpdateRelationshipData() function updates relationship data in the Quintessence database.
Related functions: UpdateTimeSeries, UpdateRelationship
Syntax
UpdateRelationshipData (Entity, Relationship Type, Constituent data, Relationship date, Factor, Unit, Period, IAAD, Attributes, Source, Strategy, ShowError)
Entity |
The entity to update
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. Multiple entity codes are separated by commas.
|
Relationship type | The relationship, for example ‘constituent’ |
Constituent data | A range or an array of constituents, value dates and values. |
Relationship date | The date the relationship is applicable to |
Factor | The factor to update, for example “Holding” or “Effective Exposure” |
Unit | The unit associated with the factor, usually a currency, for example “ZAR” |
Period | The period related to the values under consideration. For example, “d” (daily) or “w” (weekly). |
IAAD | The Information As At Date |
Attributes | The Attributes of the values, for example “Historical”, “Forecast” or “Interim”. |
Source | The source of the data under consideration, for example, “MarketDataProvider2” or “MarketDataProvider1”. |
Strategy |
The value of this parameter can be: “Set”, “Add” or “Remove”. Additionally, “Set” values can be combined with “Always” and “OnChange”, for example “Set, Always”. See the detailed explanation below. |
ShowError | If ShowError is set to TRUE, an error message will be displayed if the function fails. |
Strategy:
Set replaces the set.
Add adds constituents.
Remove removes constituents.
None updates the data linked to the relationship, but not the relationship itself, for example the holdings of the constituents might be updated for certain or all value dates, but not the set of constituents itself.
Always means always make the change.
OnChange means only make the change if the set has changed.
If the relationship date exists:
Set, Always: Remove the existing set of constituents for that date and replace it with the new set of constituents.
Set, OnChange: Remove the existing set for that date and replace it with the new set, but only if the new set is different.
Add: Add the constituents to the existing set for that date if they are not already part of the set.
Remove: Remove the constituents from the existing set for that date.
If the relationship date does not exist:
Set, Always: The set of constituents will be added with the new relationship date.
Set, Onchange: The set will be added for the new date, but only if it differs from the set with the most recent date.
Add: The set of constituents will be added with the new relationship date.
Remove: No action.
Example
Function |
UpdateRelationshipData(“5010”, “constituent”, A3:C5, “5 Jan 2015”, “Holding”, “ZAR”, “d”, “1 July 2015”, “Interim”, “PortfolioAdministrator1”, “Set, OnChange”, True) |
Excel cells | |||
Constituent | Declaration Date | Value Date | Value |
VRR | 1 Aug 2015 | 1 Feb 2015 | 6000 |
LEF | 1 Aug 2015 | 1 Feb 2015 | 8500 |
THT | 1 Aug 2015 | 1 Feb 2015 | 450 |
When “None” is not stipulated, the function runs UpdateTimeSeries and UpdateRelationship with the new data. If “None” is stipulated, then UpdateTimeSeries is run but not UpdateRelationship.