StatPro Revolution Web API

The Interactive Statistics Analysis Resource


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.

Media types

The Interactive Statistics Analysis resource is exposed via XML and JSON representations, which have the following media type names:-



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

Related resources

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' Attribute Meaning Client 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.StatPro technical support is required to resolve the issue.

Message 'id' Attribute

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

'id' Attribute Message '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.

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 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)


  "interactiveStatisticsAnalysis": {
    "links": {
      "service": {
        "rel": "service",
        "href": "...",
        "type": "application/vnd.statpro.revolution.api.service+json"
      "portfoliosQuery": {
        "rel": "portfolios-query",
        "href": "...?$filter={filter}&$orderby={orderby}&$skip={skip}&$top={top}&includePublishedPortfolios=false&portfolioClassifierCode=",
        "type": "application/vnd.statpro.revolution.api.portfolios+json"
      "self": {
        "rel": "self",
        "href": "...",
        "type": "application/vnd.statpro.revolution.api.interactive-statistics-analysis+json"
    "messages": [
        "class": "QueryValidationError",
        "id": "DuplicateTableName",
        "message": "A duplicate table name has been specified.  Ensure all table names are unique."
    "tables": [
        "name": "StandardPeriods",
        "messages": [],
        "resultsCsv": [
          "1 Day,-0.6678746615784,-0.5327020591042,-0.1351726024742",
          "1 Week,0.40589866635,0.525088035798,-0.119189369448",
          "1 Month,-3.515129080366,-3.0849610298809,-0.4301680504851",
          "3 Months,-5.2508857969226,-5.7262166087696,0.475330811847",
          "6 Months,-1.2055363970878,-0.182654201516,-1.0228821955718",
          "1 Year,-1.2343105001277,0.253985715552,-1.4882962156797",
          "2 Years,23.137847726655,26.079725072551,-2.941877345896",
          "3 Years,7.61807983509,8.685458718934,-1.067378883844"
        "name": "TriangleMatrix",
        "messages": [
            "class": "ReasonValueIsNotApplicable",
            "id": "NoPerfThisDate",
            "columns": "C3,C4",
            "dataCsv": "eef04358-5f84-4fe0-973a-2a27bafd15de",
            "message": "The value is N/A because no performance history is present for the date requested for performer 'European  Equity'."
        "resultsCsv": [
          ",1 Year,2 Years,3 Years,4 Years,5 Years,6 Years,7 Years,8 Years,9 Years,10 Years",
        "name": "CalendarQuarterMatrix",
        "messages": [],
        "resultsCsv": [

Annotated Representation (XML)


<?xml version="1.0" encoding="utf-8"?>
<interactiveStatisticsAnalysis xmlns="">
  <link rel="service"
        type="application/vnd.statpro.revolution.api.service+xml" />
  <link rel="portfolios-query"
        type="application/vnd.statpro.revolution.api.portfolios+xml" />
  <link rel="self"
        type="application/vnd.statpro.revolution.api.interactive-statistics-analysis+xml" />
    <message class="QueryValidationError" id="DuplicateTableName">A duplicate table name has been specified.  Ensure all table names are unique.</message>
    <table name="StandardPeriods">
      <messages />
1 Day,-0.6678746615784,-0.5327020591042,-0.1351726024742
1 Week,0.40589866635,0.525088035798,-0.119189369448
1 Month,-3.515129080366,-3.0849610298809,-0.4301680504851
3 Months,-5.2508857969226,-5.7262166087696,0.475330811847
6 Months,-1.2055363970878,-0.182654201516,-1.0228821955718
1 Year,-1.2343105001277,0.253985715552,-1.4882962156797
2 Years,23.137847726655,26.079725072551,-2.941877345896
3 Years,7.61807983509,8.685458718934,-1.067378883844</resultsCsv>
    <table name="TriangleMatrix">
        <message class="ReasonValueIsNotApplicable" id="NoPerfThisDate" columns="C3,C4" dataCsv="eef04358-5f84-4fe0-973a-2a27bafd15de">The value is N/A because no performance history is present for the date requested for performer 'European  Equity'.</message>
      <resultsCsv>,1 Year,2 Years,3 Years,4 Years,5 Years,6 Years,7 Years,8 Years,9 Years,10 Years
    <table name="CalendarQuarterMatrix">
      <messages />

Last updated: August 2017

To Top