Why this method matters
RiskModels is more than a descriptive analytics layer. The ERM3 engine is built around a few choices that matter for practical quantitative use:
- Time-safe construction — the engine avoids common forward-contamination errors such as recycled tickers, snapshot shares, and retroactive universe contraction.
- Security Master discipline — ticker-level outputs sit on a point-in-time identity layer that supports symbol changes, classification lookup, and historically defensible shares data.
- Hierarchical structure — market, sector, and subsector are modeled explicitly rather than folded into a single flat factor view.
- Executable hedge ratios — published hedge outputs are designed to work with liquid raw ETFs at trade time, not only with orthogonalized synthetic factors.
- Adjusted return series — split- and dividend-adjusted returns keep the decomposition economically consistent across long horizons and corporate actions.
These choices do not remove normal model risk, but they explain why the model suits backtests, neutralization workflows, and portfolio diagnostics rather than surface-level screening.
The big picture
What is a hierarchical factor model?
A hierarchical factor model breaks down stock returns into layers of systematic risk, from broad to granular:
- Market (L1):how much does the overall market (S&P 500) explain?
- Sector (L2): how much additional variance comes from industry sectors — technology, financials, healthcare?
- Subsector (L3): how much comes from narrower industries within sectors — semiconductors, biotech?
- Residual: what is left is idiosyncratic risk — the stock-specific component.
At each level the model produces three metrics:
| Label | Name | What it tells you |
|---|---|---|
| HR | Hedge Ratio | Dollars of ETF to trade per $1 of stock to neutralize that factor |
| ER | Explained Risk | Percentage of the stock’s variance explained by that factor |
| RR | Residual Risk | Variance not explained by factors — the idiosyncratic remainder |
Why three levels?
- Three levels align with how institutional investors think: market timing, sector rotation, and stock selection.
- Too many levels lead to overfitting and unstable estimates.
- Too few — just market — miss important sectoral dynamics. A tech stock is not simply “market plus noise.”
Key insight: each level captures incremental explanatory power not already explained by higher levels, achieved through orthogonalization.
The three levels: L1, L2, L3
The cascade
The core idea: regress, take the residual, regress again. Each level strips out one more layer of systematic risk, and the leftover ε feeds into the next level.
| Step | Regression | What it captures |
|---|---|---|
| L1 | r_s = β_m · r_m + ε₁ | Broad market (SPY) exposure |
| L2 | ε₁ = β_s · r_s* + ε₂ | Sector exposure (incremental to market) |
| L3 | ε₂ = β_u · r_u* + ε₃ | Subsector exposure (incremental to L2) |
Notation: r_s = stock return, r_m = SPY return, r_s* = cleaned sector ETF return, r_u* = cleaned subsector ETF return.
Example: if NVDA has β_m = 1.3 and SPY returns +1%, we expect NVDA to move +1.3% from market exposure alone. The leftover ε₁ goes to L2 (technology, XLK). What remains, ε₂, goes to L3 (semiconductors, SOXX). The final residual ε₃ is pure stock-specific return.
Orthogonalization: why we clean the factors
Sector ETFs like XLK are not independent of the market — XLK has its own market beta. Using raw XLK returns at L2 would double-count the market exposure already captured at L1.
The fix: before regressing at each level, strip out higher-level exposures using link betas (λ):
Here λ(A→B) is the beta of ETF A regressed on ETF B (or its cleaned version), precomputed from historical data. This ensures each β captures only the incremental effect of its own level — no double-counting.
Beta estimation: Huber + Vasicek peer adjustment
Each level’s β is fit by a 252-day rolling Huber-M regression on the orthogonalized factor — robust to fat tails (binary events, earnings gaps, single-day reclassifications) without sacrificing efficiency on the bulk of normal trading days.
For L2 (sector) and L3 (subsector) only, the Huber estimate is then Vasicek-shrunktoward a log-mcap-weighted peer mean within the stock’s 4-digit industry cohort:
with α = σ²ᵢ / (σ²ᵢ + τ²), where σ²ᵢ is the per-stock β-noise variance and τ² is the cross-sectional weighted variance across peers. Short-history and small-cap names are pulled more strongly toward the cohort mean (large α); mega-caps with long stable estimates barely move (α ≈ 0).
L1 (market β_m) is not shrunk. Out-of-sample validation against 5,910 stocks over 19 years shows market-β shrinkage actively hurts residual variance for most stocks (a 41% win rate, well below coin-flip). Market β is the most over-determined coefficient in the cascade; pulling it toward peers introduces bias without reducing variance. The unshrunk Huber estimate is preserved for audit and reversibility. Methodology research and out-of-sample evidence: see the ERM3 research notes.
Hedge ratios: making it tradeable
What are hedge ratios?
A hedge ratio (HR) tells you how many dollars of an ETF to trade per $1 of stock position to neutralize a specific factor exposure.
| HR sign | Action | Meaning |
|---|---|---|
| Negative | Short the ETF | Hedge out factor exposure |
| Positive | Long the ETF | Add factor exposure |
L1: market only
If β_m = 1.2, short $1.20 of SPY per $1 long the stock.
L2: market + sector
The sector HR is the direct beta; the market HR is adjusted because shorting the sector ETF also implicitly shorts the market:
L3: market + sector + subsector
The subsector HR is the direct beta; sector and market HRs are further adjusted for the exposure embedded in the subsector ETF:
Consistency check: applied to raw ETF returns, these adjusted HRs satisfy the replication identity — decomposition into factor contributions plus residual reconciles back to the actual stock return. Verified at runtime for every stock, every date.
Explained risk: variance decomposition
What is explained risk?
Explained Risk (ER) measures what percentage of a stock’s return variance comes from factor exposures. It is the R² from the factor regression:
The additive property
Because the factors are orthogonalized, ERs add up perfectly:
This is guaranteed by construction and is verified at runtime to within 0.1% as a data-integrity check.
Interpretation
- Low ER (below ~50%): high idiosyncratic risk — more alpha opportunity, or more diversifiable risk.
- High ER (85%+): the stock is mostly a leveraged sector bet — systematic risk dominates.
- If ER(L2) > ER(L1), sector dynamics dominate market timing for this stock.
Putting it together: the replication equation
The model decomposes any stock’s return using only raw ETF returns — no orthogonalization required at trading time:
where Hᵢ is the hedge ratio (exposure) to ETF i, rᵢ is the raw total return of ETF i — not residualized — and ε is the idiosyncratic residual return, very small by construction. This is a mathematical identity, verified at runtime to within 0.1% for every stock on every date.
Why this matters: you can hedge almost any stock or portfolio using only highly liquid ETFs. No custom baskets, no exotic derivatives — just SPY, sector ETFs, and subsector ETFs.
Multi-period attribution: the geometric bridge
The replication equation decomposes a single day perfectly. Attributing a cumulative return over months or a year needs more care, because daily returns compound multiplicatively, not additively:
Naively summing daily factor contributions over a year overstatesthe compound return. The gap is volatility drag (Jensen’s inequality): for a stock with 39% annualized volatility, the arithmetic sum can diverge from compound gross by roughly 7 percentage points over one year.
The fix exploits the hierarchy directly. At each level, compound returns as if only factors through that level exist, then take telescoping differences between adjacent levels:
| Bar | Formula | What it captures |
|---|---|---|
| Market | prod(L1) − 1 | Compound return from the market factor alone |
| Sector | prod(L2) − prod(L1) | Incremental compound return from adding sector |
| Subsector | prod(L3) − prod(L2) | Incremental compound return from adding subsector |
| Residual | prod(G) − prod(L3) | Compound idiosyncratic return after all factors |
| Gross | prod(G) − 1 | Exact compound gross return |
The four bars sum exactly to the gross compound return — an algebraic identity (intermediate terms cancel), not an approximation.
Key property: the ordering matters. Market → Sector → Subsector → Residual must follow the strict L1 → L2 → L3 hierarchy, mirroring the sequential regression cascade.
Worked example: Walmart (WMT)
Illustrative values, chosen for a clean walk-through of the hedge-ratio construction.
Step 1 — regression betas
| Parameter | ETF | Value |
|---|---|---|
| β_m | SPY | 0.50 |
| β_s | XLP (Consumer Staples) | 0.30 |
| β_u | PBJ (Food & Beverage) | 0.20 |
Step 2 — link betas
| Relationship | Meaning | Value |
|---|---|---|
| XLP → SPY | Consumer Staples’ market beta | 0.60 |
| PBJ → SPY | Food & Beverage’s market beta | 0.40 |
| PBJ → XLP | Food & Beverage’s sector beta | 0.70 |
Step 3 — build hedge ratios (bottom-up: L3 → L2 → L1)
| Level | ETF | Direct beta | Link adjustment | Final HR |
|---|---|---|---|---|
| L1 Market | SPY | 0.50 | +0.176 | −0.324 |
| L2 Sector | XLP | 0.30 | +0.14 | −0.16 |
| L3 Subsector | PBJ | 0.20 | — | −0.20 |
Verification — sample day
With SPY +1.00%, XLP +0.80%, PBJ +1.20%, and WMT +1.10%:
That +0.408% is pure stock-specific return — idiosyncratic alpha after neutralizing every factor exposure.
Choosing a level: the L* rule
L1, L2, and L3 are not stacked layers — each is a standalone hedge solution with its own market/sector/subsector ratios. By construction, total explained risk is monotonic in level: ER(L3) ≥ ER(L2) ≥ ER(L1). So “always pick L3” looks optimal.
In practice it is not. For mega-cap names where the subsector ETF effectively is the stock, the L3 subsector hedge ratio gets unstable: the marginal explained return from the third ETF can be under 1%, and the hedge ratios that absorb a near-zero variance contribution flicker noisily month to month.
L* (L-star) picks the simplest level whose marginal explained return clears a threshold θ:
The decision is made per (ticker, month). The default threshold is θ = 0.01 (1%) — chosen via a side study across 275 tickers (the 25 largest by market cap in each of 11 GICS sectors) over a 60-month window: monthly point-read inputs at 1% won or tied in 10 of 11 sectors on forward 12-month realized explained return, and 12-month smoothing degraded results by up to 176 bps in Energy and Financials.
When L* picks a lower level, the hedge is smaller and simpler, not a subset of the L3 hedge — each level’s ratios are internally consistent within that level’s regression. When L* = L1 — usually idiosyncratic-heavy names — neither the sector nor the subsector ETF clears the bar: the model is telling you the residual is most of the story.
Why this matters for trading
- Direct hedging.Unlike academic factor models that output abstract “factor loadings,” the model gives actionable hedge ratios executable with liquid ETFs on any brokerage platform.
- Tax-efficient risk scaling. To reduce tech exposure without selling a position and triggering capital gains, short XLK proportionally — the adjusted hedge ratios ensure you are not accidentally double-hedging the market.
- Alpha measurement. The residual εat L3 is the true idiosyncratic return. Positive residuals over time are alpha; negative residuals are underperformance that cannot be blamed on “the market was down.”
Residual mean-reversion signal
The L3 residual — the part of a return left after market, sector, and subsector exposures are hedged out — is, by construction, the genuinely idiosyncratic component. The residual mean-reversion signalmeasures how stretched that residual is right now: a trailing 5-day cumulative L3 residual return, z-scored by the stock’s own 60-day residual volatility. A large negative value means the stock has under-performed its cascade-implied path over the past week; a large positive value means it has over-performed.
This is a combo-input factor — a building block for multi-signal alpha stacks, not a standalone strategy. In a 5-year backtest the cross-sectional decile long-short carries a gross Sharpe near 0.79 (rising to ~1.28 within the high-subsector-ER quintile), but under realistic market-impact costs the net-of-cost capacity caps below ~$1M of book size:
| Book size | Net Sharpe (decile long-short) |
|---|---|
| $0.5M | ~0.0 |
| $1M | ~−0.2 |
| $5M | ~−1.0 |
| $25M | ~−2.8 |
The signal is informative pre-cost; it earns its place inside a diversified signal portfolio where many uncorrelated factors combine, not as a strategy traded on its own. The reversion is materially cleaner for stocks that track their subsector tightly — a residual deviation only means “temporary dislocation” when the stock normally tracks its cohort. This is informational analytics, not investment advice.
How this compares to traditional risk models
| Feature | RiskModels | Barra / Axioma |
|---|---|---|
| Factor composition | Directly tradeable liquid ETFs (SPY, XLK, …) | Synthetic factors (value, momentum, PCA-derived) |
| Hedging execution | Short the ETF directly | Requires custom factor-mimicking baskets |
| Model structure | Hierarchical, orthogonal per level | Multivariate, hundreds of factors |
| Responsiveness | Short lookback — responsive to market shifts | Long history — stable but slower to adapt |
| Primary use case | Active hedging, tactical PM | Institutional reporting, long-term attribution |
Glossary
| Term | Definition |
|---|---|
| L1 (Market) | First level: broad market (SPY) exposure |
| L2 (Sector) | Second level: sector-specific exposure (XLK, XLF, …) |
| L3 (Subsector) | Third level: granular industry exposure (SOXX, XBI, …) |
| β (beta) | Sensitivity coefficient: β = Cov(r_s, r_f) / Var(r_f) |
| HR | Dollar amount of ETF per $1 of stock to neutralize a factor |
| ER | Variance fraction explained by factors: 1 − Var(ε) / Var(r) |
| λ (link beta) | Beta between ETFs at different levels |
| Orthogonalization | Removing higher-level exposure from lower-level factors |
| ε (residual) | Idiosyncratic return unexplained by any factor — stock-specific alpha |
For programmatic workflows — multi-ticker batches, xarray factor cubes, portfolio aggregation — and the live decomposition endpoints, see the API documentation and Python SDK at riskmodels.app. This note is expository and not investment advice.
← Return to overview