bayesline.api.equity.BaseAssetTearsheet

bayesline.api.equity.BaseAssetTearsheet#

model BaseAssetTearsheet#

What every report’s tearsheet carries: its subject and its date axis.

portfolio_path is the portfolio the subject was taken under, as a list to account for fund-of-funds structures, and is empty when the whole report was taken. The same asset yields a different tearsheet under each portfolio, so a report’s metrics only mean something alongside it.

A tearsheet may roll up across every asset the portfolio holds, in which case its subject is the portfolio rather than an asset: asset_id_type is "portfolio_id", asset_id and asset_name are the portfolio, and the input identifiers – an asset-only notion – are null.

dates is the axis a report’s metrics are given over. A metric requested without history holds a single value, the one at the last of those dates, so a tearsheet asked for no history at all is every metric at its latest date.

Fields#

Field

Type

Required

Default

asset_id

str | None

Yes

asset_id_type

Literal[‘bayesid’, ‘portfolio_id’]

No

'bayesid'

asset_name

str | None

Yes

dates

list[date]

Yes

input_asset_id

str | None

Yes

input_asset_id_type

str | None

Yes

portfolio_path

list[str]

No

factory

field asset_id: str | None [Required]#
field asset_id_type: Literal['bayesid', 'portfolio_id'] [Optional]#
field asset_name: str | None [Required]#
field dates: list[date] [Required]#
field input_asset_id: str | None [Required]#
field input_asset_id_type: str | None [Required]#
field portfolio_path: list[str] [Optional]#