StatPro Revolution Web API


The Compliance Portfolio Analysis Resource


Overview

The Compliance Portfolio Analysis resource represents the compliance analysis of one of the identified user's portfolios. The portfolio in question may be owned by the user, or may be owned by another user and shared to the identified user. The resource contains basic information about the portfolio, compliance analysis information and information about the calculation (or execution) of that analysis. If the analysis has finished being calculated, then the resource exposes a further link to a resource that contains the compliance analysis's total results data.

A compliance portfolio analysis's status is important. It indicates whether the calculation of the analysis is in progress, has finished, has failed, or whether no results are available. If the analysis is in progress then it will become either finished or failed at some point in the future. Re-request the resource periodically (say once every three seconds) to determine its final status.

If a compliance portfolio analysis has finished (with or without messages), then analysis results are available, and returned representations will include a link to the Compliance Total Results resource that contains the total level compliance results.

If a compliance portfolio analysis has failed, then no analysis results are available. Instead the returned representation will include one or more error messages detailing why the compliance analysis failed.

If a compliance portfolio analysis's status indicates that no results are available, then no results can be calculated given the current state of the portfolio and/or its compliance analysis. It may be that the portfolio has been recently created, and currently has no holdings. Alternatively, previous results may have expired and been removed from the system. In this case the user hasn't logged in to the Revolution desktop website for a while, and will need to do so in order to trigger a recalculation of his/her compliance portfolio analyses. (Note that the Web API is not able to trigger analysis recalculations.)


Media types

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

application/vnd.statpro.revolution.api.compliance-portfolio-analysis+json

application/vnd.statpro.revolution.api.compliance-portfolio-analysis+xml

When a response is received from the web service with status 200 (= OK), the fact that the response contains a Compliance Portfolio Analysis resource representation is indicated by the presence of one of these two response headers:-

Content-Type: application/vnd.statpro.revolution.api.compliance-portfolio-analysis+json; charset=utf-8

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


Related resources

The Compliance Portfolio Analysis resource always links to the Service and Porfolios resources (and to itself). If the compliance portfolio analysis has finished then analysis results are available, and the resource will also link to the Compliance Total Results resource. To do so, its resource representations use link relations:-

  • self
  • service
  • portfolios-query
  • compliance-backtesting-history
  • compliance-validation-history
  • compliance-total-results

The self link relation identifies the link to the current Compliance Portfolio Analysis resource. Use this link to poll for availability of results (or calculation failure) if the current status indicates that the analysis is in-progress.

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.

The compliance-backtesting-history link relation identifies the Compliance Backtesting History resource link.

The compliance-validation-history link relation identifies the Compliance Validation History resource link.

The compliance-total-results link relation identifies the link that allows a client application to extract the total level compliance results for the portfolio.

All related resources are accessed using the HTTP GET method.


Update history

  • The properties investmentRegion and investmentStrategy are now available - August 2017.
  • The Compliance Backtesting History resource is now available - June 2017.
  • The Compliance Validation History resource is now available - June 2017.
  • The properties leverageWarningThreshold, leverageMaximumThreshold, stressTestList, stressTestWarningThreshold and stressTestMaximumThreshold are now available under the commitmentLeverageMonitoring section - June 2017.
  • Initial Version - September 2014

Annotated Representations (JSON)

Legend

Status = Failed

