Quintessence Studio

Data feeds

Files are typically generated by a data provider, for example Reuters or Bloomberg. The objective of a data feed is to load this data into Quintessence and have it accessible to all users. Some feeds are run as ‘one-offs‘. Others are scheduled to run at regular intervals, for example daily.

How to create a data feed


Example 1 ‘ Basket of equities


This is a simple example that creates a ‘basket‘ of equities in Quintessence called ‘Equity Universe‘. ‘Equity Universe‘ is an entity. The individual equities are constituents of the ‘Equity Universe‘ entity.

The input file is an Excel spreadsheet:

Click on the Data Feeds button in Quintessence:

The list of data feeds is shown. Click on the ‘New‘ button to create a new data feed:

Enter a name and description for the data feed:

Click on the Import Template button:

The Template Import Wizard opens. Select the feed type, based on the information source file:

Select either an actual data file or an example file that has the same layout (to use as a template) and click Next:

Set the cell range and stipulate whether the data has a header row or not. If the file might vary in length over time, then set the range to a high number of rows. In this example, this is a once-off feed, so the cell range can be set precisely. Specify the worksheet name and number and click ‘Next‘:

A preview of the data from the template file is displayed. Click ‘Next‘ and then ‘Finish‘:

Go to the configuration tab. Right click on the blank canvas and create a ‘Columns‘ component:

If a template file has already been imported using the Wizard as per the steps above, the columns are picked up automatically:

To preview the data, click on the ‘Preview Configuration‘ button, select the data input file and click on ‘Preview‘:

The preview is shown on the ‘Preview‘ subtab of the ‘Configuration‘ tab:

The incoming data needs to map to Quintessence structures, in this case, a parent entity that is related to children entities through a relationship called ‘Constituent‘.

Create an Entity component, by right clicking on the Columns component:

The transformation steps (that input the raw data and map it to Quintessence structures) need to be specified. A parent entity is required (the basket), as are child entities (equities) and a relationship between the two needs to be defined of type ‘constituent‘.

Add two entities, followed by a relationship. The first entity represents the children, the next the basket. Finally the relationship is created:

Rename the items accordingly. The relationship can be given any name, provided the type is of ‘constituent‘, which will be set in the next steps.

Rename the first Entity ‘Equities‘. As these entities already exist in the system (in this example), ‘AllowCreation‘ is set to False:

Click next to ‘CodeHiearchy‘ and set the code type to use to look up the entities in the system:

Rename the next entity ‘Basket‘. As this is potentially a new addition to the system, ‘AllowCreation‘ is set to True:

Again, click next to ‘CodeHierarchy‘ and set the code type to use to look up the entities in the system. In this case, both ‘Lookup‘ and ‘Create‘ are checked, the former in case the entity already exists and the latter if not:

Name the Relationship ‘AllEquities‘. Set the relationship type to ‘Constituent‘. Set the ‘InsertionStrategy‘ and ‘SetOperation‘ to ‘OnChange‘ and ‘Set‘ ‘ this stipulates that any existing set of data should only be updated if the new set has changed; otherwise no action is taken. If the set has changed, the entire set of data is replaced.

Set the SecondaryEntity to ‘Equities‘, which links the Basket (the parent) to its Equities (child constituents):

The data feed has now been configured. To run the data feed, it needs to be encapsulated into a task, as shown in the help on Scheduler.

Example 2 ‘ TimeSeries Data loaded daily


This example loads information for money market indices on a daily basis. The information that is loaded into Quintessence is Name, Asset Class and Total Return Prices for a series of dates for each index.

The input file is a csv file that arrives from a data provider on a daily basis. Each file is named with a date to ensure that the latest file is accessed:

Example data file:

Create a name and description for the Data Feed:

Using the Import Template Wizard as described in the previous example, create the Reader parameters:

Using the Preview Configuration and Preview buttons, load an example input file:

Once again, create a Column component as shown in the previous example. In this case, there are no header cells in the input file, so columns names should be provided to aid readability in subsequent steps:

In the previous example, there was only one basket. In this example, there are multiple indices that need to be configured, so a branch and filters are created, each culminating in an Entity component:

Each filter creates its own subset of data:

The five filters’ criteria are:

1. trim(upper(InetCode))= “ALBI”

2. trim(upper(InetCode))= “STFIND”

3. trim(upper(InetCode))= “STFCAD”

4. trim(upper(substr(InetCode,0,2)))= “JB”

5. trim(upper(InetCode))= “ECPI”

In the input file there are multiple entries starting with ‘JB‘ – for 1 month, 3 months, 6 months and 12 months:

These need to be named accordingly. Additional filter components could be created for each code, but in this case a Function component is used to calculate the value to use for ‘Name‘ for the different JB indices:

The variable ‘JibarName‘ is used during the next stage when configuring the JB entities.

Configure each Entity component in turn. Create and Entity and three TimeSeries as follows:

Click next to CodeHierarchy and specify the Lookup code, allowing both Lookup and Creation:

Configure each of the three TimeSeries for each index:

The Total Return Price is set to the value in the input ‘Value‘ column:

For the JiBar indices, set the Name to equal the value of the variable that was calculated in the Formula:

This feed has been configured.

Note:

Although both of these data feeds have been configured using template files, these feeds don‘t get run. To run the feeds, they need to be encapsulated into Tasks. Tasks can contain additional logic and can be run on an ad hoc basis or scheduled to run at regular intervals.

Back to top