Performance Reports#
- morningstar_data.direct.performance_report.calculate_report(
- report_id: str,
Initiates recalculation of a specified performance report.
- Parameters:
report_id (
str
) – The unique identifier of a saved performance report from the Performance Reporting module in Morningstar Direct. The id string is numeric. For example, “7782164”.- Returns:
A DataFrame object with calculated performance report data. The DataFrame columns include:
reportId
success
- Return type:
DataFrame
- Raises:
ValueErrorException – When report_id parameter is invalid, then an error will occur.
Examples
Calculate performance report with id “7128568”.
import morningstar_data as md df = md.direct.performance_report.calculate_report(report_id="7128568") df
- Output:
reportId
success
7128568
True
- Errors:
AccessDeniedError: Raised when the user is not authenticated.
ForbiddenError: Raised when the user does not have permissions to access the requested resource.
BadRequestError: Raised when the user does not provide a properly formatted request.
InternalServerError: Raised when the server encounters an error it does not know how to handle.
NetworkError: Raised when the request fails to reach the server due to a network error.
- morningstar_data.direct.performance_report.get_report(
- report_id: str,
Returns performance report for the specified report id as a Dataframe.
- Parameters:
report_id (
str
) – The unique identifier of a saved performance report from the Performance Reporting module in Morningstar Direct. The report_id is string in numeric format. Example: “7782164”.- Returns:
A DataFrame object with the special performance report data. The DataFrame columns include all columns that user set in the special performance report.
- Return type:
DataFrame
Examples
Get performance report with id “2463866”.
import morningstar_data as md df = md.direct.performance_report.get_report(report_id="2463866") 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 permissions to access the requested resource.
BadRequestError: Raised when the user does not provide a properly formatted request.
InternalServerError: Raised when the server encounters an error it does not know how to handle.
NetworkError: 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.performance_report.get_report_status(
- report_id: str,
Returns the current status of calculation of a specified performance report. Possible statuses are:
Failed
Queued
Calculating
Generating Report
Merging Excel
Downloading
Ready
- Parameters:
report_id (
str
) – The unique identifier of a saved performance report from the Performance Reporting module in Morningstar Direct. The id string is numeric. For example, “7782164”.- Returns:
A DataFrame object with the special performance report status data. The DataFrame columns include:
reportId
status
- Return type:
DataFrame
Examples
Get the performance report status with id “2463866”.
import morningstar_data as md df = md.direct.performance_report.get_report_status(report_id="2463866") df
- Output:
reportId
status
2463866
Ready
- Errors:
AccessDeniedError: Raised when the user is not authenticated.
ForbiddenError: Raised when the user does not have permissions to access the requested resource.
BadRequestError: Raised when the user does not provide a properly formatted request.
InternalServerError: Raised when the server encounters an error it does not know how to handle.
NetworkError: Raised when the request fails to reach the server due to a network error.
- morningstar_data.direct.performance_report.get_reports() DataFrame #
Returns all performance reports saved or shared to a user in Morningstar Direct.
- Returns:
A DataFrame object with all performance reports data. The 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 permissions to access the requested resource.
InternalServerError: Raised when the server encounters an error it does not know how to handle.
NetworkError: Raised when the request fails to reach the server due to a network error.