{
  "compliancePortfolioAnalysis": {
    "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.compliance-portfolio-analysis+json"
      }
    },
    "name": "Portfolio 5",
    "id": "7fb78363-18c9-48b7-a3a9-b6c9cf047da7",
    "code": "P5",
    "owner": "John Smith",
    "portfolioType": "Professional",
    "investmentType": "Equity",
    "investmentRegion": "Global",
    "investmentStrategy": "Growth and Income",
    "analysis": {
      "currency": "GBP",
      "fundType": "AIF",
      "approach": "Relative100Percent",
      "leverageBasis": "OneHundred",
      "risk": {
        "horizon": 1,
        "percentile": 95.0,
        "riskFactorHistory": 365
      },
      "liquidityScenario": "HighlyStressedMarket",
      "liquidityRiskThreshold": 1.0,
      "coverageWarningThreshold": 95.0,
      "varMonitoring": {
        "varWarningThreshold": 15.0,
        "varMaximumThreshold": 20.0,
        "leverageWarningThreshold": 250.0,
        "leverageMaximumThreshold": 300.0,
        "stressTestList": {
          "name": "System Defaults"
        },
        "stressTestWarningThreshold": -25.0,
        "stressTestMaximumThreshold": -75.0
      },
      "commitmentLeverageMonitoring": {
        "commitmentLeverageWarningThreshold": 150.0,
        "commitmentLeverageMaximumThreshold": 200.0,
        "leverageWarningThreshold": 250.0,
        "leverageMaximumThreshold": 300.0,
        "stressTestList": {
          "name": "System Defaults"
        },
        "stressTestWarningThreshold": -25.0,
        "stressTestMaximumThreshold": -75.0,
        "classifiers": {
          "classifier1": {
            "name": "Asset Class"
          },
          "classifier2": {
            "name": "Currency"
          }
        },
        "targetDuration": 1.2
      },
      "benchmarks": [
        {
          "name": "Custom Test Benchmark",
          "type": "Constituent",
          "code": "CUSTTEST",
          "description": "This is a custom benchmark"
        }
      ],
      "validationHistory": {
        "links": {
          "complianceValidationHistory": {
            "rel": "compliance-validation-history",
            "href": "...",
            "type": "application/vnd.statpro.revolution.api.compliance-validation-history+json"
          }
        }
      },
      "backtestingHistory": {
        "links": {
          "complianceBacktestingHistory": {
            "rel": "compliance-backtesting-history",
            "href": "...",
            "type": "application/vnd.statpro.revolution.api.compliance-backtesting-history+json"
          }
        }
      },
      "status": "FailedWithErrors",
      "errors": [
        "The portfolio contains holdings on a single date only.  More holdings are required to analyze this portfolio."
      ]
    }
  }
}

Status = Finished

{
  "compliancePortfolioAnalysis": {
    "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.compliance-portfolio-analysis+json"
      }
    },
    "name": "Portfolio 5",
    "id": "e35a6fa2-583c-4479-9182-90056f7a1d4e",
    "code": "P5",
    "owner": "John Smith",
    "portfolioType": "Professional",
    "investmentType": "Equity",
    "investmentRegion": "Global",
    "investmentStrategy": "Growth and Income",
    "analysis": {
      "currency": "GBP",
      "fundType": "AIF",
      "approach": "Relative100Percent",
      "leverageBasis": "OneHundred",
      "risk": {
        "horizon": 1,
        "percentile": 95.0,
        "riskFactorHistory": 365
      },
      "liquidityScenario": "HighlyStressedMarket",
      "liquidityRiskThreshold": 1.0,
      "coverageWarningThreshold": 95.0,
      "varMonitoring": {
        "varWarningThreshold": 15.0,
        "varMaximumThreshold": 20.0,
        "leverageWarningThreshold": 250.0,
        "leverageMaximumThreshold": 300.0,
        "stressTestList": {
          "name": "System Defaults"
        },
        "stressTestWarningThreshold": -25.0,
        "stressTestMaximumThreshold": -75.0
      },
      "commitmentLeverageMonitoring": {
        "commitmentLeverageWarningThreshold": 150.0,
        "commitmentLeverageMaximumThreshold": 200.0,
        "leverageWarningThreshold": 250.0,
        "leverageMaximumThreshold": 300.0,
        "stressTestList": {
          "name": "System Defaults"
        },
        "stressTestWarningThreshold": -25.0,
        "stressTestMaximumThreshold": -75.0,
        "classifiers": {
          "classifier1": {
            "name": "Asset Class"
          },
          "classifier2": {
            "name": "Currency"
          }
        },
        "targetDuration": 1.2
      },
      "benchmarks": [
        {
          "name": "Custom Test Benchmark",
          "type": "Constituent",
          "code": "CUSTTEST",
          "description": "This is a custom benchmark"
        }
      ],
      "validationHistory": {
        "links": {
          "complianceValidationHistory": {
            "rel": "compliance-validation-history",
            "href": "...",
            "type": "application/vnd.statpro.revolution.api.compliance-validation-history+json"
          }
        }
      },
      "backtestingHistory": {
        "links": {
          "complianceBacktestingHistory": {
            "rel": "compliance-backtesting-history",
            "href": "...",
            "type": "application/vnd.statpro.revolution.api.compliance-backtesting-history+json"
          }
        }
      },
      "status": "FinishedWithMessages",
      "messages": [
        "Prices for security 'ABC PLC, ISIN 'GB0123456789' only start from 2011-07-12.  The security will be included from this date onwards."
      ],
      "results": {
        "timeStamp": "2012-09-22T15:38:20Z",
        "links": {
          "complianceTotalResults": {
            "rel": "compliance-total-results",
            "href": "...",
            "type": "application/vnd.statpro.revolution.api.compliance-total-results+json"
          }
        }
      }
    }
  }
}


