StatPro Revolution Web API


The interactive-risk-analysis-query Link Relation


Overview

The interactive-risk-analysis-query link relation identifies a link that targets the Interactive Risk Analysis resource, which is accessed using the HTTP POST method. The Interactive Risk Analysis resource is able to provide a variety of risk analytics that are calculated on-the-fly when a request is submitted. The body of the POSTed request must contain an XML document which a client application can configure which tables, rows and columns are to be returned in the resource.

The XML document submitted in the payload of the POST request must conform to a published schema document (XSD) in order for the request to be successful. The interactive-risk-analysis-query link relation shares its basic behavior and grammar for tables, rows, columns, results and error messages with interactive-statistics-analysis-query, differing only in the set of relevant measures and parameters.

There are two useful resources that are useful to be familiar with when formulating Interactive Risk Analysis queries. These are:

When an Interactive Risk Analysis has been successfully submitted, and a response is received with status 200 (= OK) then the resource in the appropriate Json or XML representation is produced. For details of the response, refer to the Interactive Risk Analysis resource page.


Query Structure

An interactive risk analysis query is composed of two main parts. The first part is optional and represents a set of global parameters to apply to all tables in the query. The second part represents the tables of data to extract in the query:

Figure 1 - Fragment of main query structure:

<interactiveRiskQuery xmlns="http://statpro.com/2012/Revolution">
  <parameters>...</parameters>   -- Optional parameters
  <tables>...</tables>
</interactiveRiskQuery>

If no parameters are supplied underneath the root interactiveRiskQuery element then the default values will be extracted from the associated portfolio analysis. These parameters represent the global parameters applied to all tables in the query. Most of these parameters can also be overridden at row level or column level. For further details of the available parameters and which can be overridden at row or column level refer to the Parameters section.

Tables

The tables element represents a collection of tables to extract in the query. There has to be at least one table defined in the tables collection. Here is an example of a single table which can exist within the tables element:

Figure 2:

<table name="AttributionExample" type="PortfolioDrillDown">
  <rowNodes>
    <rowNode>
      <levels includeTotalLevel="true" maxSegmentLevel="2" includeSecurityLevel="true" />
    </rowNode>
  </rowNodes>
  <columnNodes>
    <columnNode>
      <measureId>Id</measureId>
    </columnNode>
    <columnNode>
      <measureId>ParentId</measureId>
    </columnNode>
    <columnNode>
      <measureId>SegmentSortOrder</measureId>
    </columnNode>
    <columnNode>
      <measureId>Name</measureId>
    </columnNode>
    <columnNode>
      <name>Allocation Effect (Average VaR)</name>
      <measureId>AverageVar.EffectAlloc.Cash</measureId>
    </columnNode>
    <columnNode>
      <name>Selection Effect (Average VaR)</name>
      <measureId>AverageVar.EffectSel.Cash</measureId>
    </columnNode>
  </columnNodes>
</table>  

A table must specify a user-defined name attribute which must be unique across all tables within the collection of tables. This name will be emitted in the results of the interactive risk query. All tables must also define a type attribute. Different table types support different measures and have different characteristics and different levels at which data can be extracted. See the list of supported Interactive Risk Analysis measures for further details of what interactive risk measures are supported for each table type. Three table types are supported:

  • PortfolioDrillDown - A table that supports a drill-through from total, segment and security level. This is the most common table type which supports a large number of measures.
  • ExpectedDistribution - A table that allows for extracting total level results only, where each row represents a single historical date. This can be used for extraction of the total profit and loss values across the portfolio's (or benchmark's) history. This table type only currently supports a small number of measures as it is only intended for generating expected distribution data at total portfolio level.
  • RiskFactorDecomposition - A table that decomposes a portfolio into its constituent risk factors.

Row Nodes

Associated with any table is a single collection of rowNodes. A rowNode element instructs what form the rows within the table may take (e.g. total level, segment level etc) and allows for optionally overriding the global parameters that may have been specified underneath the parameters element. (See figure 2 for an example).

