bayesline.api.equity.McapExposureReportAccessorImpl#

class bayesline.api.equity.McapExposureReportAccessorImpl(accessor: ReportAccessorApi)#
__init__(accessor: ReportAccessorApi)#

Methods

__init__(accessor)

get_mcap_weighted_exposures()

Get the time-series of market-cap-weighted exposures for the factors.

with_scenario(scenario_settings)

Return a new accessor with the given scenario settings applied.

Attributes

accessor

The underlying report accessor API.

scenario_types

__init__(accessor: ReportAccessorApi)#
property accessor: ReportAccessorApi#

The underlying report accessor API.

Returns#

ReportAccessorApi

The underlying report accessor API.

get_mcap_weighted_exposures() DataFrame#

Get the time-series of market-cap-weighted exposures for the factors.

For each date and factor, this computes the sum of exposure_i * mcap_i across all assets in the estimation universe.

Returns#

pl.DataFrame

A dataframe with a date column and columns for each factor with their respective market-cap-weighted exposures, in factor_group^factor format.