Annotated Representations (XML)

Legend

Status = Failed

<?xml version="1.0" encoding="utf-8"?>
<compliancePortfolioAnalysis xmlns="http://statpro.com/2012/Revolution">
  <link rel="service"
        href="..."
        type="application/vnd.statpro.revolution.api.service+xml" />
  <link rel="portfolios-query"
        href="...?$filter={filter}&amp;$orderby={orderby}&amp;$skip={skip}&amp;$top={top}&amp;includePublishedPortfolios=false&amp;portfolioClassifierCode="
        type="application/vnd.statpro.revolution.api.portfolios+xml" />
  <link rel="self"
        href="..."
        type="application/vnd.statpro.revolution.api.compliance-portfolio-analysis+xml" />
  <name>Portfolio 5</name>
  <id>7fb78363-18c9-48b7-a3a9-b6c9cf047da7</id>
  <code>P5</code>
  <owner>John Smith</owner>
  <portfolioType>Professional</portfolioType>
  <investmentType>Equity</investmentType>
  <investmentRegion>Global</investmentRegion>
  <investmentStrategy>Growth and Income</investmentStrategy>
  <analysis>
    <currency>GBP</currency>
    <fundType>AIF</fundType>
    <approach>Relative100Percent</approach>
    <leverageBasis>OneHundred</leverageBasis>
    <risk>
      <horizon>1</horizon>
      <percentile>95</percentile>
      <riskFactorHistory>365</riskFactorHistory>
    </risk>
    <liquidityScenario>HighlyStressedMarket</liquidityScenario>
    <liquidityRiskThreshold>1</liquidityRiskThreshold>
    <coverageWarningThreshold>95</coverageWarningThreshold>
    <varMonitoring>
      <varWarningThreshold>15</varWarningThreshold>
      <varMaximumThreshold>20</varMaximumThreshold>
      <leverageWarningThreshold>250</leverageWarningThreshold>
      <leverageMaximumThreshold>300</leverageMaximumThreshold>
      <stressTestList>
        <name>System Defaults</name>
      </stressTestList>
      <stressTestWarningThreshold>-25</stressTestWarningThreshold>
      <stressTestMaximumThreshold>-75</stressTestMaximumThreshold>
    </varMonitoring>
  </analysis>
  <commitmentLeverageMonitoring>
    <commitmentLeverageWarningThreshold>150</commitmentLeverageWarningThreshold>
    <commitmentLeverageMaximumThreshold>200</commitmentLeverageMaximumThreshold>
    <leverageWarningThreshold>250</leverageWarningThreshold>
    <leverageMaximumThreshold>300</leverageMaximumThreshold>
    <stressTestList>
      <name>System Defaults</name>
    </stressTestList>
    <stressTestWarningThreshold>-25</stressTestWarningThreshold>
    <stressTestMaximumThreshold>-75</stressTestMaximumThreshold>
    <classifiers>
      <classifier1>
        <name>Asset Class</name>
      </classifier1>
      <classifier2>
        <name>Currency</name>
      </classifier2>
    </classifiers>
    <targetDuration>1.2</targetDuration>
  </commitmentLeverageMonitoring>
  <benchmarks>
    <benchmark>
      <name>Custom Test Benchmark</name>
      <type>Constituent</type>
      <code>CUSTTEST</code>
      <description>This is a custom benchmark</description>
    </benchmark>
  </benchmarks>
  <validationHistory>
    <link rel="compliance-validation-history"
          href="..."
          type="application/vnd.statpro.revolution.api.compliance-validation-history+xml" />
  </validationHistory>
  <backtestingHistory>
    <link rel="compliance-backtesting-history"
          href="..."
          type="application/vnd.statpro.revolution.api.compliance-backtesting-history+xml" />
  </backtestingHistory>
  <status>FailedWithErrors</status>
  <errors>
    <error>The portfolio contains holdings on a single date only.  More holdings are required to analyze this portfolio.</error>
  </errors>