One of the primary functions of a rowNode is to define the levels at which the results may be extracted (PortfolioDrillDown table type only - See notes on RowNodes). This is defined in the optionally specified levels element within a rowNode. A levels element supports the following three attributes which must all be specified when a levels element is introduced to a rowNode:

  • includeTotalLevel - Specify as "true" to allow inclusion of a total level in the results for the table. Note that inclusion will only occur if measures relevant to total-level have been requested. Specify as "false" to not include total level results.
  • maxSegmentLevel - This can be an integer value between 0 and 3. A value of zero indicates that no segment level results are to be extracted. All values greater than zero signal to extract all segment levels up to that level (assuming that many segment levels are available). So for example, if a portfolio is broken down by 'GICS Sector' then 'Country' and then 'Currency', then if a value of 2 is specified for the maxSegmentLevel attribute, then results will be extracted to 'GICS Sector' and 'Country' but not 'Currency'. Note that segment level will only be returned if measures relevant to segment-level have been selected.
  • includeSecurityLevel - Specify as "true" to allow inclusion of security level results or "false" to not. Note that inclusion will only occur if measures relevant to security-level have been requested.

Aside from specifying the levels at which the data within the table will be extracted, a rowNode can also be used to specify parameter overrides. For further details of this please refer to the Parameters section.

Notes on Row Nodes

  • Although the levels element indicates the intention to extract results at the various levels defined by the three attributes, all interactive risk measures have supported levels. Please refer to the columns 'Has Security Level', 'Has Total Level' and 'Max Segment Level' columns within the list of supported Interactive Risk Analysis measures for details of their applicability. An attempt to extract a measure at an unsupported level will result in no value being extracted at those levels.

  • Currently, only one rowNode is supported within the collection of rowNodes. In future it may be possible to have multiple sets of rowNodes to support nested set of results.

  • For tables which are defined as being an 'ExpectedDistribution' table type, the levels element can be specified but will be ignored since this table type is implicitly only able to extract results at total level. For this table type a rowNodes element should still be specified containing a single empty rowNode element (unless any parameter overrides are to be applied in which case the additional parameter elements can exist within the rowNode element).

Row Filtering, Ordering, Slicing

A rowNode may be decorated with optional attributes filter, orderBy, skip and top. For a general introduction on filtering, ordering and slicing, refer to the portfolios-query link relation. These attributes are based on ODATA 4.0 system query options syntax.

Note that the implementation of these string functions departs deliberately from the ODATA specification in being case-insensitive.

Supported Operators and Functions:

  • ( )
  • and
  • or
  • not
  • eq
  • ne
  • gt
  • ge
  • lt
  • le
  • contains( , )
  • startswith( , )
  • endswith( , )

Example Query:

The table types 'PortfolioDrilldown' and 'RiskFactorDecomposition' return multiple segment levels. To select the child segments of a segment, the rowNode is filtered on the 'ParentId' measure, setting it equal to the value of the parent segment's 'Id' measure. Note that no child segments will be returned for a segment whose 'IsLeafLevel' measure equals 'true'. Results can be paged using the skip and top attributes of a rowNode. In the following example, the first three children of a parent segment are extracted; its Id is 'EquityVol;87829;87760':

<interactiveRiskQuery xmlns="http://statpro.com/2012/Revolution">
  <tables>
    <table name="RiskFactorDecomposition" type="RiskFactorDecomposition">
      <rowNodes>
        <rowNode filter="ParentId eq 'EquityVol;87829;87760'" orderBy="VarContributionCash" skip="0" top="3">
          <horizon>1</horizon>
          <levels includeTotalLevel="false" maxSegmentLevel="5" includeSecurityLevel="false" />
          <riskFactorDecompositionForIssuer>SectorThenRating</riskFactorDecompositionForIssuer>
        </rowNode>
      </rowNodes>
      <columnNodes>
        <columnNode><measureId>IsLeafLevel</measureId></columnNode>
        <columnNode><measureId>SegmentLevel</measureId></columnNode>
        <columnNode><measureId>ParentId</measureId></columnNode>
        <columnNode><measureId>Id</measureId></columnNode>
        <columnNode><measureId>Name</measureId></columnNode>
        <columnNode><measureId>ValueAtRisk.Contribution.Pc</measureId></columnNode>
        <columnNode><name>VarContributionCash</name><measureId>ValueAtRisk.Contribution.Cash</measureId></columnNode>
      </columnNodes>
    </table>
  </tables>
</interactiveRiskQuery>

Results for this Example Query:

<?xml version="1.0" encoding="utf-8"?>
<interactiveRiskAnalysis xmlns="http://statpro.com/2012/Revolution">
  ...
  <tables>
    <table name="RiskFactorDecomposition">
      <messages />
      <resultsCsv>IsLeafLevel,SegmentLevel,ParentId,Id,Name,ValueAtRisk.Contribution.Pc,VarContributionCash
true,4,EquityVol;87829;87760,EquityVol;87829;87760;revo-MXP001691213,AMERICA MOVIL S.A.B. DE C.V. - L,0.084254766006919876,1750.3904529072
true,4,EquityVol;87829;87760,EquityVol;87829;87760;revo-ES0178430E18,TELEFONICA SA,0.085199844649736761,1770.0244357907
true,4,EquityVol;87829;87760,EquityVol;87829;87760;revo-US92343V1044,VERIZON COMMUNICATION INC,0.17604678784340883,3657.3671889466</resultsCsv>
    </table>
  </tables>
</interactiveRiskAnalysis>

Column Nodes

After the rowNodes element a table must define a collection of columnNodes comprising at least one columnNode element. The set of columnNodes represents the set of columns to extract within the table. A single columnNode element is made up of a mandatory measureId element, an optional name element and some optional parameter overrides to apply to the column. Here is an example of a set of columnNodes:

Figure 3 - Example of column nodes:

  <columnNodes>
    <columnNode>
      <measureId>Name</measureId>
    </columnNode>
    <columnNode>
      <confidenceInterval>0.95</confidenceInterval>
      <name>Value at Risk (95% confidence interval)</name>
      <measureId>ValueAtRisk.Pc</measureId>
    </columnNode>
    <columnNode>
      <name>Historic Stress Test (%)</name>
      <measureId>StressValue.Pc</measureId>
      <stressTestCode>SP_HistoricST01</stressTestCode>
    </columnNode>
    <columnNode>
      <name>Total Liquidity Risk - Normal Market Conditions</name>
      <measureId>LiqRiskTotal.Cash</measureId>
      <liquidityScenario>NormalConditions</liquidityScenario>
    </columnNode>
    <columnNode>
      <name>P&amp;L for T-3</name>
      <measureId>ExpectedDistPandL.Cash</measureId>
      <dayOffset>3</dayOffset>
    </columnNode>
  </columnNodes>

This collection of column nodes includes five columns. All of them have a measureId element corresponding to a value from the list of supported Interactive Risk Analysis measures.

The first column above represents the Name measure which returns one of 'Total', the segment name or the security name depending on the level at which the results are calculated. This columnNode has no name element which means that in the resultset produced for the table, the column will be labelled with the measureId as the column header. If a name element is specified as in all the other five columns, then this will be used as an alias for the column header in the resultset for that table.

The second columnNode in the collection of column nodes shows an example of a parameter being overridden in the columnNode; in this instance the confidenceInterval parameter signalling to the interactive risk calculation to override whatever value has been specified in the rowNode or global parameters. For further details regarding overriding parameters refer to the Parameters section.

The third columnNode in the collection shows an example of a stress test measure being extracted. There are some types of measures for which additional parameters must be specified in order for the measure to be successfully calculated. A stress test measure is an example of this. In this instance the StressValue.Pc measure requires a stressTestCode to additionally be specified as a mandatory parameter to indicate which stress test to apply. A stressTestCode must be specified from the full list of available stress tests. To understand which measures require additional Mandatory Parameters refer to the list of supported Interactive Risk Analysis measures and refer to the Mandatory Parameter column in the table.

The fourth columnNode in the collection shows an example of a liquidity risk measure being extracted. This is another special type of measure, similar to the stress test measures, which requires an additional Mandatory Parameter to be specified. In this instance the mandatory parameter is the liquidityScenario which indicates the level of market conditions to be applied to the liquidity risk measure. A liquidityScenario can have one of three possible values:

  • NormalConditions
  • StressedConditions
  • HighlyStressedConditions

