bayesline.api.equity.AsyncMcapExposureReportAccessorImpl#

class bayesline.api.equity.AsyncMcapExposureReportAccessorImpl(accessor: AsyncReportAccessorApi)#
__init__(accessor: AsyncReportAccessorApi)#

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: AsyncReportAccessorApi)#
property accessor: AsyncReportAccessorApi#

The underlying report accessor API.

Returns#

AsyncReportAccessorApi

The underlying report accessor API.

async 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.