Custom Sources

Custom sources – RelationshipData

See also:

How to create a Custom TimeSeries source

How to create a Custom Relationship source

Introduction to TimeSeries, TimeSeries(), Entities, Relationship(), RelationshipData()

How to create a Custom RelationshipData source


This example creates a RelationshipData source that calculates the weights of the constituents in a specified portfolio.

To create a new custom RelationshipData source, click on the Relationship Series button and click ‘Language’. If the custom RelationshipData source needs to connect to an external database to retrieve data, the selection is then ‘SQL’:

When the custom RelationshipData source window opens, add a name and description for the new custom source:

Create a new factor called ‘PortfolioWeights’. The factor applies to relationships between entities. (see How to create a TimeSeries factor):

Select the equation tab. Using the equation editor, enter the equations that perform the required calculations and output the results:

Test the results by supplying values for the variable parameters. In this example, ‘Entity’, ‘StartDate’ and ‘EndDate’ are required. Click on the ‘Testing’ button followed by ‘Execute’:

The test results are listed below. The results list the weights of the instruments linked to the portfolio ‘BCD234’:

On the Output tab, map the results to their output columns:

The custom RelationshipData source can be utilised in the Quintessence Application and in Excel using the Quintessence Excel® Addin:

=RelationshipData(“BCD234″,”Constituent”,”PortfolioWeights”,”1 oct 2015″,”1 oct 2015″,”D”,,”DataView(Parent,Child,ValueDate,Value):column”,,,,”PortfolioWeightsSource”,”PortfolioAdministrator1″)

The RelationshipData() function returns the constituent weights (PortfolioWeights) for a specified portfolio and dates, using the custom Relationshipdata source (PortfolioWeightsSource), yielding the following result:

Note:

Custom RelationshipData sources and Custom Relationship sources can be used together:

=RelationshipData(“BCD234″,”Non MM Constituents”,”PortfolioWeights”,”1 oct 2015″,”1 oct 2015″,”D”,,”DataView(Parent,Child,ValueDate,Value):column”,,,,”PortfolioWeightsSource”,”NonMoneyMarketConstituents”)

Back to top