Week 07 — Phase 2: QT Specialization

Factor
Modeling

QT Pillar 3 — Portfolio Fit

Decompose portfolio returns into known risk premia. Build a custom factor when the standard ones don't capture what your edge is loading on.

What this week covers

W4 introduced the major equity factors — Market, Size (SMB), Value (HML), Momentum (UMD), Quality, Low Vol — and noted that they have multi-year drawdowns. This week is how to actually use them: regress portfolio returns on factor returns to read off exposures and separate alpha from beta.

By Friday you should be able to:

The reading is the original Fama-French (1993) paper and Carhart (1997); Palomar Ch 7 §2 covers the regression interpretation. Cochrane (2001) Ch 12–13 has the standard-error theory if you want to go deeper.

The factor model framework

A factor model decomposes an asset's excess return into a weighted sum of common-factor returns plus an idiosyncratic residual. Both Merton's ICAPM and Ross's APT motivate the same form — factors must carry an economic reason to predict returns.

\[ R_{i,t} - R_{f,t} \;=\; \alpha_i \;+\; \sum_{k=1}^{K} \beta_{i,k}\, F_{k,t} \;+\; \varepsilon_{i,t} \quad (1) \]

A second, cross-sectional equation links expected returns to factor risk premia \( \lambda_k \):

\[ \mathbb{E}[R_i - R_f] \;=\; \lambda_0 \;+\; \sum_{k=1}^{K} \beta_{i,k}\, \lambda_k \quad (2) \]

Under a correctly specified model, \( \lambda_0 = 0 \) — no return without exposure. The \( \beta_{i,k} \) is the asset's loading on factor \( k \); the \( \lambda_k \) is the risk premium the market pays per unit of that exposure.

What plays the role of \( F_{k,t} \) depends on the factor type:

Two estimation routes match these two cases (covered below): time-series regression for traded-portfolio factors, Fama-MacBeth two-pass for macro factors. QT uses time-series exclusively — we're auditing what the live book is exposed to, not pricing new assets.

From CAPM to Fama-French to FF5

Every model below is the same equation above with a different choice of factors.

Model Factors What it adds
CAPM
(Sharpe-Lintner, 1964)
Mkt − Rf The baseline. Only systematic (market) risk should be compensated. Empirically inadequate — small and value stocks earn more than CAPM predicts.
Fama-French 3
(1993)
Mkt − Rf, SMB, HML Adds Size and Value premia. Explains roughly 90%+ of US-equity cross-sectional return variance.
Carhart 4
(1997)
+ UMD (a.k.a. MOM) Adds Momentum (Up-Minus-Down). Essential when evaluating any trend-following or momentum strategy.
Fama-French 5
(2015)
+ RMW, CMA Adds Profitability (Robust-Minus-Weak) and Investment (Conservative-Minus-Aggressive). Subsumes much of HML; better empirical fit post-2000.

Written out, the four-factor Carhart model is:

\[ R_{p,t} - R_{f,t} \;=\; \alpha_p \;+\; \beta_{\mathrm{MKT}}(R_{M,t} - R_{f,t}) \;+\; \beta_{\mathrm{SMB}}\,\mathrm{SMB}_t \;+\; \beta_{\mathrm{HML}}\,\mathrm{HML}_t \;+\; \beta_{\mathrm{MOM}}\,\mathrm{MOM}_t \;+\; \varepsilon_{p,t} \]

This is the default QT uses for portfolio decomposition. FF5 is worth running as a robustness check.

How Fama-French actually builds SMB and HML

W4 told you what SMB and HML mean ("Small Minus Big", "High Minus Low book-to-market"). The factor returns Fama and French publish on their data library are not just SMB = small-cap index minus large-cap index. They come from a specific 2×3 sort that isolates each premium from the other.

Every June, the universe (NYSE + AMEX + NASDAQ common stocks) is sorted on two characteristics simultaneously:

  1. Size — market cap, split at the NYSE median into Small and Big.
  2. Book-to-market — split at the NYSE 30th and 70th percentiles into Low, Medium, High. (Some papers use median or 10/90 splits; 30/70 is the Fama-French convention.)

The intersection gives six value-weighted portfolios: SL, SM, SH, BL, BM, BH. The factor returns are then:

