Quintessence Studio

Selectors

Selector nodes and views

How to build a selector

How to link a selector to a function

How to access the selector in the Quintessence Excel® Addin Wizard

Introduction


When using the Quintessence Addin functions in Excel, there can be many parameter values to enter. The Quintessence Wizard serves both as a memory aid, by allowing the selection of possible parameter values, and also by making the construction of a function easier. These selectors are set up in Quintessence and linked to the relevant functions. This document describes the creation of an example selector, how to link a selector to a function, and how to use the selector in the Quintessence Wizard in Excel.

Selector nodes and views


Selectors can consist of hierarchies to make the retrieval of values easier:

  • A grouping element forms a Node, and a set of results comprises a View.
  • Parent nodes can have child nodes, forming a hierarchical tree.
  • Some nodes are static and merely serve as grouping items with no associated view.
  • Some nodes are static but linked to a view (clicking on the node returns results).
  • Some are formula nodes and linked to views; the formula node creates a dynamic group when expanded, and each item in the dynamic group links to a view.

In this example, an Entity selector called EntityHierarchy will be created as follows:

 

 

Node = None     View = None

In this example, ‘Indices’ is a static grouping node. The node is not linked to a formula or a formulated set of results (view).

Node = Formula     View = Formula

‘List of Indices’ is a dynamic grouping node. The node is linked to a formula (it creates a dynamic group) and is linked to a formulated set of results.

Node = None     View = Formula

In this example, ‘Equities’ is a static grouping node. The node is not linked to a formula, but is linked to a formulated set of results.

 

How to build a selector


From the Quintessence Start Menu, click on the ‘Selectors’ button:

The list of existing Selectors is displayed. Click on ‘Add’ to create a new selector:

When the Selector window opens, type in a name and description for the new selector:

Click on the Configuration tab and click ‘Add’ to add a new node. The node can be dynamic and link to a formula or be static. The node can link to a formulated view or simply serve as a grouping node.

Name the new node ‘Indices‘. This is a static grouping node (it does not expand into a set of nodes according to a formula) and does not link directly to a view, so both Nodes and View are set to ‘None’.

Add a child node and name it ‘List of Indices‘. To add a child node, click on ‘Indices‘ and select Add from the main menu. ‘List of Indices’ is a dynamic node and does link to a view:

To create the ‘List of Indices’ node formula, click on the Nodes tab. Using the equation editor, add an equation that uses the Relationship() function to return all Indices. These index groups will form part of the node hierarchy. They are displayed when the Indices node is expanded. Note, in this example, the database contains a ‘basket’ or entity called ‘All Indices’ that is related to specific indices.

Note:

When entering equations, there are two editor options to use, based on personal preference. More on the Quintessence equation editors

To test the equation, click on the ‘Testing’ button followed by the ‘Execute’ button:

The ‘List of Indices’ node links to a View or set of formulated results. Before clicking on the View tab to create the formula, make sure that the Code Column is identified (in this case it is column 1), as this Code will be passed to the View formula:

Using the equation editor, type in a variable named ‘Entities‘. Use a Relationship() function to return the entities for a selected Index. The value of the variable ‘Code‘ is sourced from the parent node ‘List of Indices’:

The variable can be tested by clicking on the ‘Testing’ and ‘Execute’ buttons. To perform this test, it is necessary to supply an example code value, which can be obtained from the ‘List of Indices’ formula test results in the step above. In this case, ‘J403‘ is used for the test:

As these results will form the View from which to select values, it can be helpful to have more information in the View. A View can consist of multiple columns. Edit the equation and add a variable called ‘Result‘ to the view. Create a TimeSeries() function that returns the code names. This function uses the ‘Entities‘ variable as input:

Again, test the output by clicking on Testing and Execute, and providing an example code, in this case ‘J403‘:

When a View has multiple columns, it can be helpful to provide meaningful column headers. On the View tab, check ‘Custom Headers’, and enter the headers in the order in which the columns appear in the output:

A new group will be added for equities. To add a node at the top level, right click in the top left hand corner and click Add:

Rename the group to ‘Equities’. In this example, the node is not dynamic, but does link to a formulated set of results:

After setting the View to be a formula view, the view formula tab is visible. Type in an equation that creates and assigns a variable called ‘AllEquities’. Add a variable that uses the TimeSeries() function to return the equity names:

Add custom headers for the view columns:

To test the equation, click on Testing and Execute:

The example selector is complete. Test the entire Selector by clicking on the Testing tab and the Execute button:

To test the Indices, click on the ‘Indices’ node. Expand the Indices node to view the list of indices. Click on individual indices to view their constituent instruments. Double click on instruments or drag them to the window on the right to make selections:

Click on the Equities node to view the list of equities. Double click on equities or drag them to the window on the right to make selections:

How to link a selector to a function


From the Quintessence Start Menu, click on the System Info button:

Click on ‘Functions’ and locate the target function, in this example, the TimeSeries() function:

When the function window opens, enter the selector name next to the relevant function parameter, making sure to prefix it with ‘Entity:’, for example, ‘Entity:EntityHierarchy’:

How to access the selector in the Quintessence Excel® Addin Wizard


Click on the Wizard button on the Quintessence ribbon in Excel:

When the Wizard opens, type in ‘TimeSeries’ followed by two brackets (). The function parameters are listed. Clicking in a parameter editor will display any linked selector hierarchy on the right:

Expand the selector hierarchy. The ‘leaf’ items are listed. Double click on items to add them to the selection list on the right. In this example, multiple values can be selected, as the TimeSeries ‘Entity code(s)’ parameter allows multiple values:

As selections are made, the Wizard adds items to the function automatically:

Once all selections have been made, click OK to return to Excel. Note that the values selected using the Wizard are retained in the function:

 

Back to top