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 IDNotes
AllDefault.
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

SettingDefaultDescription
OutputCurrencyUSDThe currency used to calculate output values. Accepts the 19 supported ISO 4217 codes.
InitialValue10000The initial value of the portfolio in the output currency. Minimum 1.
PerformanceFrequencyMonthlyThe frequency of performance returns and risk calculations: Monthly or Quarterly.
PortfolioPerformanceStartDateEarliestCommonThe start date of the analysis. See Choosing a start date.
PortfolioPerformanceCustomStartDateNoneThe custom start date, in YYYY-MM-DD format. Required when PortfolioPerformanceStartDate is CustomDate.
AnalysisDateTimePeriodMonthEndThe end date period for the analysis: MonthEnd, QuarterEnd, YearEnd or CustomDate.
PortfolioPerformanceEndDateNoneThe end date, in YYYY-MM-DD format. Required when AnalysisDateTimePeriod is CustomDate.

Choosing a Start Date

PortfolioPerformanceStartDate accepts the following values.

ValueDescription
EarliestCommonDefault. The earliest date for which all holdings have return data.
EarliestAvailableThe earliest date for which any holding has return data.
EarliestCommonExtendedThe earliest common date, using extended return history where available.
EarliestCommonExtended10YearA variation of the extended common date.
Year10A ten-year analysis period.
CustomDateA 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.

SettingDefaultDescription
SynchronizePortfolioStartDatefalseWhen true, the latest common start date across all portfolios is used for every portfolio.
EnablePerformanceCommonEndDatefalseWhen true, the most recent common end date across all portfolios is used as the analysis end date.

Returns

SettingDefaultDescription
IncludeGrossNetReturnsfalseWhen true, both gross and net values are included in trailing returns and calendar year returns.
ReturnDataSectionsNoneAdditional data sections to include: RollingReturns and CorrelationMatrix.
RollingReturnFrequenciesNoneThe rolling return periods to calculate: Month3, Month6, Year1, Year3, Year5 or Year10. Required when ReturnDataSections includes RollingReturns.
RollingReturnStep1The interval in months between rolling return calculations. Minimum 1. Applies only when rolling returns are requested.

Risk

SettingDefaultDescription
IncludePortfolioInCorrelationMatrixfalseWhen true, the portfolio is included as an entry in the correlation matrix.
MaxCorrelationMatrixHoldingNumber50The maximum number of holdings in the correlation matrix, from 2 to 50. Applies only when ReturnDataSections includes CorrelationMatrix.

Invalid Holdings

SettingDefaultDescription
DisableRescalefalseWhen 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.

IDIDID
ACG-AUDETAILEDACG-BROAD-INDIA2ACG-BROAD-JAPAN
ACG-CABROADACG-CANBROAD4ACG-EUBROAD
ACG-GLOBBROADACG-NZDETAILEDACG-UKBROAD
ACG-UK-GBRACG-USBROAD