The fifth columnNode in the collection shows an example of an expected distribution risk measure being extracted. This is another special type of measure requiring an additional Mandatory Parameter to be specified. In this case the mandatory parameter is the dayOffset element which represents an integer value greater than or equal to zero and indicates the number of business days offset backwards from the latest date at which risk results are available. So in this example, a value of '3' indicates that the profit and loss (P&L) cash amount will be extracted for three days prior to the latest date. A value of zero indicates the latest P&L. These measures can be used to derive the full expected distribution for any segments / securities. NOTE: For extracting this at total level, it is recommended to use a table type of 'ExpectedDistribution' as this automatically extracts the full history of P&L values without having to configure lots of columnNodes with a different dayOffset for each column.


Parameters

The optional parameters section within the main interactiveRiskQuery node represent the global parameters for all tables in the query. Most of these parameters can additionally be defined at the rowNode and columnNode level too. For further details of the rules employed when applying the parameters refer to the Parameter Hierarchy section.

It is important to note that if specifying parameters, the order they are specified is a strict order defined in the published schema document (XSD). If specifying parameter overrides within a rowNode or columnNode, the parameter elements must come before the elements specific to the rowNode or columnNode. This is because the schema is making use of inheritance to inherit the core base parameters and unfortunately XSD is restricted to only use 'xs:sequence' and doesn't support 'xs:all' when using type inheritance ('sequences' define a strict order of elements whereas 'all' allow any order of elements).

By omitting the global parameters section, the portfolio analysis's default set of settings are automatically applied at a global level.

Here is a full list of all of the available parameters that can be configured and details their applicability in terms of where they can be used:

Parameter Element Name Description Scope Type
horizon The number of days into the future risk is being projected. Minimum value is 1. All Int
confidenceInterval The degree of confidence with which we are to compute risk (e.g. 0.9 represents a 90% confidence interval). Acceptable values are between 0.9 and 0.9999 inclusive. All Decimal
exponentialDecay The decay factor to use if applying exponential weighting. Acceptable values are between 0 and 1 exclusive. This parameter is only applied for measures identified in the list of supported Interactive Risk Analysis measures as being compatible with exponential weighting. All Decimal
history The number of days history to use when calculating the risk (e.g. 730 represents two years and 365 is one year). Acceptable values are between 144 and 800 inclusive. All Int
expectedDistributionFrequency The frequency of expected distribution data to use when calculating risk. Acceptable values are "Daily" or "Weekly". All String
valueRisked Represents whether we are using a market value or an exposure approach to calculating risk. Acceptable values are "MarketValue" or "RiskExposure". All String
uncoveredSecurities Determines whether we are including or excluding uncovered assets when computing risk. Acceptable values are "Include" or "Exclude". All String
target Determines whether the context of the risk calculation is for the portfolio, benchmark or relative. Acceptable values are "Portfolio", "Benchmark" or "Relative". This parameter is applied for measures identified by the 'Uses Target' column in the list of supported Interactive Risk Analysis measures. It is used to "target" the calculation of the associated measure to either portfolio, benchmark or relative level. All String
selectionMethod Determines the selection method to use for the risk attribution calculation. Acceptable values are "ZeroInteraction", "PortfolioWeighted" or "BenchmarkWeighted". The default is "ZeroInteraction". All String
weightsBasedBenchmarksMarketValueMode Determines how the market value is determined for the weights-based benchmarks. Acceptable values are "Exposure" or "MarketValue". All String
levels Indicates the levels with which to extract data (e.g. total level, segment level and/or security level; PortfolioDrillDown table type only). See Row Nodes section RowNode Attributes*
riskFactorDecompositionForIssuer Determines how the Issuer will be decomposed. Applies only when the Table type = RiskFactorDecomposition. Acceptable values are "SectorThenSubsectorThenRating", "SectorThenRating", "RatingThenSectorThenSubsector" or the default value "RatingThenSector". Row Node String
stressTestCode The code of a stress test - applies in the context of certain stress test related measures. See the list of supported stress tests for all available stress tests. Row and Column Node String
liquidityScenario The market conditions (scenario) to apply to the liquidity risk measures - applies in the context of certain liquidity risk related measures. See Column Nodes section for example. Row and Column Node String
dayOffset The market conditions (scenario) to apply to the liquidity risk measures - applies in the context of certain liquidity risk related measures. Row and Column Node Int
currencyIsoCode The currency ISO code corresponding to the currency with which to calculate risk. If left unspecified then the default portfolio base currency will be used. Global parameters String
portfolioBenchmarkRescalingMode Determines whether the portfolio benchmark quantities are rescaled (or not) against the portfolio outstanding. Acceptable values are "Rescaled" or "Unrescaled". Global parameters String
classifiers If this parameter is specified then the classifiers specified in the portfolio analysis will be overridden with the ones specified in this parameter. Global parameters Xml**