\[ \mathrm{SMB}_t = \tfrac{1}{3}(R_{\mathrm{SL}} + R_{\mathrm{SM}} + R_{\mathrm{SH}})_t \;-\; \tfrac{1}{3}(R_{\mathrm{BL}} + R_{\mathrm{BM}} + R_{\mathrm{BH}})_t \] \[ \mathrm{HML}_t = \tfrac{1}{2}(R_{\mathrm{SH}} + R_{\mathrm{BH}})_t \;-\; \tfrac{1}{2}(R_{\mathrm{SL}} + R_{\mathrm{BL}})_t \]

Two design choices in here are worth internalizing:

Building your own factor

The Fama-French recipe generalizes. Any cross-sectional stock characteristic can be turned into a factor by sorting and going long-short.

  1. Pick a characteristic. It must be (a) measurable from public data, (b) cross-sectionally varying — every stock has a different value, (c) tied to an economic mechanism you can defend (recall W1: hypothesis before backtest).
  2. Rank and sort. At each rebalance, rank the universe on the characteristic. The split is a design choice — median (2 buckets), 30/70 (3 buckets, the Fama-French convention), 10/90, or quintiles/deciles. Finer sorts give cleaner separation between top and bottom; coarser sorts give larger, more diversified buckets.
  3. Form the long-short portfolio. Long the top quintile (or decile), short the bottom. Value-weight within each quintile. The factor return is the spread. \[ F_{t}^{\mathrm{custom}} = R_{\mathrm{top}, t} - R_{\mathrm{bottom}, t} \]
  4. Test orthogonality. Regress your factor against the existing Carhart 4 factors: \[ F_{t}^{\mathrm{custom}} = a + b_1 \mathrm{MKT}_t + b_2 \mathrm{SMB}_t + b_3 \mathrm{HML}_t + b_4 \mathrm{MOM}_t + u_t \] If the intercept \( a \) is significantly positive and \( R^2 \) is low, your factor carries return that the standard set doesn't capture — it's a real candidate. If \( R^2 \) is 0.85, you've reinvented an existing factor with a new name.
  5. Test robustness. Split the sample (pre-2010 / post-2010), look at sub-sectors, run in different countries. A factor that works only in one regime is unlikely to survive live.

Example: a "Quality" factor

Characteristic: gross profitability = (Revenue − COGS) / Total Assets, as in Novy-Marx (2013).

At each June, rank the universe, form a long-short portfolio of top-quintile minus bottom-quintile. Call the factor return QMJ (Quality-Minus-Junk). Regress QMJ against the FF3 + MOM factors. Novy-Marx reports a significant positive intercept of ~0.3% per month with \( R^2 \) around 0.30 — the quality premium isn't captured by Mkt / SMB / HML / MOM, so it's a real fifth factor.

Two estimation routes

Equations (1) and (2) suggest two regression strategies. Which one you use depends on whether your factors are traded portfolios or general macroeconomic surprises.

Time-series regression
Fama-French method

When factors are returns (SMB, HML, MOM): fit equation (1) directly per asset or portfolio with OLS. The \( \beta_{i,k} \) are the slopes. The factor risk premium \( \lambda_k \) is just the time-series mean of \( F_{k,t} \).

The asset-pricing test is whether \( \alpha_i = 0 \) jointly across all assets — the GRS F-test (Gibbons, Ross & Shanken 1989), HAC-adjusted for autocorrelation.

QT default. Tractable in pandas + statsmodels; this is what the rest of this week uses.

Cross-sectional regression
Fama-MacBeth two-pass

When factors are macroeconomic surprises or otherwise non-traded:

  1. Pass 1 (time-series): per asset, regress \( R_i \) on \( F \) to estimate \( \hat\beta_i \).
  2. Pass 2 (cross-section): regress average returns \( \overline{R}_i \) on \( \hat\beta_i \) to estimate \( \hat\lambda_k \).

Rolling 60-month windows are the standard. Standard errors must correct for the fact that the \( \hat\beta \)s are themselves estimated — Fama-MacBeth (1973) gave the original adjustment; Cochrane (2001) Ch 12 has the modern treatment.

