qis.estimate_dimson_beta

qis.estimate_dimson_beta(asset_returns, market_returns, num_lags=3, min_obs=36)[source]

estimate the Dimson aggregated-coefficient beta to detect return smoothing.

Fits, per asset, the time-series regression of asset returns on the contemporaneous and lagged market return

r_i_t = a_i + sum_{k=0}^{L} b_{i,k} r_m_{t-k} + e_i_t

and reports the Dimson beta beta_dimson = sum_{k=0}^{L} b_{i,k}. When an asset prices with a lag (stale marks, return smoothing, illiquid holdings), the contemporaneous slope b_0 understates the true market exposure and the lagged slopes recover it. The ratio beta_dimson / b_0 measures the understatement and the t-stat on the summed lagged slopes tests whether the lag effect is real.

Beta is invariant to using total or excess returns provided the same convention is used for asset and market, so total returns are the natural input when the goal is to detect smoothing in the raw reported series.

Standard errors are classical: sigma^2 (X'X)^{-1} with sigma^2 the residual sum of squares over n_obs - num_lags - 2. The residuals of a stale series are autocorrelated, so treat the t-statistics as screening statistics.

Parameters:
  • asset_returns (Series | DataFrame) – asset return panel, one column per asset, at the same frequency as market_returns. Monthly for a quarter-smoothing test with L=3

  • market_returns (Series) – market or factor return series, the timing reference. Use a liquid, frequently priced index

  • num_lags (int) – number of lagged market terms L. L=3 on monthly data tests whether aggregating to quarterly recovers exposure the monthly regression misses

  • min_obs (int) – minimum overlapping observations required to fit an asset

Returns:

one row per asset, with columns beta_0 the contemporaneous slope, beta_dimson the aggregated slope, smoothing_ratio their ratio (NaN when |b_0| <= 1e-8), t_beta_0, sum_lag_beta the sum of the lagged slopes, t_sum_lag its t-stat, ar1 the first-order autocorrelation of the asset return, r2, n_obs, se_beta_dimson the standard error of beta_dimson and t_beta_dimson its t-stat. With num_lags=0 there is no lagged slope: sum_lag_beta is 0, t_sum_lag is NaN, and beta_dimson, t_beta_dimson equal beta_0, t_beta_0. An asset with fewer than max(min_obs, num_lags + 3) joint observations gets NaN everywhere except n_obs

Raises:

ValueError – if market_returns is not a pd.Series, or num_lags is negative

Return type:

DataFrame