factor-modelslisted
Install: claude install-skill howard-lynn-ye/fin-skills
# Factor models
**A factor portfolio is a subscript problem before it is a statistics problem.** The formula for
HML is public and takes one line; what decides whether your HML is a factor or a look-ahead is
*when* the characteristic was measured relative to the return it earns. Get that wrong and the
t-statistic is not weak evidence, it is manufactured evidence, and every standard error correction
downstream is beside the point.
> **characteristic known at t -> portfolio formed at t -> return measured over t -> t+1**
Every number below is printed by `scripts/factor_regression.py` (numpy / pandas, seed 0, about
3 s, statsmodels optional). The panel is 500 stocks x 240 months in which **the truth is alpha = 0
and there is no value premium**: `r_it = beta_i * m_t + e_it`, book equity is a slow random walk,
so book-to-market moves almost entirely with the stock's own price. Anything a sort finds in it is
an artefact.
## 1. 🚨 Forming on the contemporaneous characteristic manufactures the alpha
✅ Measured, seed 0, top 30 % minus bottom 30 %, re-sorted monthly, Newey-West lags
`floor(4(T/100)^(2/9))` = 4. `mean` and `CAPM a` are percent per month; `CAPM a` is the intercept
of the long-short return on the value-weighted market:
| formation | mean %/mo | NW t | CAPM alpha % | HAC t | beta |
|---|---|---|---|---|---|
| **lag 1, value-weight** (B/M at t-1) | -0.071 | -0.67 | **+0.002** | **0.02** | -0.13 |
| lag 1, equal-weight | -0.038 | -0.47 | -0.003 | -0.03 | -0.07 |
| lag 6