*The levels element is always an empty element that has three mandatory values specified in the attributes (See the Row Nodes section for further details).

** The classifiers parameter is an optional Xml parameter that allows overriding the default classifiers associated with the portfolio analysis. If the classifiers parameter is specified, then the entirety of the classifier structure associated with the portfolio analysis will be overridden. For example, it is not possible just to override one of the classifiers associated with the portfolio analysis - only to completely re-specify the classifier structure. An example of how to specify this is in Figure 4 below. See full details in the published schema document (XSD) and refer to the st:Classifiers complex type for the other child elements that can be specified in this Xml parameter. In order to identify the classifier identifiers to submit in these classifier parameters refer to the id element of a classifier from the Classifiers resource.

Figure 4 - Example of overriding classifiers:

<interactiveRiskQuery xmlns="http://statpro.com/2012/Revolution">
  <parameters>
    <classifiers>
      <classifier1Id>7F6AF30F-A67D-438E-AD16-4D44E89E854C</classifier1Id>
      <classifier2Id>B0690B24-1845-40D4-83C6-C81EDCC25362</classifier2Id>
    </classifiers>
  </parameters>
  <tables>...</tables>
</interactiveRiskQuery>


Parameter Hierarchy

When the Web API applies parameters there is a hierarchy regarding how they are applied depending on what levels the parameters are defined. The hierarchy of how parameters are applied is as follows (1 = Highest precedent, 4 = Lowest precedent):

  1. Column Node - parameters defined at this level take the highest precedent.
  2. Row Node - parameters defined at this level can only be overridden by parameters specified at the columnNode level.
  3. Global Parameters - parameters defined at this level are the explicitly specified global defaults intended to be applied to all tables in the interactive risk query. Overrides can be applied to these settings at the rowNode and columnNode levels.
  4. Portfolio Settings - these are the parameters defined in the portfolio settings and not actually specified in the interactive risk query. These will be applied as global defaults should no global defaults be specified (or in the case of some settings which don't have corresponding portfolio settings, a suitable default is used).

Note: Not all parameters are applicable at each level in the hierarchy. Refer to the table of parameters above and refer to the 'Scope' column in the Parameters section for details of where parameters can be specified.


Fair Usage Policy Implications

Despite the relatively small size of its output resource representations (in XML or JSON), a very large amount of data extraction and data processing may be performed by the server to produce all of the Interactive Risk Analysis numbers. For this reason, the Interactive Risk Analysis resource is considered to be an exceptional case with respect to the Web API's Fair Usage Policy.

Whereas a request for most resources is counted as being just one request by the Fair Usage Policy, a single request for the Interactive Risk Analysis resource may be counted as being more than one request. The actual number depends on the requested numbers of measures across all tables and the number of levels required to extract within each table. It is given by this formula:-

num_requests = ceiling(sum_across_all_tables((columns_per_table * levels_per_table)) / 500)

For example, if a query has three tables:

  • One table containing an 'ExpectedDistribution' table type with three columns (i.e. one level in total as Expected Distribution is a total level only table type).
  • One table containing a 'PortfolioDrillDown' table type with 100 measures at total level, 3 segment levels and security level (i.e. 5 levels in total).
  • One table containing a 'PortfolioDrillDown' table type with 60 measures at total level and up to the first segment level (i.e. 2 levels in total).

This would result in the following cost:-

ceiling((3 * 1) + (100 * 5) + (60 * 2)) / 100) = ceiling(1.246) = 2

which means that the single request for Interactive Risk Analysis data would be counted as 2 requests by the Fair Usage Policy.



