Lookup#

morningstar_data.direct.get_data_point_settings(
data_point_ids: List[str],
) DataFrame#

Returns settings for a given set of data points. This settings DataFrame can be manipulated to reflect specific settings to be used for data retrieval.

Parameters:

data_point_ids (list) – A list of unique identifiers for data points. Example: [“OS01W”, “HP010”]

Returns:

DataFrame: A DataFrame object with data point settings. DataFrame columns include:

  • datapointId

  • datapointName

  • displayName

  • currency

  • preEuroConversion

  • sourceId

  • frequency

  • startDate

  • endDate

  • floatStart

  • floatEnd

  • startDelay

  • endDelay

  • diffStart

  • diffEnd

  • compounding

  • calculationId

  • annualized

  • annualDays

  • benchmark

  • riskfree

  • windowType

  • windowSize

  • stepSize

  • requireContinueData

  • fit

  • scalType

  • scalValue

  • scalPercentValue

  • timehorizon

Examples:

Get data point settings for data point “OS01W”.

import morningstar_data as md

df = md.direct.get_data_point_settings(data_point_ids=["OS01W"])
df
Output:

datapointId

datapointName

calcMnav

showType

transType

OS01W

Name

None

None

None

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.

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

morningstar_data.lookup.currency_codes(
keyword: str | None = None,
) DataFrame#

Returns currency codes and currency name that match the given keyword. If no keyword is provided, the function returns all currency codes and currency names.

Parameters:

keyword (Optional[str], optional) – A string used to lookup currency codes. Example: “USD”. Returns matching currency code for the keyword ‘USD’.

Returns:

DataFrame: Returns a DataFrame. The DataFrame columns include:

  • currency_code

  • currency_name

Examples:

Search currency codes based on keyword “Afgh”

import morningstar_data as md
df = md.lookup.currency_codes(
    keyword="Afgh"
)
df
Output:

currency_code

currency_name

AFN

Afghani

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.

ResourceNotFoundError: Raised when a currency code matching the given keyword does not exist.

morningstar_data.direct.investments(
keyword: str,
count: int = 50,
only_surviving: bool = True,
) DataFrame#

Returns investments that match the given keyword.

Parameters:
  • keyword (str) – Keyword to search for investments.

  • count (int, optional) – Maximum number of investments to return that match the keyword.

  • only_surviving (bool, optional) – Include only surviving investments.

Returns:

DataFrame: A DataFrame object with investments. DataFrame columns include:

  • Name

  • SecId

  • Ticker

  • ISIN

  • CUSIP

  • Base Currency

  • Exchange

  • Country

  • Security Type

  • Fund Id

  • Performance Id

Examples:

Get investments that match the keyword “fixed”.

import morningstar_data as md

df = md.direct.lookup.investments(keyword="fixed")
df
Output:

Name

SecId

Security Type

Fund Id

Performance Id

Fixed.zone AS

0P0001PHEP

ST

0P0001PHEP

Fixed Income Allocation CL I1

FS0000G0QH

CZ

FS0000G0QH

0P0001JW76

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.

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

morningstar_data.direct.firms(
keyword: str,
universe: str | None = None,
) DataFrame#

Returns firms that match the given keyword.

Parameters:
  • keyword (str) – Keyword to search for firms.

  • universe (str, optional) – Investment universe code. Example: “FO”. Use get_investment_universes to discover possible values.

Returns:

DataFrame: A DataFrame object with firms. DataFrame columns include:

  • Id

  • Firm Name

  • Universe

Examples:

Get all firms that match the keyword “rock”.

import morningstar_data as md

df = md.direct.lookup.firms("rock")
df
Output:

Id

Firm Name

Universe

F00000Z17E

Amrock Capital B.V.

FO

F00000XC6D

BlackRock

FO

F00000SEJ6

BlackRock (Channel Islands) Limited

FO

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.

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

morningstar_data.direct.get_brandings(
keyword: str,
find_by: str,
universe: str | None = None,
) DataFrame#

Returns brandings for the given universe and keyword.

Parameters:
  • keyword (str) – Keyword to search for brandings.

  • find_by (str) – Search condition to search for brandings. Valid values are name_begin and name_contain.

  • universe (str, optional) –

    Investment universe code. Example: “FO”. Use get_investment_universes to discover possible values.

Returns:

DataFrame: A DataFrame object with brandings. DataFrame columns include:

  • Id

  • Name

Examples:

Search brandings in the open-end fund universe, where branding name begins with the keyword “a”.

import morningstar_data as md

df = direct.lookup.get_brandings("a", "name_begin", "FO")
df
Output:

Id

Name

BN000007Q5

A Plus Finance

BN000007Q6

A&G

BN00000GBI

A1

Errors:

BadRequestException: Raised when the parameter find_by is not a valid value.

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.

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

morningstar_data.direct.lookup.portfolio_managers(
keyword: str = '',
universe: str = 'FO',
) DataFrame#

Returns portfolio managers for the given universe and keyword.

Parameters:
  • keyword (str) – String to match one or more manager names. If the keyword is empty or not passed to the function, the function will return all managers.

  • universe (str) –

    Investment universe code. Example: “FO”. Use get_investment_universes to discover possible values.

Returns:

DataFrame: A DataFrame object with portfolio managers. DataFrame columns include:

  • Id

  • Manager Name

  • Firm

Examples:

Get portfolio managers that match the keyword “alla”.

import morningstar_data as md

df = md.direct.lookup.portfolio_managers(keyword="alla")
df
Output:

Id

Manager name

Firm

81643

Abdallah Guezour

Schroders

123653

Abdallah Nauphal

TD

213243

Adam Rizkalla

River Canyon

153647

Adrian Allardice

Old Mutual

182699

Adrian van Pallander

Coronation

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.

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

morningstar_data.direct.lookup.companies(
keyword: str = '',
universe: str = 'ST',
) DataFrame#

Returns companies for the given universe and keyword.

Parameters:
  • keyword (str) – String to match one or more company names. If the keyword is empty or not passed to the function, the function will return all companies.

  • universe (str) –

    Investment universe code. Example: “FO”. Use get_investment_universes to discover possible values.

Returns:

DataFrame: A DataFrame object with companies. DataFrame columns include:

  • Id

  • Company name

Examples:

Get companies that match the keyword “Energy”.

import morningstar_data as md

df = md.direct.lookup.companies("Energy")
df
Output:

Id

Company name

0C00008O2A

11 Good Energy Inc

0C000017RQ

2G Energy AG

0C0000516I

3MV Energy Corp

0C00000ZAZ

3Power Energy Group Inc

0C00000QLB

3TEC Energy Corp

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.

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

morningstar_data.direct.lookup.get_investment_universes(
include_category_universes: bool = False,
) DataFrame#

Returns investment universe names and IDs. For example, Bonds, eVestment Hedge Funds, Global Restricted Funds.

Parameters:

include_category_universes (bool, optional) – If True, the function will return all universes, including category universes. Default is False.

Returns:

DataFrame: A DataFrame object with universes. DataFrame columns include:

  • Id

  • Name

Examples:

import morningstar_data as md

df = md.direct.lookup.get_investment_universes()
df
Output:

Id

Name

FH

Hedge Funds

XI

Market_Indexes