StatPro Revolution Web API


The Portfolio Return Definitions Resource


Overview

The Portfolio Return Definitions resource represents a non-paged collection of return definitions. A Portfolio return definition represents a specific type of return. Examples include, Net External Returns (NAV), Gross External Returns (GAV), Returns net of taxes, True-Time Weighted Returns etc. There are a vast array of possible return definitions which could be used but Revolution currently offers up to ten customizable "slots" for return definitions whose names can be configured in the Revolution website. Ones with an id of less than 101 are not customizable and are reserved for system return definitions. When portfolios have series values imported against these customizable return definitions, then the results calculated can then be accessed by analysis resources such as the Time Series, Multiple OCP Time Series, Segments Tree Node and Whole Segments Tree resources via the rpCustom1 to rpCustom10 measures.

Each portfolio return definition within the collection contains the name and unique identifier of the return definition. The name may optionally include a placeholder of "[CUR]" indicating this is to be substituted with the Portfolio's base currency.


Media types

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

application/vnd.statpro.revolution.api.portfolio-return-definitions+json

application/vnd.statpro.revolution.api.portfolio-return-definitions+xml

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

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

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


Related resources

The Portfolio Return Definition resource links to the Service resource and to itself. To do so, its resource representations use link relations:-

  • service
  • self

The service link relation identifies the Service resource link.

All related resources are accessed using the HTTP GET method.


Update history

  • Initial Version - December 2016

Annotated Representation (JSON)

Legend

{
  "portfolioReturnDefinitions": {
    "links": {
      "service": {
        "rel": "service",
        "href": "...",
        "type": "application/vnd.statpro.revolution.api.service+json"
      },
      "self": {
        "rel": "self",
        "href": "...",
        "type": "application/vnd.statpro.revolution.api.portfolio-return-definitions+json"
      }
    },
    "items": [
      {
        "id": 0,
        "code": "Internal",
        "name": "Internal"
      },
      {
        "id": 1,
        "code": "Net",
        "name": "Net External"
      },
      {
        "id": 2,
        "code": "Gross",
        "name": "Gross External"
      },
      {
        "id": 101,
        "code": "Custom1",
        "name": "Return TTW Net ([CUR])"
      },
      {
        "id": 102,
        "code": "Custom2",
        "name": "Return Net Expenses and Taxes"
      }
    ]
  }
}


Annotated Representation (XML)

Legend

<?xml version="1.0" encoding="utf-8"?>
<portfolioReturnDefinitions xmlns="http://statpro.com/2012/Revolution">
  <link rel="service"
        href="..."
        type="application/vnd.statpro.revolution.api.service+xml" />
  <link rel="self"
        href="..."
        type="application/vnd.statpro.revolution.api.portfolio-return-definitions+xml" />
  <returnDefinition>
    <id>0</id>
    <code>Internal</code>
    <name>Internal</name>
  </returnDefinition>
  <returnDefinition>
    <id>1</id>
    <code>Net</code>
    <name>Net External</name>
  </returnDefinition>
  <returnDefinition>
    <id>2</id>
    <code>Gross</code>
    <name>Gross External</name>
  </returnDefinition>
  <returnDefinition>
    <id>101</id>
    <code>Custom1</code>
    <name>Return TTW Net ([CUR])</name>
  </returnDefinition>
  <returnDefinition>
    <id>102</id>
    <code>Custom2</code>
    <name>Return Net Expenses and Taxes</name>
  </returnDefinition>
</portfolioReturnDefinitions>


Last updated: December 2016


To Top