bayesline.api.equity.PortfolioReturnsReportSettings

bayesline.api.equity.PortfolioReturnsReportSettings#

model PortfolioReturnsReportSettings#

Settings for a portfolio returns report.

Fields#

Field

Type

Required

Default

calendar

CalendarSettings

No

factory

currency

str | None

No

None

normalize_holdings

bool

No

True

portfolio_hierarchy_settings

PortfolioHierarchySettings

Yes

report_type

Literal[‘portfolio_returns’]

No

'portfolio_returns'

rescale_bench

bool

No

True

return_aggregation_type

Literal[‘arithmetic’, ‘geometric’]

No

'geometric'

returns_currency

str

No

'USD'

Validators#

Validator

Mode

Fields

validate_geometric_requires_normalized

after

model

field calendar: CalendarSettings [Optional]#
Validated by:

validate_geometric_requires_normalized

field currency: str | None [Optional]#
Validated by:

validate_geometric_requires_normalized

field normalize_holdings: bool [Optional]#

Whether returns are reported rather than PnL. Decomposed sleeve rows under one fund-of-funds root (e.g. ‘mmf1:p1’, ‘mmf1:{REST}’) are then contributions to that root: each is divided by the root’s whole-book NAV, each sleeve brings its own benchmark at its NAV and the root’s benchmark is the NAV-weighted mix of its sleeves’, and geometric periods link against the root’s returns, so sibling sleeves add up to the standalone root. Mixed-root groups, and every query with normalize_holdings=False, use their own grouped book.

Validated by:

validate_geometric_requires_normalized

field portfolio_hierarchy_settings: PortfolioHierarchySettings [Required]#
Validated by:

validate_geometric_requires_normalized

field report_type: Literal['portfolio_returns'] [Optional]#

Report type discriminator

Validated by:

validate_geometric_requires_normalized

field rescale_bench: bool [Optional]#

Whether each benchmark is scaled to its portfolio’s NAV. Applies only when normalize_holdings is off; normalized reports always carry each benchmark onto its portfolio’s NAV and ignore this value.

Validated by:

validate_geometric_requires_normalized

field return_aggregation_type: Literal['arithmetic', 'geometric'] [Optional]#
Validated by:

validate_geometric_requires_normalized

field returns_currency: str [Optional]#
Validated by:

validate_geometric_requires_normalized

validator validate_geometric_requires_normalized(mode=after)#
Validates:

entire model