The Portfolio Analysis resource represents an 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, analysis-specific information and information about the calculation (or execution) of that analysis. If the analysis has finished being calculated, then the resource exposes links to further resources that contain the analysis’s results data.
The web service optionally exposes the default analysis of a portfolio. As long as the portfolio has been shared to the user with at least view rights, then the default analysis will be available. The web service also optionally exposes a Compliance Portfolio Analysis if the portfolio has been activated for compliance. Revolution’s desktop website exposes other analyses in addition to the default and compliance analysis; for example, there is an analysis that is used for report generation. There are also analyses affording access to signed-off or awaiting signed-off results. See the Awaiting Sign-Off Portfolio Analysis and the Signed-Off Portfolio Analysis resources for further details. The default analysis is used by the website for normal on-screen display of results when the portfolio has been shared with at least view rights. If the portfolio has only been shared with publish rights then the website will use the signed-off analysis for on-screen display. The compliance analysis is used for the display of on-screen results exclusively in the Compliance section of the website (refer to the Compliance Portfolio Analysis resource page for further details). The Interactive Risk Analysis resource allows queries to be formed which trigger on-the-fly calculations of a large variety of different risk related analytics (refer to the Interactive Risk Analysis resource page for further details).
The web service can be asked for the latest default portfolio analysis, or the last successful. Refer to the documentation for the
default-portfolio-analysis link relation for more details. Resource representations indicate whether the returned resource is the latest available, or the last successful.
A 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 portfolio analysis has finished (with or without messages), then analysis results are available, and returned representations will include links to the Segments Tree Node, Whole Segments Tree, Time Series and Multiple OCP Time Series resources that contain the analysis’s segments, securities, measures and time series data.
If a portfolio analysis has failed, then no analysis results are available. Instead the returned representation will include one or more error messages detailing why the analysis failed. The only exceptions to this are the Interactive Risk Analysis and Interactive Statistics Analysis which are available regardless of the portfolio analysis’s status. This is because these resources enable a new calculation on-the-fly and don’t depend on any previously calculated results.
If a 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 default 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 portfolio analyses. (Note that the Web API is not able to trigger analysis recalculations.)
The Portfolio Analysis resource is exposed via XML and JSON representations, which have the following media type names:- > application/vnd.statpro.revolution.api.portfolio-analysis+json
When a response is received from the web service with status 200 (= OK), the fact that the response contains a Portfolio Analysis resource representation is indicated by the presence of one of these two response headers:- > Content-Type: application/vnd.statpro.revolution.api.portfolio-analysis+json; charset=utf-8
Content-Type: application/vnd.statpro.revolution.api.portfolio-analysis+xml; charset=utf-8
The Portfolio Analysis resource always links to the Service, Porfolios, Portfolio Analysis Controller and Interactive Statistics Analysis resources (and to itself). If the portfolio is enabled for Advanced Risk, then it will additionally expose a link to the Interactive Risk Analysis resource. If the portfolio analysis has finished then analysis results are available, and the resource will also link to the Segments Tree Node, Whole Segments Tree, Time Series and Multiple OCP Time Series resources. To do so, its resource representations use link relations:-
self link relation identifies the link to the current 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.
service link relation identifies the Service resource link.
portfolios-query link relation identifies the link that allows a new query for portfolios to be made.
portfolio-analysis-controller-query link relation identifies the link that supports triggering actions on portfolio analyses (currently allows triggering custom time period portfolio analyses).
interactive-risk-analysis-query link relation identifies the link that allows a new query for performing an on-the-fly interactive risk calculation to be made.
segments-tree-root-node-query link relation identifies the link that allows a client application to extract segments, securities and measures from the Segments Tree via a query that starts at the tree’s root node.
whole-segments-tree-query link relation identifies the link that allows a client application to extract segments, securities and measures from (potentially) the whole of the Segments Tree, without having to query for each node.
time-series-query link relation identifies the link that allows a client application to extract time series data for one or more measures for the Total segment. (Links to time series data for other segments are exposed by the Segments Tree Node resource.)
multiple-ocp-time-series-query link relation identifies the link that allows a client application to query for Overall Custom Period (OCP) time series data for multiple segments, multiple measures and multiple time periods.
interactive-statistics-analysis-query link relation identifies the link that allows a new query for performing on-the-fly interactive statistics calculations to be made.
historical-risk-trends link relation identifies the Historical Risk Trends resource link.
liquidity-risk-history link relation identifies the Liquidity Risk History resource link. Availability is limited to Advanced Risk portfolios.
All related resources are accessed using the HTTP GET method, with the exception of the following which are accessed via the POST method:
message in the
messages collection, or
error in the
errors collection, the Web API also exposes additional attributes. Under the XML representation, these attributes are found under each
errorAttributes properties. Exactly one
messageAttribute is returned for each
message in the
messages collection. Exactly one
errorAttribute is returned for each
error in the
id attribute is mandatory. A unique
id is provided for each specific kind of error or warning message.
categories attribute is optional contains a comma-delimited list of output measure categories to which the message applies. If no categories are listed, then the message applies to all categories. Currently supported categories are:
fixedIncomeEnabledare now available. The
Platinumis no longer exists - December 2018
categoriesare now available for the
errorscollections - October 2018
currencyOverlayClassifieris now available - April 2018
statusUpdatedis now available - May 2018
hedgeBenchmarkare now available - March 2018
securityAllocationClassifiersis now available - October 2017
investmentStrategyare now available - August 2017.
multiple-ocp-time-series-querylink relations for finished analyses - September 2014
eulalink relation removed - September 2013
Last updated: October 2018