Skip to content
All library documents

Why Market Cap Weighting Uses Square Roots in WLS Attribution

Article Quant Q&A · Author: mHelpMe

Summary

The document explains why a weighted least squares regression may multiply each observation by the square root of a company’s market capitalization in performance attribution. The key condition is a particular error model: residual variance must rise in proportion to market capitalization. Under that assumption, dividing residuals by the square root of market capitalization makes their variance constant, converting the transformed problem into ordinary least squares.

This provides a statistical rationale for the square root factor, rather than choosing it simply because it resembles benchmark weighting. The explanation rests on uncorrelated, heteroscedastic errors and on the specified relationship between residual variance and capitalization. If that data generation assumption does not fit the attribution setting, the weighting scheme is not justified by this argument alone. The document offers a derivation, but no empirical test comparing alternative weighting choices.

Key ideas

  • Weighted least squares can address heteroscedastic errors when observations remain uncorrelated.
  • A square root transformation stabilizes residual variance when variance scales with market capitalization.
  • The square root market cap factor follows from an assumed error variance model.
  • Benchmark weights are not interchangeable with statistical weights without further assumptions.
  • The explanation gives a derivation but no empirical comparison of weighting schemes.

Tags

Full text
# Why use square root of companies market cap in the WLS matrix


# Why use square root of companies market cap in the WLS matrix












When doing a regression based performance attribution I see that people normally use WLS.

So that both our independent and dependent variables are multiplied by our WLS matrix, which is a diagonal matrix that where the values on the diagonal are the square root of the companies market cap.

> X = X .* WLS y = y .* WLS

My question is why use the square root of the market cap of a company rather than say just the benchmark weights? Is it simply in case there is an off benchmark name?

## Answer by skoestlmeier (score 2, accepted)

https://quant.stackexchange.com/a/54249

It depends on your (assumed) underlying data generation process.

In general, Weighted Least Squares (WLS) can be used when your data is heteroscedastic but still uncorrelated.

Assume a linear model

$$Y_i = \beta_0 + \beta_1 X_i + \epsilon_i \tag{1}$$

If you assume $var(\epsilon_i) = \sigma^2$, i.e. the error terms are homoscedastic, OLS is the best linear unbiased estimator (BLUE). However, if you allow errors to be heteroscedastic, we have $var(\epsilon_i) = \sigma_i^2$, so the variance of residuals depends on the specific observation. However, you can rewrite the latter model as:

$$var(\epsilon_i) = \sigma_i^2 = \sigma^2 \cdot d_i \tag{2}$$

,so you can account for heteroscedasticity by assuming an overall constant error variance (just like OLS), but weighting each error term with a factor $d_i$. If you would divide $\epsilon_i$ by $d_i$, as in $\theta_i = \frac{\epsilon_i}{\sqrt{d_i}}$, you obtain

$$var(\theta_i) = var \left( \frac{\epsilon_i}{\sqrt{d_i}} \right)= \frac{\sigma_i^2}{d_i} = \sigma^2 = const \tag{3}$$

,which makes OLS applicable again. In fact, assuming (2), WLS is just OLS with a transformed model by dividing any observation by $\sqrt(d_i)$.

So how is the underlying weighting $w_i$ for any observation $x_i$ in the least square algorithm? In the case of OLS, we have $w_i \propto X_i$, wheres in WLS, each observation weight is proportional to $X_i / \sqrt{d_i}$.

In summary, for $d_i$ as the market capitalization of a firm, if you assume for the residual variance that $var(\sigma_i^2) = \sigma^2 \cdot d_i$ holds, i.e. the error variance is proportional to the market capitalization, you have to weight each observation $X_i$ with $\sqrt{d_i}$.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.