bayesline.api.equity.PortfolioCatalog

bayesline.api.equity.PortfolioCatalog#

model PortfolioCatalog#

A catalog of portfolio sources and their respective portfolio names.

Fields#

Field

Type

Required

Default

dates

dict[str, dict[str, tuple[date, date]]]

No

factory

fof_graphs

dict[str, dict[str, list[str]]]

Yes

mappings

dict[str, dict[str, list[str | None]]]

No

factory

organizer_settings

dict[str, dict[str, str] | str]

Yes

portfolio_settings

dict[str, dict[str, str] | str]

Yes

sources

dict[str, list[str]]

Yes

field dates: dict[str, dict[str, tuple[date, date]]] [Optional]#

A dictionary of source identifier to a per-portfolio holdings date range (portfolio_id -> [start, end]): the first and last date each portfolio in that source has holdings.

field fof_graphs: dict[str, dict[str, list[str]]] [Required]#

A dictionary of source identifier to their respective fund-of-funds graph.

field mappings: dict[str, dict[str, list[str | None]]] [Optional]#

A dictionary of mapping upload name to the portfolio mappings this upload defines. The mapping is a dictionary with one key being ‘portfolio_id’ and the other keys being the mapping dimensions. Column-oriented and aligned by row; a portfolio without a value for a dimension is None.

field organizer_settings: dict[str, dict[str, str] | str] [Required]#

A dictionary of the settings name to the schema settings, which contains a mapping of portfolio id to the underlying source or a string reference to a whole source

field portfolio_settings: dict[str, dict[str, str] | str] [Required]#

A dictionary of the settings name to the schema settings, which contains a mapping of portfolio id to the underlying source or a string reference to a whole source

field sources: dict[str, list[str]] [Required]#

A dictionary of source identifier to their respective list of portfolio names.