Interactive Statistics Analysis


The Interactive Statistics Analysis resource is identical to the Interactive Risk Analysis resource except for the set of error messages that may be returned. The resource represents a set of ex-post risk, performance and raw data measures that have been calculated interactively on-the-fly given a user provided query. A single Interactive Statistics Analysis query comprises a request for one or more tables of statistics results and each table representing a collection of measures calculated at total level.

The key to understanding the Interactive Statistics 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-statistics-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.

Calculation notes

Pre-calculated statistics may in certain circumstances exhibit differences with respect to calculated statistics:

  • The set of unit prices used under pre-calculated statistics is limited to the set of holdings dates. If there are fewer holdings dates than unit prices dates, this might result in the two approaches using slightly different sets of dates, and thus unit prices, in the calculation.

Media types

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


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

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

The Interactive Statistics 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 Statistics 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 Statistics Analysis resource there can exist zero or more informational messages or errors relating to issues that have occurred in the processing of the interactive statistics 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:

895 - InteractiveStatisticsQueryRequestDataMissing: Occurs when no interactive statistics query is submitted,

896 - InteractiveStatisticsQueryRequestDataNotXml: Occurs when the interactive statistics query submitted is not well-formed Xml.

897 - InteractiveStatisticsQueryRequestFailedSchemaValidation: Occurs when the interactive statistics 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 statistics 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 interactiveStatisticsAnalysis 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.

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
BadCalendarThe value is N/A because the Calendar has no dates.
Benchmark1UndefinedThe value is N/A because Benchmark1 is not specified for {performerName}.performerId
Benchmark2UndefinedThe value is N/A because Benchmark2 is not specified for {performerName}.performerId
Benchmark3UndefinedThe value is N/A because Benchmark3 is not specified for {performerName}.performerId
Benchmark4UndefinedThe value is N/A because Benchmark4 is not specified for {performerName}.performerId
CalendarMaxDateExceededThe period was N/A as a date later than the calendar's latest date was requested.calendarMaxDate
CalendarMinDateExceededThe period was N/A as a date earlier than the calendar's earliest date was requested.calendarMinDate
CurrencyNotFoundCurrency not found.currencyId
DailyFrequencyNotSupportedThe value is N/A because Daily frequency is not supported by the this statistic
DuplicateColumnNameThe columnNode name '{0}' is duplicated.columnName
DuplicateTableNameA duplicate table name has been specified.
EndNotCalendarAlignedThe value is N/A because the statistic requires a {frequencyAdjective} History, and the end date is not a {frequencyAdjective} date.frequencyAdjective
IllegalPartialPeriodThe value is N/A because the date range is a partial period and partial periods are not allowed
InsufficientGainsThe Bull Statistic is N/A because there are too few gains during the period. (Ex-Post Risk Statistics require a minimum of {minResultsForStdDev} {frequencyAdjective} samples).minResultsForStdDev, frequencyAdjective
InsufficientLossesThe Bear Statistic is N/A because there are too few losses during the period. (Ex-Post Risk Statistics require a minimum of {minResultsForStdDev} {frequencyAdjective} samples).minResultsForStdDev, frequencyAdjective
InsufficientSamplesThe Risk Statistic is N/A because the calculation period is too short (Ex-Post Risk Statistics require a minimum of {minResultsForStdDev} {frequencyAdjective} samples).minResultsForStdDev, frequencyAdjective
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.measureId
InvalidPeriodBaseIdThe period baseId '{baseId}' is not recognised. For a list of recognised period baseIds, see the Web API resource for 'Periods for use with Interactive Statistics;.baseId
LessThanYearThe annualised statistic is N/A because the requested period is < 1 year.
MeasureScopeNaThe measure '{seedMeasure}' cannot be interpreted and is not valid at levels higher than Table level.seedMeasure
MissingBenchmarkPerfSeriesThe value is N/A as benchmark '{performerName}' has no performance series.performerId
MissingPortfolioInternalMvSeriesThe value of the 'Internal Market Value' measure is N / A as the portfolio has no internal Market Value series.performerId
MissingPortfolioPerfSeriesThe value is N/A as portfolio '{performerName}' has no performance series for share class '{shareType}' with return type '{returnType}'.performerId, shareClass, returnType
MissingPortfolioQuantitySeriesThe value of the 'Units' measure is N/A as the portfolio has no portfolio-level 'Quantity' time series.performerId
MissingPortfolioTotalAssetsSeriesThe value of the 'External Market Value' measure is N/A as the portfolio has no 'Total Assets' series.performerId
MissingValuationsThe value is N/A because the benchmark does not have valuations for all dates of the main entity.
MultipleParametersInThisNodeCreateChildrenOnly one parameter in a node may create children.
NaForRiskFreeThe measure is N/A as it never applies to risk free rates.
NoBenchmarkGainsThe Bull Return is N/A because there are no benchmark gains during the period.
NoBenchmarkLossesThe Bear Return is N/A because there are no benchmark losses during the period.
NoBmarkThe value is N/A because no benchmark is set for {performerName}.performerId
NoDateThe value is N/A because the start or end date is not specified.
NoHighestFrequencyThe value is N/A because a contiguous set of quarterly, monthly or weekly returns does not exist for the period.
NoHistoryThe value is N/A because no performance history is available for {performerName}.performerId
NoLossThe value is N/A because there is no loss.
NoPerfThisDateThe value is N/A because no performance history is present for the date requested for {performerName}. A calendar, if applied, may also cause certain dates to be ignored.performerId
NoPerfCalendarClosedThisDateThe value is N/A because the calendar is closed for the requested date and with the requested date tolerance.
NoRiskFreeThe value is N/A because no risk free series is specified for {performerName}.performerId
NoValueThisDateThe value was N/A as no history is present for the requested date.performerId
NotANumberThe value is N/A as it is infinite or not a number.
NotRecoveredThe value is N/A because a full recovery did not occur following the maximum loss.
OutsideThisBlockThe value is N/A because the request date is outside of the current Performance Block.
PartialPeriodicDataThe Performance Statistic is N/A because the Performance History is not a complete {frequencyAdjective} series for the specified period for {performerName}.frequencyAdjective, performerId
PerformerNotFoundThe value is N/A because {performerName} was not found.performerId
PeriodHiddenUponRuleThe period is configured to be not applicable for this overall reporting period.
ReturnTypeNotFoundThe value is N/A as {performerName} doesn't support return type '{returnType}'.performerId, returnType
RiskFreeUndefinedThe value is N/A because a Risk Free rate was not specified.
ShareClassNotFoundThe value is N/A as {performerName} doesn't support share class '{shareType}'.performerId, shareClass
StartAfterEndThe period is N/A as the Start Date is after the End Date.
StartNotBeforeEndThe value is N/A because the Start Date is not before the End Date.
TestedStatNotSignificantThe value is N/A because the Tested Statistic is outside its range of significance.
TimeoutThe result could not be obtained due to a Timeout. Please wait a moment and try again.
TotalMeasureInTableWithoutTotalTotal-Level measure requested in table not displaying Total Level. Please delete the measure, or add total-level.
UnchainablePeriodThe value is N/A because the Peformance History for {performerName} forms two or more unchainable blocks for the specified period.performerId
UnexpectedErrorAn unexpected error occurred processing the request (Code: {0}, Class: {1}).errorCode, errorClass
UnitPriceNaForInternalReturnThe value is N/A as the Unit Price is always N/A when Return Type is 'Internal'.
UnitPriceNaForSystemBenchmarksThe value is N/A as the Unit Price for System Benchmarks may not be publicly distributed.
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.
UnsupportedMeasureDataTypeThe rowfilter could not be applied to column {0} as it has an unsupported data type.
PerformerClosedThe performer '{performerName}' has been closed. No interactive analytics can be calculated

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 ‘dataCsv’ Attribute

The dataCsv attribute contains a CSV encoded and escaped array of data items. The selection of data items returned depends on the message id.

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 analytics from a closed portfolio (See id = PerformerClosed) - Mar 2019
  • Added rowNode attributes filter, orderby, skip and top. Added message ids “DuplicateColumnName”, “DuplicateTableName” and “InvalidColumnName” - August 2017
  • Added message ids “NoPerfCalendarClosedThisDate” and “UnitPriceNaForInternalReturn” - March 2017
  • Initial Version - December 2016

Annotated Representation (JSON)



Annotated Representation (XML)



Last updated: August 2019