monthly_moments

eap_pl.monthly_moments(returns, predictors, *, joint=False)

Sum daily returns and their cross-products by stock and month.

Parameters

Name Type Description Default
returns pl.DataFrame | pl.LazyFrame Daily observations with permno, month, stock excess return retrf, and a complete set of market excess returns on each row. required
predictors Sequence[str] Market return column names, including any leads or lags. required
joint bool Include products between different predictors for a joint regression. False

Returns

Name Type Description
polars.DataFrame | polars.LazyFrame One row per stock-month with the count n, column sums, and sums of each predictor squared and multiplied by retrf. Product columns use product_name().