Building a Factor Risk Model: The Cross-Sectional Regression
Building a Factor Risk Model: The Cross-Sectional Regression
Two posts of setup have produced one thing: a matrix of standardized factor exposures, one row per stock per week, known in full before the week starts. Nothing so far says what those exposures are worth: whether being small, or cheap, or loaded with beta earned a stock anything in a week, and how much.
This post estimates that worth. Take one week. Line up every stock in the market with its exposures on the left and the return it went on to earn on the right, and find the set of numbers that best explains the second column from the first. Those numbers are the factor returns: the payoff to one unit of exposure to size, or quality, or the technology sector, over that one week.
If regression is a hazy memory, one idea is enough. A stock’s return is assumed to be built out of a few shared ingredients, in proportion to how much of each ingredient the stock has. The proportions are known: they are the exposure matrix. The ingredients’ worth is not. So we pick the values that make the predictions miss by as little as possible across all 2,200 stocks at once, and those values are the answer. Repeat 572 times, once per week, and the result is a history of what each factor paid.
The fitting itself is textbook. What makes this post worth writing is that the matrix we want to feed it is unsolvable, in a way that is not a numerical accident and cannot be rounded away. The standard repair is not a trick either. It is a modeling decision that changes what every number in the model means.
One Week at a Time
That repair is the second half of the post. The first half needs the model written down, per date :
Read left to right, that says: a stock’s return next week is the market’s return, plus whatever its sector did, plus a contribution from each style it happens to be tilted toward, plus a leftover that belongs to that stock and nothing else.
Term by term. is stock ’s return over the following week, the fwd_return column the last post built with a LEAD. is a country factor, which every stock is exposed to equally: the model’s version of “the market.” is a sector dummy: a switch, 1 if stock is in sector that week and 0 otherwise, so each stock switches on exactly one of the eleven. is a style exposure, the z-scored number from the last post, where 0 is an average company and 1 is one standard deviation above it. And is the leftover, which becomes specific risk in the next post.
The terms are the unknowns. Everything else in that equation is a number we already have.
The Betas Are the Inputs
Which side of a regression holds the unknowns is where most readers trip, and it is the decision that separates this model from the one most people meet first.
Ask someone to regress stock returns on factors and they will describe this: pick a stock, get eleven years of its weekly returns, get eleven years of the market’s, and regress one on the other. Out comes a slope. That slope is the stock’s beta, and it is what the regression was solving for. Do it with three factors instead of one and that is the Fama-French setup, where the three factor returns are known week by week and each stock’s three betas are the unknowns.
That works because Fama and French build their factors as portfolios first. Sort every stock by book-to-market, go long the cheap third and short the expensive third, and whatever that portfolio earns this week is HML’s return this week. It is observable before any regression is run, so it can go on the right-hand side.
We have nothing like that. Nobody hands us “the quality factor returned 0.3% this week.” What we have, from the last two posts, is a number for how quality-ish each company is, computed from its own financial statements. So the two sides swap:
| Fama-French, time series | This model, cross section | |
|---|---|---|
| One regression per | stock | week |
| Runs over | ~570 weeks of history | ~2,200 stocks on one day |
| Known going in | the factor returns | the exposures |
| Solved for | that stock’s betas | that week’s factor returns |
| Exposure comes from | fitting a line to past returns | the company’s characteristics today |
Solving for the factor returns out of measured characteristics is the Barra approach, and the argument for it is that fitted betas are always stale. A rolling-window regression reports what a company’s sensitivity looked like averaged over the last year. A company that has just doubled in size, though, is a large-cap now, and its market cap says so today, months before a rolling window notices. Characteristics update the instant the financials do. Fitted betas lag by construction, and they lag most right after a company changes, which is when the answer matters most.
The cost is that building it means taking a position. Saying “this company’s size exposure is 1.4” asserts that log market cap, z-scored, is the right way to measure the thing. That assertion is post 2, in its entirety. Here we treat it as given and solve for what it was worth.
So: exposures in, factor returns out, once per week. Nothing in the answer is a long-run average. Next Friday gets its own regression from scratch, so there are 572 of them rather than one.
On the real panel that comes to 573 weekly dates running from 2013-05-10 to 2024-04-26. The last one has no forward return, so there are 572 regressions. The cross-section runs from 1,489 stocks on the first date to 2,952 on 2021-06-25, with a median of 2,187, and the path between those is not monotonic: the number of observations the model gets is itself a moving target.
The Regression in Matrix Form
Though the two sides are now settled, one more piece of setup is worth having, because everything after this is easier to read with it in hand.
We stack the per-stock equation from the start of the post across all stocks in the week. We put every stock’s exposures in a row, and those rows into a matrix with rows and columns. The forward returns go into a column vector of length , and our twenty unknowns into a vector :
That matrix is narrow and tall: 2,200 rows by 20 columns on a typical week. That shape is the whole reason this is solvable at all. Twenty unknowns against 2,200 equations leaves the system over-determined many times over, so no satisfies the whole set, and our job is to find the one that comes closest.
“Closest” means smallest total squared miss, with each stock’s miss weighted by how much we trust it. We write those weights on the diagonal of a matrix , and the quantity we make as small as possible is . Setting the derivative to zero gives the normal equations, which are the entire content of least squares:
Both sides are small. is , and it is worth knowing what is in it: entry is the weighted overlap between column and column of the exposure matrix. The diagonal is how much each factor varies across stocks. The off-diagonal is how much any two factors vary together. on the right is the same overlap, taken between each column and the returns.
So our solve is this: given how the factors overlap with each other, and how each overlaps with returns, disentangle them into twenty separate effects. That framing shows immediately when it cannot be done. If one column is a combination of others, its overlaps contain no information the others do not already contain, has no inverse, and there is nothing to disentangle.
That is not a hypothetical here. It is what our exposure matrix does, and working around it is most of what is left in this post. First, though, come the rows it runs on.
The Panel
Before any of that can run, the exposure matrix has to be filtered down to rows the regression can use. The last post’s output has 1,256,784 investable rows, and the regression panel has 1,253,927. Six predicates account for the difference, and which ones do work is not obvious.
Starting from the investable universe, only one of the six removes anything: fwd_return IS NOT NULL, which drops each ticker’s last observation. That is 2,857 rows, and the whole gap. The investability filter is what defined the 1,256,784 in the first place, and the remaining four measure zero on this data:
WHERE investable_mcap AND investable_liq
AND fwd_return IS NOT NULL
AND isfinite(fwd_return)
AND date_diff('day', date, fwd_date) = 7
AND sector IS NOT NULL
AND market_cap > 0 AND isfinite(market_cap) Zero-row guards are easy to argue away and worth keeping anyway, because the question is not whether they fire but how the code fails if they do not. isfinite(market_cap) is the sharp one: DuckDB total-orders NaN above every finite value, so a NaN market cap passes > 0 and enters the SUM(sqrt(market_cap)) that normalizes the weights, poisoning the entire week’s factor returns. And LEAD follows row order, not the calendar, so without the date_diff guard a ticker with a gap in its history would feed a three-week return into a one-week regression. On this data neither can happen (every forward date is seven days out and no market cap is NaN), but that is a fact about the file rather than a property of the code.
Missing exposures get a zero
Filtering rows is not the only gap the panel has to close. Not every stock has all eight exposures on every date. A company that listed two years ago has no three-year sales trend, so its growth exposure is null. Across the whole panel, 13.01% of rows are missing at least one, and growth accounts for nearly all of them.
The regression needs a number in every cell, so every null becomes a zero. That is less arbitrary than it sounds. The exposures were z-scored in the last post, which means zero is not “no exposure” but average exposure: the model is saying “we don’t know this company’s growth, so call it average.” For a factor with no strong prior that is a defensible default, and it is one line of COALESCE.
The obvious alternative is to drop the row instead, and that was the plan here until the next post’s requirements came into view. Dropping avoids inventing a number, which is a real advantage. It also churns the universe from week to week, and it punches holes in a stock’s return history in the years when the company is young. The next post estimates each stock’s specific risk from that history, and that estimate needs the history continuous, so the holes get paid for later at a worse rate than the guess costs now.
A production model would not stop at zero. It would fill from the stock’s own sector median, or shrink a thin exposure toward the middle rather than pinning it there, or carry a flag so the covariance step knows which numbers were invented. This one pins it and says so.
The Wall
Now we assemble for one date: one country column of all ones, eleven sector dummies, eight styles, so .
That matrix is singular, and not approximately. Every stock belongs to exactly one sector, so the eleven dummy columns add up, row by row, to a column of ones—namely, the country column. We have handed the solver two ways of writing the same thing and asked it to pick one.
A small version makes it concrete, with four stocks and two sectors:
| stock | country | tech | energy |
|---|---|---|---|
| A | 1 | 1 | 0 |
| B | 1 | 1 | 0 |
| C | 1 | 0 | 1 |
| D | 1 | 0 | 1 |
Say the country factor returned 1% and both sectors returned 0%. That predicts 1% for each of the four stocks. Now say the country factor returned 0% and both sectors returned 1%. The prediction is still 1% everywhere. Or country 5% and both sectors −4%. Same predictions again.
These are not competing explanations that better data could settle. They are one explanation written three ways. Add any amount to the country factor, subtract it from every sector, and not one predicted return moves. There is no best answer to find, because an entire line of answers fits equally well and nothing in the data prefers a point on it.
Barra’s own documentation for USE4 puts it plainly:
Note that adding the Country factor introduces an exact collinearity into the model. That is, for all stocks n, the sum of industry factor exposures … is exactly the USE4 Country factor exposure. A constraint, therefore, must be applied…
In our matrix language from two sections ago: the country column adds nothing to that the eleven sector columns did not already contribute, so the matrix cannot be inverted and the normal equations have no unique solution.
Floating point does not rescue this. The standard measure of how much a matrix magnifies rounding error is its condition number, and here comes in at . That is past the roughly sixteen digits a double has, so no precision is left to work with. A solver handed that might refuse, or might return twenty plausible-looking numbers that are pure noise. The solver in this post never has to choose, because it is never handed this matrix at all.
Why keep both columns, when dropping one is free? Because together they split a stock’s move into the part that was the market and the part that was its industry, which neither column does alone. Without a country factor, every sector return in a bull week comes back positive and “technology beat the market” is a subtraction someone has to do by hand. Without sector dummies, the country factor absorbs the industry tilts. Keeping both is what makes the split explicit, and the price of the split is a matrix that no longer has a unique answer.
Three Ways Out
A singular design matrix has three standard exits, and each gives up something different.
The first is to drop a sector. Pick one, leave its dummy out, and every remaining sector coefficient becomes a return relative to the one dropped. This works, and it is what most textbooks do. It also means the model’s output depends on an arbitrary choice, and no coefficient means anything on its own. “Energy returned 0.4%” becomes “Energy returned 0.4% more than Utilities”, forever, in every downstream calculation.
The second is to drop the country factor. The sector dummies then span the constant, so the market is inside them, which gives up the thing the country factor was for.
The third is to constrain. Keep all twenty columns, and settle the ambiguity by decree. The collinearity left an entire line of equally good answers and nothing in the data to prefer one, so the preference has to come from us: impose one extra requirement and let it do the choosing. USE4 again:
In USE4 we adopt the constraint that the cap-weighted industry factor returns sum to zero
where the weights are “the capitalization weight of the estimation universe” in each industry. Written out:
The constraint scales each sector’s return by how large that sector is and requires the total to come to zero. Sectors can be up and down relative to each other, but not all up together, because “all up together” is what the country factor is for. Anything common to the whole market is pushed into , and what remains for a sector is its deviation from the market. Exactly one of the equally good answers satisfies it, so the ambiguity is gone.
This third route is the one to take, and the reason has little to do with rank.
The constraint and the intercept
Every regression has an intercept, and in most regressions it is a nuisance parameter: the value we would predict for a hypothetical observation with zero on everything, usually a thing that does not exist. Here it is the number the whole model gets quoted against, and it is our constraint that makes it so.
Work out what our model predicts for the market as a whole. We take the fitted return of every stock and average them, weighting each stock by its market cap. That gives us the fitted return of the cap-weighted universe: a real portfolio, and the closest thing in the data to “the market.”
where is stock ’s share of total market cap. Look at the two bracketed terms.
The first one, , adds up the cap weight of every stock in sector . That is , the number in our constraint. So the whole middle term is , which the constraint has just set to zero.
The second, , is the cap-weighted average of a style exposure across the market. That is also zero, for a different reason: the last post z-scored every style by subtracting its cap-weighted mean. At the time that looked like a mild preference about where to center a distribution. This is what it was for.
Both terms drop out, and we are left with:
The intercept is the market’s fitted return. Every other coefficient is then a deviation from it: a sector factor is what that sector did over and above the market, a style factor is what a one-standard-deviation tilt paid on top of everything else, and both are quoted against a baseline that means something.
Two pieces of precision are needed, because this is the sort of result that gets repeated as tidier than it is.
The sector term is exactly zero. The driver accumulates the constraint from the panel’s own market caps in the same pass that builds the dummy columns, so the in the constraint and the in the identity are the same arithmetic on the same rows. Not approximately equal. The same.
The style term is only nearly zero. Post 2 centered each style over the investable universe, and the panel is not quite that population: it drops each ticker’s last observation and it fills nulls with zero, and the z-scoring knew about neither. Measured over all 572 dates, the cap-weighted mean of a style exposure across the panel reaches 0.002 at worst, against the roughly it comes to on the population it was centred on. So the identity holds to a few thousandths of a standard deviation rather than to anything like working precision. That is small enough to ignore in a plot, and not the kind of thing to call exact.
A third gap is more basic than either of those. is the market’s fitted return. The market’s realized return differs from it by the cap-weighted average residual, which is not zero by construction, because our regression is weighted by rather than by cap. USE4 says the country factor “essentially represents” the cap-weighted estimation universe. These three gaps are what that hedge is for.
Compare that to dropping a sector. There the intercept is the fitted return of a hypothetical stock in the omitted sector with average everything else, which is not a portfolio anyone holds and not a number anyone wants.
And the other nineteen
The sector coefficients get the same treatment. Under this constraint each one is the return of a portfolio that is 100% long that sector and 100% short the country factor, with no net exposure to any style. The styles come out dollar-neutral, with one unit of exposure to themselves and zero to everything else.
Every coefficient of a linear estimator is some portfolio’s return, under any of the three repairs, so that part is not special. The constraint decides which portfolio each one is, and these are the ones that can be quoted in a sentence without a footnote naming the sector that was dropped.
The constraint weights come from the same estimation universe the exposures were standardized over, which the cancellation above depends on. Not quite the identical rows: the constraint is accumulated over the regression panel, which is the investable universe minus each ticker’s final unusable observation, the 2,857 rows from earlier.
Weights
The constraint decided what the coefficients mean. The weights decide how much each stock contributes to them, and the regression is weighted, with normalized to sum to one on each date.
A least-squares fit makes the sum of squared misses as small as it can, so the rows it tries hardest to get right are the ones capable of missing by the most. Small-cap weekly returns swing far wider than large-cap ones, so under equal weighting a few hundred micro-caps having a wild week end up steering coefficients that are meant to describe the whole market. Unequal noise like that is called heteroskedasticity, and the standard repair is to give each observation a say in proportion to how much we can trust it.
Full cap weighting overcorrects in the other direction: a few mega-caps would decide every coefficient, and the model would stop describing anything but them. Square root is between the two, and it is what Barra uses.
One thing this does not do is choose a portfolio for the model to describe. The weights are there for estimation efficiency, and they say nothing about which stocks matter.
Solving It
The weights and the constraint together specify the problem fully. There are two standard ways to fit a least-squares problem with a rule attached to the answer, and the choice matters far more for the code than for the numbers.
The obvious one is Lagrange multipliers: bolt one extra unknown onto the problem whose only job is to enforce the rule, and solve the enlarged system in one go. That gives us a bordered system, with the original matrix in the corner and our constraint vector along the edge:
That is a system, it works, and it has one awkward property: the zero in the bottom-right corner guarantees the matrix is indefinite, meaning it stretches in some directions and flips in others. The fastest standard method for symmetric systems, Cholesky factorization, requires the opposite, so this route forces a heavier factorization (, or a pivoted LU), which costs more code and a slower solve.
The other formulation never enforces the rule, because it makes breaking the rule impossible to express. Twenty numbers with one linear condition tied around them have only nineteen independent quantities in them. So we stop solving for twenty. We introduce nineteen new unknowns , and a fixed matrix that turns any whatsoever into a valid :
We solve those nineteen equations, multiply by , and the answer satisfies the constraint because there was never a route to an answer that did not.
The nineteen-by-nineteen matrix that comes out is symmetric and positive definite (the property that says the problem has one lowest point rather than a flat valley floor to wander along). A flat direction is what the twenty-column version had, and it is why Cholesky is the right tool now: the factorization fails, loudly and cheaply, on the matrices that have no unique answer. Getting a factorization at all is itself a check that the problem was well posed.
This is also the formulation the Barra documentation describes, so the citation and the code agree about what is being computed.
Building is one line of linear algebra with one real decision inside it: which coefficient to eliminate. The solver pivots on the largest entry of , which bounds every entry of by 1, since the only non-trivial row is and by construction. Pivot on a small entry instead and an otherwise identity-like matrix picks up huge values, which is the numerical problem the pivot rule exists to avoid.
The reduced system’s condition number comes back around 40 on synthetic designs built to this panel’s shape, against unreduced, and the measured end-to-end error in is around . That is also the answer to the standard objection that forming explicitly squares the condition number and QR is safer. At the squaring costs about one decimal digit out of fifteen, and QR would give up the shortest path to standard errors, which come off the Cholesky factor directly.
The Solver
That reduced system is all the code there is, and it is small enough to write rather than import. The solver is one TypeScript module: a scratch buffer, and fifty lines of Cholesky and triangular substitution that read the coefficients and the standard errors back off the factor. At nineteen unknowns there is nothing for a dense linear algebra dependency to add except its own conventions.
The scratch buffer is allocated once, sized to the largest cross-section the panel contains. It comes to about 510 KB, of which the 2,952 by 20 design matrix is 461 KB and everything else is rounding. Exposures are stored column-major with stride n, not the maximum: a narrower week uses a shorter prefix of each column, which is what lets one allocation serve every date. It is also the one detail here that reads wrong on a skim.
Most of what the module does is refuse. The dangerous failures here are the quiet ones, where the wrong answer arrives as a plausible number. A NaN anywhere in the exposures propagates through into every factor return for the date, and nothing upstream can see it coming, because a NaN is a valid double and the column’s null count stays zero. With a duplicated column, the Cholesky reaches a non-positive pivot, whose square root is NaN and still plots. An infinite pivot is worse: it square-roots to infinity and comes back as with zero standard errors, every number finite and every number wrong. So the solve checks its inputs for finiteness, its weights for sign, its pivots for both, and its outputs for overflow, and it throws on each rather than returning the plausible number.
None of that care is about speed, because there is no speed problem to solve. 572 dates, a 20 by 20 solve over roughly 2,200 rows each, is on the order of 500 MFLOPs, which plain TypeScript clears in well under a second. When the run starts further down the page, nearly all of the wait is the pipeline that feeds it.
Twelve Chunks
One allocation serves every date, but the panel still cannot reach it in one pass. The panel is 1,253,927 rows and 20 columns. Materializing all of it as float64 is about 191 MB, which is more than a browser tab should be asked for on top of a DuckDB instance already holding the exposure matrix and the panel itself.
So the run is chunked by calendar year: twelve chunks, 2013 through 2024 with the first and last partial, roughly 52 dates each and about 17 MB per chunk. The panel has a yr column so a chunk is WHERE yr = 2015 and nothing has to be recomputed.
Twelve chunk boundaries would also make a progress bar that moves in twelfths, so the solve loop yields to the main thread on a roughly 16ms frame budget instead, which adapts to the machine rather than guessing a stride.
Running It
Everything above runs in the browser. The build downloads two parquet files and runs the exposure pipeline from the last post before the first solve, and it asks the browser for just under two gigabytes of memory on the way through. End to end that measured about 25 seconds here, and the parquet download is the part that varies with the connection.
Cross-Sectional Regression
The cumulative country factor comes to about +256% over the eleven years. That is roughly the cap-weighted estimation universe quoted as a total return, about where a broad US total return should come out for the period. Among the styles, quality is the standout with a t-statistic near 7.9 on about +65% cumulative. A t-statistic is an estimate divided by its own standard error, so it reports how many error bars separate the answer from zero, and anything past about 2 is conventionally hard to write off as luck. Note that this one is a different animal from the standard errors mentioned earlier, which describe one week’s cross-section. This one tests whether the eleven-year average weekly quality return is distinguishable from zero. Value ends at almost the same +66%, but with a t near 3.5: the same endpoint, reached twice as noisily. Beta is the only style in the red, at about -8% cumulative, and it is not distinguishable from zero. Neither is growth, which goes nowhere at all: its t is near 0.1, a reasonable place for a factor built from a three-year sales trend to be.
Weighted is the share of the week’s variation in returns that the twenty factors account for, where 1 is a perfect fit and 0 no better than predicting the same number for everyone. It has a median of 0.155 across the 572 weeks. It runs from 0.037 in the quietest week to 0.653 in the loudest. The mean is 0.179, which is higher than the median because the distribution has a long right tail: the weeks the factors explain well are the weeks something happened to everyone at once.
If those numbers sound low, they should. A cross-sectional factor model explains the common part of returns, and the whole point of the exercise is that most of an individual stock’s weekly move is idiosyncratic. The five-sixths left over is the specific return, and it is not waste. It is the input to the next post.
What was checked
It is easy to write a verification for this that passes no matter what. The obvious one is to confirm the constraint holds: compute and check it is zero. It comes back at over all 572 dates, and it is nearly worthless as evidence, because was built from so that holds automatically. The check is asking the solver to confirm a property it could not have violated, for whatever it happened to be handed. Hand it a permuted constraint vector and the check still passes at , with the sector returns wrong by about 0.2%.
The check with teeth reconstructs each stock’s fitted value from its own sector and style columns and requires the leftover to equal the residual the solver returned. Nothing on that path touches the solver’s internal bookkeeping, so it pins the entire column layout at once, catching a dummy column built for the wrong sector, a style block read at the wrong offset, or a residual slice off by one date. Those are the failures that leave , the residual multiset and the constraint check untouched.
Over all 1,253,927 rows, the largest discrepancy is .
The Portfolio Behind a Factor Return
Back to the comparison from the top of the post, now that there is something to compare.
Fama-French’s HML is a portfolio somebody built by hand: sort on book-to-market, buy the cheap end, sell the expensive end, and report what it earned. It is admirably transparent and it is also blunt. The cheap end of the market is not just cheap. It skews small, it skews unprofitable, it skews toward a few industries. So HML’s return is value’s return plus whatever those side bets happened to pay, and separating the two is a research paper rather than a definition.
Our factor returns are not built. They fall out of the solve, and they come pre-separated. That is a property of least squares rather than something we arranged. In a textbook regression (one without our exact collinearity) the normal equations rearrange into
which says every is some fixed set of weights applied to the vector of returns. Our has no inverse (that was the whole middle of this post), but our constrained solve comes out in the same form. We run the reduced system back out through and
which is a different fixed matrix, but still a fixed matrix, applied to the vector of returns. Fixed weights on stocks is a portfolio. So each factor return is the realized return of a specific portfolio, and its holdings can be read straight off row of that matrix without running anything.
What makes those holdings worth having is the inverse in the middle. It is the step that undoes the overlap between columns, so the portfolio behind has one unit of value exposure and, by construction, zero exposure to size, quality, momentum, every sector, and the market. It is value’s return with the side bets already removed. The standard name is a factor-mimicking portfolio, and getting one is the entire reason we fit all twenty factors jointly rather than one at a time.
Hold onto that zero-by-construction, because the columns going in are anything but orthogonal.
Style Exposure Correlations
Needs the exposure matrix: a parquet download and a pipeline run, about twenty seconds. Shared with the regression on this page, so this is instant if you have already run that.
Volatility and beta come back correlated at 0.571. They are the pair to watch, and no surprise, since a high-beta stock is usually a volatile one. The tempting fix is to orthogonalize the exposure first: regress the volatility column on the beta column across stocks and keep the residual, so what enters the model is “volatile beyond what its beta explains.” But there is no leak to fix. The disentangling that step promises is the inverse above, it happens whether or not the input columns are correlated, and within each week it is complete: the portfolio behind the volatility factor has zero beta exposure, on these columns as they stand. Correlated columns inflate the variance of the estimate, meaning wider error bars. They do not bias it. What orthogonalizing the exposures does is change what the factor is: afterwards “volatility” no longer means volatility, it means the part of volatility that beta cannot account for, and the beta factor absorbs the rest.
That redefinition is not a hypothetical alternative. It is the difference between this model’s volatility factor and Barra’s, and the names are close enough to invite a false comparison. Ours is the plain thing: the standard deviation of a stock’s weekly returns over the past year, outlier-trimmed and z-scored, with nothing taken out of it. USE4’s Residual Volatility earns its “not captured by the Beta factor” description in two steps, and the name reports only the smaller one. The exposure is a blend that is mostly plain daily volatility (74% of the weight), plus a cumulative-range measure (16%) and a 10% sliver of residual volatility in the literal sense (the standard deviation of what is left of the stock’s returns after hedging out its beta). Then the blended column is orthogonalized to Beta across stocks, and that second step, not the residual-returns descriptor, is what makes its beta correlation zero: zero is the thing orthogonalizing produces, on any input. So when a published model puts the vol-beta correlation at zero where this one puts it at 0.571, the difference is not a cleaner dataset. It is a different definition.
What the regression does not do, and cannot do one week at a time, is decorrelate the factor returns over time. Zero overlap within a week says nothing about the weeks lining up: the volatility and beta portfolios are rebuilt from correlated columns every Friday, and across 572 weeks their return series are free to move together. So leaving the columns alone costs wider error bars now, and hands the next post a factor covariance matrix with more shared variation between volatility and beta than Barra’s would have. Both coefficients stay identified either way. The honest reason it is not done here is not that argument, which is true but happens to license doing nothing. Orthogonalizing is another step in the pipeline, another set of tests, and another paragraph to write, and this is a model built to show how the machinery works rather than one anyone should point at money. At a correlation of 0.571 it was more effort than this post was willing to spend. If the covariance matrix in the next post comes back with volatility and beta joined at the hip, this is the line to come back to.
What’s Next
What comes out of that run is 11,440 weekly factor returns, 20 for each of the 572 dates, and 1,253,927 specific returns. Neither is a risk model. A risk model needs a covariance matrix of the factor returns and a variance for each stock’s specific return, and both come down to one question in two forms: how much of the measured past should be believed about next week?
That is the next post: exponential decay weights on the factor return history, specific risk estimated from the 1.25 million residuals, and the assembly of .