Portfolio X-Ray API
Build Portfolio X-Ray APIs into your digital experience for quick investment and earnings summaries.
Configure an Analysis
Three parts of the request control how the analysis is run and what comes back: the view, the request settings and the asset class group. This page explains each one. For the complete list of parameters and accepted values, see API Inputs.
Views
The View property selects a predefined set of data points to return in the response. If you omit it, the API uses All.
"View": { "Id": "Snapshot" }
The following view IDs are supported.
| View ID | Notes |
|---|---|
All | Default. |
Default | |
Intersection | |
Operation | |
Portfolio | |
StockIntersection | |
XrayOverview | |
Snapshot |
The view determines which sections appear in the response. If a section you expect is missing, check the view first. See Understanding the Response for the sections the response can contain.
You can also pass Config to apply an account-specific configuration preset. The only supported value is Default, which is applied if you omit it. Any setting in the preset can be overridden directly in the request.
Request Settings
RequestSettings is required in every request. Only OutputCurrency is mandatory within it; all other settings have defaults. The settings fall into the following groups.
Output and Analysis period
| Setting | Default | Description |
|---|---|---|
OutputCurrency | USD | The currency used to calculate output values. Accepts the 19 supported ISO 4217 codes. |
InitialValue | 10000 | The initial value of the portfolio in the output currency. Minimum 1. |
PerformanceFrequency | Monthly | The frequency of performance returns and risk calculations: Monthly or Quarterly. |
PortfolioPerformanceStartDate | EarliestCommon | The start date of the analysis. See Choosing a start date. |
PortfolioPerformanceCustomStartDate | None | The custom start date, in YYYY-MM-DD format. Required when PortfolioPerformanceStartDate is CustomDate. |
AnalysisDateTimePeriod | MonthEnd | The end date period for the analysis: MonthEnd, QuarterEnd, YearEnd or CustomDate. |
PortfolioPerformanceEndDate | None | The end date, in YYYY-MM-DD format. Required when AnalysisDateTimePeriod is CustomDate. |
Choosing a Start Date
PortfolioPerformanceStartDate accepts the following values.
| Value | Description |
|---|---|
EarliestCommon | Default. The earliest date for which all holdings have return data. |
EarliestAvailable | The earliest date for which any holding has return data. |
EarliestCommonExtended | The earliest common date, using extended return history where available. |
EarliestCommonExtended10Year | A variation of the extended common date. |
Year10 | A ten-year analysis period. |
CustomDate | A date you specify in PortfolioPerformanceCustomStartDate. |
The response returns the key dates for each portfolio in PerformanceDate, so you can see which dates were available.
Aligning Multiple Portfolios
When you analyze two portfolios, these settings align their analysis periods. See Compare Two Portfolios.
| Setting | Default | Description |
|---|---|---|
SynchronizePortfolioStartDate | false | When true, the latest common start date across all portfolios is used for every portfolio. |
EnablePerformanceCommonEndDate | false | When true, the most recent common end date across all portfolios is used as the analysis end date. |
Returns
| Setting | Default | Description |
|---|---|---|
IncludeGrossNetReturns | false | When true, both gross and net values are included in trailing returns and calendar year returns. |
ReturnDataSections | None | Additional data sections to include: RollingReturns and CorrelationMatrix. |
RollingReturnFrequencies | None | The rolling return periods to calculate: Month3, Month6, Year1, Year3, Year5 or Year10. Required when ReturnDataSections includes RollingReturns. |
RollingReturnStep | 1 | The interval in months between rolling return calculations. Minimum 1. Applies only when rolling returns are requested. |
Risk
| Setting | Default | Description |
|---|---|---|
IncludePortfolioInCorrelationMatrix | false | When true, the portfolio is included as an entry in the correlation matrix. |
MaxCorrelationMatrixHoldingNumber | 50 | The maximum number of holdings in the correlation matrix, from 2 to 50. Applies only when ReturnDataSections includes CorrelationMatrix. |
Invalid Holdings
| Setting | Default | Description |
|---|---|---|
DisableRescale | false | When true, portfolio weights are not rescaled if any holdings are invalid or unentitled. The request returns an error that lists the affected holdings instead. |
Asset Class Groups
An asset class group determines the classification scheme used in the analysis. Set it in the request settings with AssetClassGroupConfigs. You can pass a maximum of one group per request. If you omit it, the API uses ACG-USBROAD.
"RequestSettings": {
"OutputCurrency": "USD",
"AssetClassGroupConfigs": {
"AssetClassGroupConfig": [
{ "Id": "ACG-USBROAD" }
]
}
}
The following asset class group IDs are supported.
| ID | ID | ID |
|---|---|---|
ACG-AUDETAILED | ACG-BROAD-INDIA2 | ACG-BROAD-JAPAN |
ACG-CABROAD | ACG-CANBROAD4 | ACG-EUBROAD |
ACG-GLOBBROAD | ACG-NZDETAILED | ACG-UKBROAD |
ACG-UK-GBR | ACG-USBROAD |