bayesline.api.equity.PortfolioSelectionResolution

bayesline.api.equity.PortfolioSelectionResolution#

model PortfolioSelectionResolution#

The outcome of resolving a portfolio selection against the live catalog.

A selection is a portfolio_id -> source mapping. Resolving it runs the same fund-of-funds cascade a report run does: the explicit picks are unioned with the children cascaded in from any fund-of-funds parents among them. The result reports the effective run set, which picks no longer resolve and why, and whether the selection can be run as-is.

Fields#

Field

Type

Required

Default

collision

PortfolioFofCollision | None

No

None

cycle

list[str] | None

No

None

effective

dict[str, str]

Yes

incomplete_fof_parents

list[str]

No

factory

orphans

dict[str, Literal[‘missing_source’, ‘missing_portfolio’]]

No

factory

runnable

bool

Yes

field collision: PortfolioFofCollision | None [Optional]#

A cross-source fund-of-funds collision blocking the cascade, or None. Resolution stops at the first collision, so at most one is reported.

field cycle: list[str] | None [Optional]#

A fund-of-funds cycle blocking the cascade, as the portfolio-id path that closes the loop, or None. Resolution stops at the first cycle, so at most one is reported.

field effective: dict[str, str] [Required]#

The effective run set as portfolio_id -> source: the still-resolving picks unioned with the fund-of-funds children cascaded in from them. Empty when a collision or cycle prevents cascading.

field incomplete_fof_parents: list[str] [Optional]#

Selected fund-of-funds parents that transitively hold an orphaned child. When the orphan is an explicit pick these cannot run until it is removed; when it is a cascade-pulled missing constituent they run without it (its NAV share is kept but not decomposed), so aggregates may not fully tie out against the children.

field orphans: dict[str, Literal['missing_source', 'missing_portfolio']] [Optional]#

Portfolio ids in the selection or its fund-of-funds cascade that no longer resolve against the live sources, mapped to the reason. missing_source: the source the selection claimed no longer exists. missing_portfolio: the source still exists but no longer contains this portfolio id (for a cascaded child this means a fund’s holdings reference a portfolio with no holdings of its own).

field runnable: bool [Required]#

True when a report run resolves the selection without error: no explicitly-selected orphans, no collision, and no cycle. An orphan that only cascades in from a fund-of-funds holdings edge (a constituent that was never explicitly selected) does not block: the run keeps a slot for the missing child and preserves its NAV share in the parent, so it is reported in orphans and incomplete_fof_parents as a warning only.