Performance Reports#

morningstar_data.direct.calculate_report(
report_id: str,
) DataFrame#

Initiates re-calculation of a performance report.

Parameters:

report_id (str) – Unique identifier of a saved performance report from the Performance Reporting module in Morningstar Direct, e.g., “7782164”. Use get_reports to discover possible values.

Returns:

A DataFrame object confirming that report calculation was triggered. DataFrame columns include:

  • reportId

  • success

Return type:

DataFrame

Raises:

ValueErrorException – Raised when the report_id parameter is invalid.

Examples

Calculate the performance report.

import morningstar_data as md

df = md.direct.performance_report.calculate_report(report_id="7128568") # Replace with a valid report ID
df
Output:

reportId

success

7128568

True

Errors:

AccessDeniedError: Raised when the user is not authenticated.

ForbiddenError: Raised when the user does not have permission to access the requested resource.

BadRequestError: Raised when the user does not provide a properly formatted request.

InternalServerError: Raised when the server encounters an unhandled error.

NetworkExceptionError: Raised when the request fails to reach the server due to a network error.

morningstar_data.direct.get_report(
report_id: str,
) DataFrame#

Returns performance report data for the specified report ID.

Parameters:

report_id (str) –

Unique identifier of a saved performance report from the Performance Reporting module in Morningstar Direct, e.g., “7782164”. Use get_reports to discover possible values.

Returns:

A DataFrame object with calculated performance report data. Columns include all columns that the user configured in the performance report.

Return type:

DataFrame

Examples

Get performance report data.

import morningstar_data as md

df = md.direct.performance_report.get_report(report_id="2463866") # Replace with a valid report ID
df
Output:

Group/Investment

Object Type

Display Group

Peer Group

Ticker

sample

investments

Unclassified

Peer Group: Display Group

XXX

Errors:

AccessDeniedError: Raised when the user is not authenticated.

ForbiddenError: Raised when the user does not have permission to access the requested resource.

BadRequestError: Raised when the user does not provide a properly formatted request.

InternalServerError: Raised when the server encounters an unhandled error.

NetworkExceptionError: Raised when the request fails to reach the server due to a network error.

ResourceNotFoundError: Raised when the requested resource does not exist in Direct.

morningstar_data.direct.get_report_status(
report_id: str,
) DataFrame#

Returns the current calculation status of the specified performance report. Possible statuses are:

  • Failed

  • Queued

  • Calculating

  • Generating Report

  • Merging Excel

  • Downloading

  • Ready

Parameters:

report_id (str) –

Unique identifier of a saved performance report from the Performance Reporting module in Morningstar Direct, e.g., “7782164”. Use get_reports to discover possible values.

Returns:

A DataFrame object with calculation status. DataFrame columns include:

  • reportId

  • status

Return type:

DataFrame

Examples

Get performance report calculation status.

import morningstar_data as md

df = md.direct.performance_report.get_report_status(report_id="2463866") # Replace with a valid report ID
df
Output:

reportId

status

2463866

Ready

Errors:

AccessDeniedError: Raised when the user is not authenticated.

ForbiddenError: Raised when the user does not have permission to access the requested resource.

BadRequestError: Raised when the user does not provide a properly formatted request.

InternalServerError: Raised when the server encounters an unhandled error.

NetworkExceptionError: Raised when the request fails to reach the server due to a network error.

morningstar_data.direct.get_reports() DataFrame#

Returns all performance reports saved or shared to a user in Morningstar Direct.

Returns:

A DataFrame object with all performance reports. DataFrame columns include:

  • reportId

  • name

  • permission

  • ownerId

  • shared

  • createdOn

  • lastCalculatedOn

  • folderId

Return type:

DataFrame

Examples:

import morningstar_data as md

df = md.direct.performance_report.get_reports()
df
Output:

reportId

name

permission

ownerId

shared

createdOn

lastCalculatedOn

folderId

4940775

sample

READ_WRITE

XXX

False

2017-08-17T09:39:00Z

1

Errors:

AccessDeniedError: Raised when the user is not authenticated.

ForbiddenError: Raised when the user does not have permission to access the requested resource.

InternalServerError: Raised when the server encounters an unhandled error.

NetworkExceptionError: Raised when the request fails to reach the server due to a network error.