More relevant to QR asset-pricing work than to QT portfolio decomposition.

Running the regression on a portfolio

Once factors exist, decomposing a portfolio's returns is just OLS:

import pandas as pd, statsmodels.api as sm

# portfolio_excess = monthly portfolio return - monthly Rf
# factors = DataFrame with columns ['MKT_RF', 'SMB', 'HML', 'MOM']

X = sm.add_constant(factors)
model = sm.OLS(portfolio_excess, X).fit(
    cov_type='HAC', cov_kwds={'maxlags': 6}  # Newey-West, accounts for autocorrelation
)
print(model.summary())

Three notes on the regression itself:

Interpreting α, β, R²

α (alpha)

The intercept. Portfolio's average excess return not attributable to factor exposures. Under a correctly specified model the asset-pricing prediction is \( \alpha = 0 \); a significant non-zero \( \alpha \) means either (a) the model is missing a factor, or (b) the portfolio has true skill that no factor captures.

If \( \alpha \) is negative, you're paying for factor exposure you could get cheaper through a factor ETF.

β (factor loadings)

Each \( \beta_k \) is the portfolio's exposure to factor \( k \). \( \beta_{\mathrm{MOM}} = 0.4 \) means a 1% MOM factor return contributes 0.4% to the portfolio that month.

Sign matters: \( \beta_{\mathrm{HML}} < 0 \) is a growth tilt; \( \beta_{\mathrm{HML}} > 0 \) is a value tilt.

Fraction of return variance explained by the factors. \( R^2 = 0.90 \) means 90% of the portfolio's monthly variance comes from factor exposures; only 10% is idiosyncratic.

High \( R^2 \) is not bad — it means the model is doing its job. The question is what's left in the residual.

Residual ε

The unexplained portion of returns. Its variance is the portfolio's idiosyncratic risk. If two strategies have similar betas but different residual variance, the lower-residual one is more "factor-like" and less likely to surprise.

Worked example: decomposing a portfolio

A hypothetical multi-strategy portfolio, 48 months of returns. Regress against Carhart 4-factor + a custom Quality factor (QMJ). OLS with Newey-West errors:

TermEstimatet-statInterpretation
α (monthly)0.04%0.6Not statistically distinguishable from zero. No skill premium after factors.
βMKT0.8514.2High market exposure — the portfolio moves 85¢ for every $1 of market.
βSMB0.222.4Significant small-cap tilt.
βHML-0.18-1.9Marginal growth tilt (negative value loading).
βMOM0.353.8Strong momentum exposure.
βQMJ0.151.6Borderline quality tilt; not statistically robust.
0.8787% of variance explained by the 5 factors.

Reading the result

Example solution

Given the decomposition above, the QT takeaway is:

  • Report the betas in the monthly tear sheet, not just total return — investors should know the portfolio is mostly a market + momentum bet.
  • If a peer momentum factor enters a drawdown (e.g., the 2009 momentum crash referenced in W4), this portfolio is expected to lose roughly 0.35× the factor return, before any idiosyncratic effects.
  • To claim alpha, the portfolio needs a positive intercept with t-stat > 2 on a 36+ month window. Right now it doesn't have one — keep collecting data and re-run quarterly.

Common mistakes

Four ways factor analysis goes wrong

  • Confusing alpha with beta. A portfolio loading 0.5 on momentum during a +20% momentum year will look great. That's not alpha — it's a paid exposure. The alpha is what's left after subtracting the expected return from each factor exposure.
  • Using too short a window. Fewer than 36 monthly observations and the standard errors on the betas swamp the estimates. The Fama-French publishes monthly precisely so you accumulate enough history.
  • Ignoring multicollinearity. W5 covered VIF. Quality, low-vol, and profitability factors are highly correlated. Adding them all at once produces unstable coefficients even though \( R^2 \) goes up.
  • Treating betas as static. Loadings shift across regimes — a trend strategy has \( \beta_{\mathrm{MOM}} \approx 0.6 \) in trending markets and \( \beta_{\mathrm{MOM}} \approx 0.1 \) in chop. Rolling-window regression (e.g., 36-month windows updated monthly) is the standard fix.
← Week 6: Portfolio Construction Week 8: Market Disruptions →