Class FamaMacBeth

java.lang.Object
com.quantfinlib.alpha.FamaMacBeth

public final class FamaMacBeth extends Object
Fama-MacBeth cross-sectional regression — the standard answer to the question the IC cannot answer: what is a factor exposure WORTH, per period, in return space? Two passes:
  1. each period, regress the cross-section of forward returns on that period's factor exposures (with intercept) — one premium estimate λ_k per factor per period;
  2. the factor premium is the time-series MEAN of the λ_k's, and its t-statistic uses the time-series standard error — which is the method's entire point: cross-sectional correlation between assets (the thing that wrecks a naive pooled regression's standard errors) is absorbed, because each period contributes exactly one observation per factor.

Reading the output: a premium with |t| > 2 is priced; the INTERCEPT should be near zero with |t| < 2 — a significant intercept says returns exist that your factors do not explain. NaN entries (asset not in the cross-section that period — the AlphaContext convention) are skipped per period; periods with fewer assets than factors + 2 are skipped entirely and counted. Plain time-series t-stats (no Newey-West correction — stated, not hidden; premia autocorrelation inflates them). Static, deterministic, research lane.

  • Method Details

    • fit

      public static FamaMacBeth.Result fit(double[][][] exposures, double[][] forwardReturns)
      Parameters:
      exposures - exposures[t][asset][factor] — the factor loadings KNOWN at t
      forwardReturns - forwardReturns[t][asset] — the return realized AFTER t (lookahead is the caller's sin to avoid; align like SignalEvaluator)