Class FamaMacBeth
- each period, regress the cross-section of forward returns on that
period's exposures (with intercept), giving one premium estimate
λ_tper factor; - the premium is the time-series mean of the
λ_t, with a time-series standard error. Each period contributes one observation per factor, which absorbs the cross-sectional correlation that wrecks a pooled regression's errors.
Standard errors are Newey-West (1987) on the λ_t series. With
horizon-bar forward returns sampled every bar the λ_t
overlap and are mechanically MA(horizon−1); the lag used is
max(horizon − 1, Andrews 1991 AR(1) plug-in) per series. The iid
t-stats are kept as naiveTStats for comparison. No Shanken (1992)
errors-in-variables correction is applied: exposures here are observed
characteristics (scores), not estimated betas, so the correction does not
apply; pass estimated betas and it would.
Each cross-section is solved by Householder QR (Ols), not the
normal equations. With standardize = true each exposure column is
winsorised at mean ± 3 standard deviations and then z-scored per period,
so one outlier cannot own the cross-section and premia are per unit of
cross-sectional standard deviation.
NaN entries (asset not in that period's cross-section) are skipped per period; periods with fewer assets than factors + 2, or with a collinear design, are skipped and not counted. Infinite values throw.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic FamaMacBeth.Resultfit(double[][][] exposures, double[][] forwardReturns) One-bar forward returns, raw exposures.static FamaMacBeth.Resultfit(double[][][] exposures, double[][] forwardReturns, int horizon, boolean standardize) Fits the Fama-MacBeth (1973) two-pass cross-sectional regression.
-
Method Details
-
fit
One-bar forward returns, raw exposures. -
fit
public static FamaMacBeth.Result fit(double[][][] exposures, double[][] forwardReturns, int horizon, boolean standardize) Fits the Fama-MacBeth (1973) two-pass cross-sectional regression.- Parameters:
exposures- exposures[t][asset][factor], the loadings known at tforwardReturns- forwardReturns[t][asset], realised after thorizon- bars spanned by each forward return; consecutive periods overlap byhorizon − 1bars when periods are one bar apartstandardize- winsorise and z-score exposures per period
-