daily_betas

eap_pl.daily_betas(anchors, daily_excess, daily_factors, *, windows=None)

Estimate ordinary, Scholes–Williams, and Dimson betas at each formation month.

Processes up to 1,000 stocks at a time.

Parameters

Name Type Description Default
anchors pl.DataFrame Eligible permno and month pairs, with months dated on the first. required
daily_excess pl.LazyFrame Daily stock and market excess returns from load_daily_beta_inputs(). required
daily_factors pl.DataFrame Trading-day factor data from the same loader. required
windows Mapping[str, tuple[int, int]] | None Optional mapping from each ordinary beta’s label to its window in calendar months and its minimum number of daily observations. Defaults to BEM’s one-, three-, six-, twelve-, and 24-month estimates. None

Returns

Name Type Description
polars.DataFrame A row for every input stock-month with one column per ordinary beta and the twelve-month adjusted estimates SW and D. Missing estimates are null.