Functions Data

MetaData

The MetaData() function retrieves information about data in the Quintessence database. For example, MetaData() can be used to list all TimeSeries or reports in the database.

Syntax


MetaData (Type, Parameter, View)

Type The type of data to query, for example, “TIMESERIES”. See the table below for all options.
Parameter This parameter constrains the output data. For example, if one requests type “TIMESERIES” with the parameter “ABC”, the function will return all TimeSeries that entity “ABC” has values for.
View

This parameter takes the form ‘DataView(*):Headers’.

To return specific columns, reference them by name, for example, “DataView(Entity,ValueDate)”.

Using (*) returns all columns.

The value for Headers can be:

    • column (show column headers)
    • row (show row headers, if any)
    • both (show both row and column headers)
    • none (show no headers).

For example, “DataView(*):column” or “DataView():none”

More on Views…

Type of data Parameter value Comment
TIMESERIES Null / Entity Retrieve all TimeSeries maintained for an entity. If NULL, it returns all TimeSeries in Quintessence.
TSVD TimeSeries Retrieve all TimeSeries value definitions associated with a TimeSeries
RELATIONSHIP Null / Entity Retrieve all relationships maintained for an entity. If NULL, it returns all relationships in Quintessence.
USERS Null Retrieve the names of all Quintessence users
REPORTS Null Retrieve the names of all reports created in Quintessence
REPORTPARAMETERS ReportName Retrieve a list of all parameters used in a Quintessence report
QUALITATIVESETS Null Retrieve a list of all Qualitative Sets
QUALITIES QualitativeSet Retrieve a list of all the Qualities in a Qualitative Set
CURRENCY Null Retrieve a list of all currencies in Quintessence
EXCHANGE Null Retrieve a list of all exchanges in Quintessence
COUNTRY Null Retrieve a list of all countries in Quintessence
AUTHOR Null Retrieve a list of all authors in Quintessence

Examples


Example 1. Return all TimeSeries

Example 2. Return all TimeSeries for an Entity

Example 3. Return the Value Definitions for a TimeSeries

Example 4. Return all Relationships

Example 5. Return all Users

Example 6. Return all Reports

Example 7. Return the parameters for a report

Example 8. Return all Qualitative Sets

Example 9. Return the qualities that make up a Qualitative Set

Example 10. Return all Country Codes

Note:

How your system administrator configured Quintessence determines which function parameters are required. In most implementations, administrators configure functions so that certain parameters default to specific values when left blank.

Example 1. Return all TimeSeries


In this example, the MetaData() function retrieves a list of the TimeSeries defined in Quintessence. The entity code parameter is left blank.

Function
=MetaData(“TimeSeries”,,”Dataview(*):Column”)
Output
Name DataType IsRelationship
Accrued Income Numeric TRUE
Accrued Interest Numeric FALSE
Adjustment Factor Numeric FALSE
All In Price Numeric FALSE
Asset Class Text FALSE
Asset Subclass Text FALSE
Associates Numeric FALSE

The name of the TimeSeries is shown in the first column. The second column specifies the type of the TimeSeries. The last column specifies whether this is an entity TimeSeries or relationship TimeSeries. In this example, “Accrued Income” is the only relationship TimeSeries.

Example 2. Return all TimeSeries for an Entity


In this example, the MetaData() function retrieves a list of all TimeSeries that are maintained for an entity with the code “ABC”.

Function
=MetaData(“TimeSeries”,”ABC123″,”Dataview(*):Column”)
Output
Name DataType IsRelationship
Cost Numeric TRUE
Effective Exposure Numeric TRUE
Holding Numeric TRUE
Market Value Numeric TRUE
Name Text FALSE
Total Return Numeric FALSE

Example 3. Return the Value Definitions for a TimeSeries


In this example, the MetaData() retrieves a list of the TimeSeries value definitions (TSVD) that are associated with the “Total Return” TimeSeries.

Function
=MetaData(“TSVD”,”Total Return”,”Dataview(*):Column”)
Output
TimeSeries Unit Period Provider Author Attributes
Total Return ZAR D PortfolioAdministrator1 na
Total Return ZAR D MarketDataProvider1 na
Total Return ZAR YtD StockExchange1 na
Total Return ZAR Y StockExchange1 na
Total Return BWP D PortfolioAdministrator1 na
Total Return USD D MarketDataProvider2 na

The output shows the currencies, periods, sources and attributes available for this TimeSeries.

Example 4. Return all Relationships


In this example, the MetaData() function retrieves a list of the relationships defined in the database.

Function
=MetaData(“Relationship”)
Output
Analyst
Benchmark
Category
Classification
Constituent
Exchange

Example 5. Return all Users


In this example, the MetaData() function retrieves a list of all registered users of Quintessence.

Function
=MetaData(“Users”,,”Dateview(*):Column”)
Output
Name Surname UserName Disabled Disabled Date
Richard Smith richards TRUE 2013/11/20
James Jones jamesj FALSE
Nick Brown NB FALSE
David Green DG TRUE 2014/08/15
Ziyaad Fakier ZF FALSE

The users names and surnames are displayed. If the user has a code, the code is displayed, otherwise their windows login name is displayed. The output also shows whether the user has been disabled or not, and if so, the date they were disabled.

Example 6. Return all Reports


In this example, the MetaData() function retrieves a list of the reports created in Quintessence.

Function
=MetaData(“Reports”,,”Dateview(*):Column”)
Output
Name Description Type
MarketValueReport A report that shows the market value of a portfolio’s constituents CalculatedReport
ClosePriceReport A report that shows close prices for an instrument CalculatedReport
ObjectiveWeights Constituents and weights CalculatedReport
RelativeReturns RelativeReturns report CalculatedReport

The name, description and type of each report is shown.

Example 7. Return the parameters for a report


In this example, the MetaData() function retrieves the list of parameters used in a specific report.

Function
=MetaData(“ReportParameters”,”RelativeReturns”,”Dateview(*):Column”)
Output
Name Type Description
Code Text The code for which we want the returns
HoldingSource Text The source where we will get the holdings
BasketSource Text The basket source of the portfolio or benchmark
ReturnSource Text The source where we get the returns from

The output shows that four parameters are required by the RelativeReturns report. The name, type and description of each parameter is shown.

Example 8. Return all Qualitative Sets


In this example, the MetaData() function retrieves a list of all qualitative sets defined in Quintessence.

Function
=MetaData(“QualitativeSets”)
Output
Classification s
Potential Changes
USD Exposure
Recommendations

The output displays the names of the four defined qualitative sets.

Example 9. Return the qualities that make up a Qualitative Set


In this example, the MetaData() function retrieves a list of all qualities making up the “Recommendations ” qualitative set.

Function
=MetaData(“Qualities”,”Recommendations “,”Dataview(*):Column”)
Output
Name Description
BUY Buy signal
HOLD Hold signal
SELL Sell signal

The example shows the three qualities associated with the “Recommendations” qualitative set.

Example 10. Return all Country Codes


In this example, the MetaData() function retrieves a list of all the country codes defined in Quintessence.

Function
=MetaData(“Country”,,”Dataview(*):Column”)
Output
Code
ABW
AFG
AIA:ISO3 Country Code
ALB
ARG
BEL:ISO3 Country Code
BEN

The output displays all country codes defined in Quintessence.