</compliancePortfolioAnalysis>

Status = Finished

<?xml version="1.0" encoding="utf-8"?>
<compliancePortfolioAnalysis xmlns="http://statpro.com/2012/Revolution">
  <link rel="service"
        href="..."
        type="application/vnd.statpro.revolution.api.service+xml" />
  <link rel="portfolios-query"
        href="...?$filter={filter}&amp;$orderby={orderby}&amp;$skip={skip}&amp;$top={top}&amp;includePublishedPortfolios=false&amp;portfolioClassifierCode="
        type="application/vnd.statpro.revolution.api.portfolios+xml" />
  <link rel="self"
        href="..."
        type="application/vnd.statpro.revolution.api.compliance-portfolio-analysis+xml" />
  <name>Portfolio 5</name>
  <id>e35a6fa2-583c-4479-9182-90056f7a1d4e</id>
  <code>P5</code>
  <owner>John Smith</owner>
  <portfolioType>Professional</portfolioType>
  <investmentType>Equity</investmentType>
  <investmentRegion>Global</investmentRegion>
  <investmentStrategy>Growth and Income</investmentStrategy>
  <analysis>
    <currency>GBP</currency>
    <fundType>AIF</fundType>
    <approach>Relative100Percent</approach>
    <leverageBasis>OneHundred</leverageBasis>
    <risk>
      <horizon>1</horizon>
      <percentile>95</percentile>
      <riskFactorHistory>365</riskFactorHistory>
    </risk>
    <liquidityScenario>HighlyStressedMarket</liquidityScenario>
    <liquidityRiskThreshold>1</liquidityRiskThreshold>
    <coverageWarningThreshold>95</coverageWarningThreshold>
    <varMonitoring>
      <varWarningThreshold>15</varWarningThreshold>
      <varMaximumThreshold>20</varMaximumThreshold>
      <leverageWarningThreshold>250</leverageWarningThreshold>
      <leverageMaximumThreshold>300</leverageMaximumThreshold>
      <stressTestList>
        <name>System Defaults</name>
      </stressTestList>
      <stressTestWarningThreshold>-25</stressTestWarningThreshold>
      <stressTestMaximumThreshold>-75</stressTestMaximumThreshold>
    </varMonitoring>
  </analysis>
  <commitmentLeverageMonitoring>
    <commitmentLeverageWarningThreshold>150</commitmentLeverageWarningThreshold>
    <commitmentLeverageMaximumThreshold>200</commitmentLeverageMaximumThreshold>
    <leverageWarningThreshold>250</leverageWarningThreshold>
    <leverageMaximumThreshold>300</leverageMaximumThreshold>
    <stressTestList>
      <name>System Defaults</name>
    </stressTestList>
    <stressTestWarningThreshold>-25</stressTestWarningThreshold>
    <stressTestMaximumThreshold>-75</stressTestMaximumThreshold>
    <classifiers>
      <classifier1>
        <name>Asset Class</name>
      </classifier1>
      <classifier2>
        <name>Currency</name>
      </classifier2>
    </classifiers>
    <targetDuration>1.2</targetDuration>
  </commitmentLeverageMonitoring>
  <benchmarks>
    <benchmark>
      <name>Custom Test Benchmark</name>
      <type>Constituent</type>
      <code>CUSTTEST</code>
      <description>This is a custom benchmark</description>
    </benchmark>
  </benchmarks>
  <validationHistory>
    <link rel="compliance-validation-history"
          href="..."
          type="application/vnd.statpro.revolution.api.compliance-validation-history+xml" />
  </validationHistory>
  <backtestingHistory>
    <link rel="compliance-backtesting-history"
          href="..."
          type="application/vnd.statpro.revolution.api.compliance-backtesting-history+xml" />
  </backtestingHistory>
  <status>FinishedWithMessages</status>
  <messages>
    <message>Prices for security 'ABC PLC, ISIN 'GB0123456789' only start from 2011-07-12.  The security will be included from this date onwards.</message>
  </messages>
  <results>
    <timeStamp>2012-09-22T15:38:20Z</timeStamp>
    <link rel="compliance-total-results"
          href="..."
          type="application/vnd.statpro.revolution.api.compliance-total-results+xml" />
  </results>
</compliancePortfolioAnalysis>


Last updated: August 2017


To Top