Look-Through Holdings#

morningstar_data.direct.get_lookthrough_holdings(
portfolio_id: str,
) DataFrame#

Upcoming Feature

Returns look-through holdings for a user-created portfolio.

Parameters:

portfolio_id (str) – Portfolio ID. Use the get_portfolios function to discover saved portfolios.

Returns:

DataFrame: A DataFrame object with holdings data. DataFrame columns include

  • investment_id

  • isin

  • cusip

  • weight

  • market_value

  • security_name

  • currency

  • morningstar_instrument_type_code

  • entity_id

  • morningstar_entity_name

  • primary_performance_id

  • morningstar_instrument_type_name

Examples:

Retrieve the look-through holdings for a portfolio.

import morningstar_data as md

df = md.direct.get_lookthrough_holdings(portfolio_id='7b9cb5db-e3da-414e-8f75-b52b02222b5a') # Replace with a valid Portfolio ID
df
Output:

investment_id

primary_performance_id

morningstar_instrument_type_name

E0USA00462

0P000000YM

Equity

F00000Q5HQ

0P0000Z4DP

Equity

F00000UMZ1

0P00014J84

Equity

B10002POBD

None

Bond - Asset Backed

Errors:

InternalServerError: Raised when the server encounters an unhandled error.

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

TimeoutError: Raised when the fund of fund calculation takes too long.

ResourceNotFoundError: Raised when portfolio_id does not exist in Direct.

BadRequestException: Raised when portfolio_id is an invalid UUID.

UnavailableExternally: Raised when the function is not available for external Python package callers.