Interactive Risk Analysis


Overview

The Interactive Risk Analysis resource represents a set of analytics risk results that have been calculated interactively on-the-fly given a user provided query. A single interactive risk analysis query comprises a request for one or more tables of risk results and each table representing a collection of measures calculated at total/segment/security level (or any combination dependent on the levels supported by the chosen measures).

The key to understanding the Interactive Risk Analysis resource is knowing what data can be included in any one request and how to formulate a query for that data. To this end, please see the documentation for the interactive-risk-analysis-query link relation, which contains the full details.

See the annotated representations below for details of how the requested information is contained in XML and JSON representations of the resource.


Media types

The Interactive Risk Analysis resource is exposed via XML and JSON representations, which have the following media type names:- > application/vnd.statpro.revolution.api.interactive-risk-analysis+json

application/vnd.statpro.revolution.api.interactive-risk-analysis+xml

When a response is received from the web service with status 200 (= OK), the fact that the response contains an Interactive Risk Analysis resource representation is indicated by the presence of one of these two response headers:- > Content-Type: application/vnd.statpro.revolution.api.interactive-risk-analysis+json; charset=utf-8

Content-Type: application/vnd.statpro.revolution.api.interactive-risk-analysis+xml; charset=utf-8


The Interactive Risk Analysis resource always links to the Service and Porfolios resources (and to itself). These resources are exposed via the following link relations :-

  • self
  • service
  • portfolios-query

The self link relation identifies the Interactive Risk Analysis resource link for the same analysis. Note that, unlike almost all other self links, the original query data is not contained in the link’s URI. For a new request, the query data must be included in the POSTed entity body.

The service link relation identifies the Service resource link.

The portfolios-query link relation identifies the link that allows a new query for portfolios to be made.


Processing Errors/Messages

Within a single Interactive Risk Analysis resource there can exist zero or more informational messages or errors relating to issues that have occurred in the processing of the interactive risk query. Most issues with the query are picked up by the validation of the well-formedness of the Xml and by the schema validation that takes place when pre-processing the request. In such circumstances we have the following error response codes that can be returned:

867 - InteractiveRiskQueryRequestDataMissing: Occurs when no interactive risk query is submitted,

868 - InteractiveRiskQueryRequestDataNotXml: Occurs when the interactive risk query submitted is not well-formed Xml.

869 - InteractiveRiskQueryRequestFailedSchemaValidation: Occurs when the interactive risk query submitted doesn’t conform to the published schema document (XSD).

839 - PortfolioNotFound: Occurs when an attempt is made to access a portfolio that cannot be found.

840 - AnalysisNotFound: Occurs when an invalid analysis code is specified for the portfolio.

Assuming the interactive risk query has passed all of these validations then it is still possible for messages or errors to be produced. These will be evident by the existence of messages returned in the resource representation. Messages can exist at the top-level underneath the interactiveRiskAnalysis element/property or under a specific table element/property. The ones at the top-level affect all tables in the query, whereas the ones under a specific table relate just to the associated table. Associated with any message or error will be a unique identifier and the message text. Here is a list of the possible messages:

Message ‘class’ Attribute

The class attribute of a message is related to the client action that is recommended in response to the message. This is of particular value in responding appropriately to the large and growing number of possible messages, as it means that specific responses don’t need to be developed for each new specific message (see id attribute).

'class' AttributeMeaningClient Action
ReasonValueIsNotApplicableThe result is benignly null. As the issue is benign, it does not need to be solved and is not an error. Example: When the measure 'Maximum Loss' is null, the reason provided is 'The value is N/A because there is no loss.').No client action is expected. As a result, it is appropriate to hide such exceptions from the user until the user requires greater understanding of the result set.
BusinessWarningThe result is not null, however a functional warning is applicable for this result.Administrative awareness is required so as to determine whether further steps need to be taken.
QueryValidationErrorThe query is invalid, due to a schema validation error of the XML query, or due to invalidity of one of the values within the query.Client developer input is required to fix the query.
BusinessCriticalExceptionThe result is null due to an unexpected error of functional rather than technical origin. This is often related to configuration or data.Client administrative input is required to fix the issue.
TechnicalExceptionThe result is null due to an unexpected error of technical rather than functional origin. The `reproducibility` attribute can then be examined to determine whether the problem is temporary.StatPro technical support is required to resolve reproducible TechnicalExceptions

Message ‘id’ Attribute

The value of the id attribute is unique to each message. Here is a list of the possible messages:

'id' AttributeMessage'dataCsv' Attribute Fields
AdvancedRiskRequiredThe value is N/A as it requires Advanced Risk to be enabled for the portfolio.
BenchmarkIsUnclassifiedThe attribution results are N/A because the benchmark is unclassified.
ClassifierNotFoundOne or more of the classifiers specified are not found.
DayOffsetNotDefinedNo dayOffset has been provided. It must be provided as a parameter of either a columnNode or a rowNode.
DuplicateColumnNameA duplicate table name has been specified. Ensure all table names are unique.
DuplicateTableNameA duplicate column name has been specified. Ensure all column names are unique.
ExceededMaxBenchmarkHoldingsCountRisk cannot be computed as the tenancy maximum benchmark holdings count was exceeded for this portfolio's benchmark.
ExceededMaxPortfolioHoldingsCountRisk cannot be computed as the tenancy maximum portfolio holdings count for risk was exceeded for this portfolio.
InappropriateMeasureThe security-level measure is N/A because security level measures were not requested.
InvalidColumnNameThe table filter / orderBy / skip / top could not be applied, as the name of columnNode '{0}' does not comply with the OData field name specification for TSimpleIdentifier, which is based on the regular expression: "[\p{L}\p{Nl}_][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}".columnName
InvalidMeasureIdThe measureId provided is invalid.
InvalidReferenceDateThe value was N/A because the Reference Date '{0}' was not Found.referenceDate
InvalidStressTestCodeThe stressTestCode provided is invalid.
LiquidityScenarioNotDefinedNo liquidityScenario has been provided. It must be provided as a parameter of either a columnNode or a rowNode.
MissingBenchmarkThere is no constituent level benchmark associated to the portfolio.
MissingHoldingsThe portfolio has no holdings.
RddInThePastThe analysis Holdings Date ({2}) or Reference Date ({1}) settings refer to a date before the Latest Reference Date ({0}). This may prevent the Risk Driver Decomposition analysis from running. Expired assets may contribute to the Residual segment.latestReferenceDate, referenceDate, holdingsDate
RiskFactorDecompositionNotSupportedForHorizonGt1DayA horizon other than daily is not yet supported for Risk Factor Decomposition.
ScenarioIndexNotDefinedNo dayOffset has been provided. It must be provided as a parameter of either a columnNode or a rowNode.
StressTestCodeNotDefinedNo stressTestCode has been provided. It must be provided as a parameter of either a columnNode or a rowNode.
TimeoutThe result could not be obtained due to a Timeout. Please wait a moment and try again.
UnexpectedErrorAn unexpected error occurred processing the request (Code: {0}, Class: {1}).errorCode, errorClass
UnlicensedBenchmarkThe associated benchmark is unlicensed for the portfolio owner.
UnsupportedFeatureMultiRowNodeFilterThe rowNode Filter, Orderby, Skip and Top feature does not yet support tables with more than one rowNode. Please contact StatPro Support to register your interest in extending this feature if you require it. Internal ref: SAAS-18219.
UnsupportedFilterOrderbyTableTypeThe rowfilter is not yet supported for table type '{0}'. Please contact StatPro Support to request its addition.tableType
UnsupportedMeasureDataTypeThe rowfilter could not be applied to column '{0}' as it has an unsupported data type.columnName
PortfolioClosedRiskThe portfolio has been closed. Interactive risk is not supported on closed portfolios.


Message ‘reproducibility’ Attribute

The reproducibility attribute of a message is returned if the Class attribute has a value of “TechnicalException”.

'reproducibility' AttributeMeaningClient Action
RepeatableFaultThe fault is repeatable.please contact StatPro Support with the full error message. The error message should include a "Log Reference".
TransientFaultThe problem is expected to be transient, typically the issue is one-off or is short lived.please retry the call a number of times using an exponential backoff strategy (e.g. wait 1 minute, then again after 2 minutes, 4 minutes, etc).
TimeoutThe call timed out. This usually occurs because too much is being requested in a single query, or because the portfolio or benchmark is too large.Please consider splitting the query into smaller chunks. Retry the call using an exponential backoff strategy after a minimum wait of 1 minute (e.g. wait 1 minute before first retry, 2 minutes before second retry, etc.).

Message ‘columns’ Attribute

The columns attribute contains a comma-delimited list of output column positions (as opposed to column node positions) to which the message applies.

Update history

  • Added reproducibility attribute - August 2019
  • Added new error that can occur when an attempt is made to extract interactive risk analytics from a closed portfolio (See id = PortfolioClosedRisk) - Mar 2019
  • Error id ‘PlatinumRequired’ was retired, being replaced with a new error ‘AdvancedRiskRequired’. Advanced Risk functionality that was previously enabled only for portfolios with a portfolioTier of Platinum is now enabled for portfolios with advancedRiskEnabled status equal to true.
  • Added rowNode attributes filter, orderby, skip and top - August 2017
  • Added message ids: “InvalidColumnName”, “DuplicateColumnName”, “UnsupportedFeatureMultiRowNodeFilter”, “UnsupportedFilterOrderbyTableType”, “UnsupportedMeasureDataType”, “RiskFactorDecompositionNotSupportedForHorizonGt1Day” - August 2017
  • Message id “ExponentialDecayIsTotalOnly” is no longer valid and was removed - January 2017
  • Initial Version - August 2015

Annotated Representation (JSON)

Legend


    


Annotated Representation (XML)

Legend


    


Last updated: August 2019