Custom Sources

Custom Sources

Introduction


Many functions take ‘Source’ as a parameter. The source refers to the original source of the data, for example a specific Stock Exchange or Portfolio Administrator. The source parameter can also accept a Custom TimeSeries source, Custom Relationship source or Custom RelationshipData source that has been constructed in the Quintessence system. These custom sources can be constructed using multiple building blocks and can be derived from multiple underlying sources.

Examples of when one would use a custom source:

  • A need for custom data that is not stored in the database but calculated in ‘real time’ from the underlying stored data. These custom factors are not stored because the values change as the underlying stored values change.
  • Calculating a TimeSeries where the data source varies depending on specific conditions. For example, a specific data source may be the preferred source, but if there is a missing value, then another source must be used. This logic can be embedded in the custom source.
  • The need to access information from another database. The custom source can encapsulate the information needed to connect to an external database.

How to create a Custom TimeSeries source

How to create a Custom Relationship source

How to create a Custom RelationshipData source

Context and custom sources


It is possible to create multiple custom sources with the same name. These custom sources will behave differently depending on the context, as determined by the parameter values that are provided.

For example, two custom sources with the same name might behave differently depending on which group of entities is provided. Or the same custom source might behave differently depending on whether the period is ‘DAY’ or ‘MONTH’, or whether the attribute is ‘HISTORICAL’ or ‘FORECAST’.

For a Custom TimeSeries source, the context can consist of one or more of the following:

  • TimeSeries
  • Entities
  • Periods
  • Units
  • Attributes

For a Custom Relationship source, the context can consist of one or both of the following:

  • Relationship
  • Entities

For a Custom RelationshipData source, the context can consist of one or more of the following:

  • TimeSeries
  • Entities
  • Relationship
  • Periods
  • Units
  • Attributes

Use the Context window on the Source tab to set the context by clicking on ‘Add’:

In this example, the ClosePriceStatus custom source applies to the ‘Close Price Movement’ TimeSeries. It is possible to create another custom source called ‘ClosePriceStatus‘ that behaves differently for another TimeSeries:

Note: context settings can consist of formulas that return one or more values, for example a specific set of entities:

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

Back to top