Sample Query

An Interactive Risk Analysis query is expressed in XML form, and must be included in the entity body of the POSTed request to this link relation's identified URI. Here is an example of a sample XML query. Alternatively, it can be downloaded here :-

<interactiveRiskQuery xmlns="http://statpro.com/2012/Revolution">
  <parameters>
    <horizon>1</horizon>
    <confidenceInterval>0.95</confidenceInterval>
    <history>730</history>
    <expectedDistributionFrequency>Daily</expectedDistributionFrequency>
    <valueRisked>MarketValue</valueRisked>
    <uncoveredSecurities>Exclude</uncoveredSecurities>
  </parameters>
  <tables>
    <table name="AttributionExample" type="PortfolioDrillDown">
      <rowNodes>
        <rowNode>
          <levels includeTotalLevel="true" maxSegmentLevel="2" includeSecurityLevel="true" />
        </rowNode>
      </rowNodes>
      <columnNodes>
        <columnNode>
          <measureId>Id</measureId>
        </columnNode>
        <columnNode>
          <measureId>ParentId</measureId>
        </columnNode>
        <columnNode>
          <measureId>SegmentSortOrder</measureId>
        </columnNode>
        <columnNode>
          <measureId>Name</measureId>
        </columnNode>
        <columnNode>
          <measureId>AverageVar.EffectAlloc.Cash</measureId>
        </columnNode>
        <columnNode>
          <measureId>AverageVar.EffectSel.PcTotal</measureId>
        </columnNode>
        <columnNode>
          <target>Portfolio</target>
          <measureId>RiskWeightComputableAssets</measureId>
        </columnNode>
        <columnNode>
          <target>Benchmark</target>
          <measureId>RiskWeightComputableAssets</measureId>
        </columnNode>
        <columnNode>
          <target>Portfolio</target>
          <measureId>RiskExposure</measureId>
        </columnNode>
        <columnNode>
          <target>Benchmark</target>
          <measureId>RiskExposure</measureId>
        </columnNode>
      </columnNodes>
    </table>
    <table name="SecurityDetails" type="PortfolioDrillDown">
      <rowNodes>
        <rowNode>
          <uncoveredSecurities>Include</uncoveredSecurities>
          <levels includeTotalLevel="false" maxSegmentLevel="0" includeSecurityLevel="true" />
        </rowNode>
      </rowNodes>
      <columnNodes>
        <columnNode>
          <measureId>Name</measureId>
        </columnNode>
        <columnNode>
          <measureId>Classification1Id</measureId>
        </columnNode>
        <columnNode>
          <measureId>Classification1Name</measureId>
        </columnNode>
        <columnNode>
          <measureId>Classification1Sort</measureId>
        </columnNode>
        <columnNode>
          <measureId>Classification2Id</measureId>
        </columnNode>
        <columnNode>
          <measureId>Classification2Name</measureId>
        </columnNode>
        <columnNode>
          <measureId>Classification2Sort</measureId>
        </columnNode>
        <columnNode>
          <measureId>Classification3Id</measureId>
        </columnNode>
        <columnNode>
          <measureId>Classification3Name</measureId>
        </columnNode>
        <columnNode>
          <measureId>Classification3Sort</measureId>
        </columnNode>
        <columnNode>
          <measureId>FxRate</measureId>
        </columnNode>
        <columnNode>
          <measureId>IsLiquid</measureId>
        </columnNode>
        <columnNode>
          <measureId>Price</measureId>
        </columnNode>
        <columnNode>
          <measureId>PriceCurrency</measureId>
        </columnNode>
        <columnNode>
          <measureId>Quantity</measureId>
        </columnNode>
        <columnNode>
          <measureId>RiskEnabled</measureId>
        </columnNode>
        <columnNode>
          <measureId>RiskInternalDescription</measureId>
        </columnNode>
        <columnNode>
          <measureId>RiskMarketValueAllAssets</measureId>
        </columnNode>
        <columnNode>
          <measureId>RiskPricer</measureId>
        </columnNode>
        <columnNode>
          <measureId>SecurityId</measureId>
        </columnNode>
        <columnNode>
          <measureId>SecurityInstrumentCombination</measureId>
        </columnNode>
        <columnNode>
          <measureId>SecurityRiskCode</measureId>
        </columnNode>
        <columnNode>
          <measureId>WarningExcluded</measureId>
        </columnNode>
        <columnNode>
          <measureId>WarningNoPrices</measureId>
        </columnNode>
        <columnNode>
          <measureId>WarningNotComputable</measureId>
        </columnNode>
        <columnNode>
          <measureId>WarningPriceIsEstimated</measureId>
        </columnNode>
      </columnNodes>
    </table>
    <table name="ExpectedDistribution" type="ExpectedDistribution">
      <rowNodes>
        <rowNode />
      </rowNodes>
      <columnNodes>
        <columnNode>
          <measureId>Date</measureId>
        </columnNode>
        <columnNode>
          <name>VarCash</name>
          <measureId>Value.Cash</measureId>
        </columnNode>
        <columnNode>
          <name>VarPercent</name>
          <measureId>Value.Pc</measureId>
        </columnNode>
        <columnNode>
          <target>Relative</target>
          <name>VarCashRel</name>
          <measureId>Value.Cash</measureId>
        </columnNode>
        <columnNode>
          <target>Relative</target>
          <name>VarPercentRel</name>
          <measureId>Value.Pc</measureId>
        </columnNode>
      </columnNodes>
    </table>
    <table name="StressTests and Liquidity Risk" type="PortfolioDrillDown">
      <rowNodes>
        <rowNode>
          <levels includeTotalLevel="true" maxSegmentLevel="1" includeSecurityLevel="false" />
          <liquidityScenario>StressedConditions</liquidityScenario>
        </rowNode>
      </rowNodes>
      <columnNodes>
        <columnNode>
          <measureId>Name</measureId>
        </columnNode>
        <columnNode>
          <name>StressValue.Cash</name>
          <measureId>StressValue.Pc</measureId>
          <stressTestCode>SP_HistoricST01</stressTestCode>
        </columnNode>
        <columnNode>
          <name>Total Liquidity Risk - Normal Override</name>
          <measureId>LiqRiskTotal.Cash</measureId>
          <liquidityScenario>NormalConditions</liquidityScenario>
        </columnNode>
        <columnNode>
          <name>Total Liquidity Risk - Stressed</name>
          <measureId>LiqRiskTotal.Cash</measureId>
        </columnNode>
      </columnNodes>
    </table>
    <table name="RiskFactorDecomposition" type="RiskFactorDecomposition">
      <rowNodes>
        <rowNode orderBy="VarContrCash desc">
          <horizon>1</horizon>
          <levels includeTotalLevel="false" maxSegmentLevel="5" includeSecurityLevel="false" />
          <riskFactorDecompositionForIssuer>SectorThenRating</riskFactorDecompositionForIssuer>
        </rowNode>
      </rowNodes>
      <columnNodes>
        <columnNode><measureId>Name</measureId></columnNode>
        <columnNode><measureId>SegmentLevel</measureId></columnNode>
        <columnNode><measureId>IsLeafLevel</measureId></columnNode>
        <columnNode><measureId>IsRiskFactorLevel</measureId></columnNode>
        <columnNode><measureId>ParentId</measureId></columnNode>
        <columnNode><measureId>Id</measureId></columnNode>
        <columnNode><name>VarContrPc</name><measureId>ValueAtRisk.Contribution.Pc</measureId></columnNode>
        <columnNode><name>VarContrCashPcOfTotal</name><measureId>ValueAtRisk.Contribution.PcOfTotalValue</measureId></columnNode>
        <columnNode><name>VarContrCash</name><measureId>ValueAtRisk.Contribution.Cash</measureId></columnNode>
      </columnNodes>
    </table>
  </tables>
</interactiveRiskQuery>

See the schema document (XSD) for the query for further details.


Update history

  • Added rowNode attributes filter, orderby, skip and top - August 2017
  • Added support for Risk Factor Decomposition, see sample query, see parameter riskFactorDecompositionForIssuer, and see new Table Type "RiskFactorDecomposition" in the list of measures - August 2017
  • Added support for overriding the classifiers - November 2015
  • Initial Version - August 2015


Last updated: August 2017


To Top