---
title: "Analysis Configuration"
description: "Choose a view, tune request settings and select an asset class group to control what the Portfolio X-Ray API calculates and returns."
url: "https://developer-beta.morningstar.com/portfolio-xray-api/configure-an-analysis"
image: "https://developer-beta.morningstar.com/_og/d/c_Ocean.takumi,title_~QW5hbHlzaXMgQ29uZmlndXJhdGlvbiB8IFBvcnRmb2xpbyBYLVJheSBBUEk,description_~Q2hvb3NlIGEgdmlldywgdHVuZSByZXF1ZXN0IHNldHRpbmdzIGFuZCBzZWxlY3QgYW4gYXNzZXQgY2xhc3MgZ3JvdXAgdG8gY29udHJvbCB3aGF0IHRoZSBQb3J0Zm9saW8gWC1SYXkgQVBJIGNhbGN1bGF0ZXMgYW5kIHJldHVybnMu,props_eyJ0aGVtZSI6eyJtb2RlIjoibGlnaHQiLCJjb2xvcnMiOnsicHJpbWFyeSI6IiMwMDAwMDAifX19,p_Ii9wb3J0Zm9saW8teHJheS1hcGkvY29uZmlndXJlLWFuLWFuYWx5c2lzIg,s_iNRLVJ7sKqoMXaEw.png"
---

-   [APIs](https://developer-beta.morningstar.com/apis)
-   [API Catalog](https://developer-beta.morningstar.com/api-catalog)
-   [API Assistant MCP Server](https://developer-beta.morningstar.com/api-assistant-mcp)
-   [Guides](https://developer-beta.morningstar.com/api-guides)
-   [Trial Access](https://developer-beta.morningstar.com/trial-access)

# Portfolio X-Ray API

Build Portfolio X-Ray APIs into your digital experience for quick investment and earnings summaries.

# Configure an Analysis

[View Markdown](https://developer-beta.morningstar.com/portfolio-xray-api/configure-an-analysis.md)[Download Markdown](https://developer-beta.morningstar.com/portfolio-xray-api/configure-an-analysis.md)

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](https://developer-beta.morningstar.com/portfolio-xray-api/api-inputs).

## [Views](#views)

The `View` property selects a predefined set of data points to return in the response. If you omit it, the API uses `All`.

```json
"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](https://developer-beta.morningstar.com/portfolio-xray-api/response-structure) 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](#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](#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](#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](#aligning-multiple-portfolios)

When you analyze two portfolios, these settings align their analysis periods. See [Compare Two Portfolios](https://developer-beta.morningstar.com/portfolio-xray-api/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](#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](#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](#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](#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`.

```json
"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      |                 |