bayesline.api.equity.ReturnAttributionReportSettings

bayesline.api.equity.ReturnAttributionReportSettings#

model ReturnAttributionReportSettings#

Settings for a return attribution drilldown report.

Fields#

Field

Type

Required

Default

calendar

CalendarSettings

No

factory

currency

str | None

No

None

factor_model_settings

str | int | FactorRiskModelSettings

Yes

normalize_holdings

bool

No

True

portfolio_hierarchy_settings

PortfolioHierarchySettings

Yes

report_type

Literal[‘return_attribution’]

No

'return_attribution'

rescale_bench

bool

No

True

return_aggregation_type

Literal[‘arithmetic’, ‘geometric’]

No

'geometric'

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 factor_model_settings: str | int | FactorRiskModelSettings [Required]#

The factor risk model to run the report on: either inline settings or a reference (name or id) to saved factor risk model settings.

Validated by:

validate_geometric_requires_normalized

field normalize_holdings: bool [Optional]#

Whether contributions are reported as returns rather than PnL. Decomposed sleeve rows under one fund-of-funds root (e.g. ‘mmf1:p1’, ‘mmf1:{REST}’) are then contributions to that root: every factor and idiosyncratic component 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’ components add up to the standalone root’s. 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['return_attribution'] [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

validator validate_geometric_requires_normalized(mode=after)#
Validates:

entire model