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}withsigma^2the residual sum of squares overn_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=3market_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_0the contemporaneous slope,beta_dimsonthe aggregated slope,smoothing_ratiotheir ratio (NaN when|b_0| <= 1e-8),t_beta_0,sum_lag_betathe sum of the lagged slopes,t_sum_lagits t-stat,ar1the first-order autocorrelation of the asset return,r2,n_obs,se_beta_dimsonthe standard error ofbeta_dimsonandt_beta_dimsonits t-stat. Withnum_lags=0there is no lagged slope:sum_lag_betais 0,t_sum_lagis NaN, andbeta_dimson,t_beta_dimsonequalbeta_0,t_beta_0. An asset with fewer thanmax(min_obs, num_lags + 3)joint observations gets NaN everywhere exceptn_obs- Raises:
ValueError – if
market_returnsis not a pd.Series, ornum_lagsis negative- Return type: