The RiskModels Hierarchical Factor Model
Welcome to the methodology wiki. This page explains the math and intuition behind our three-level hierarchical factor model. Whether you're a portfolio manager trying to understand your exposures or a quant looking to replicate the analysis, this guide will walk you through the key concepts.
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 (Tech, Financials, Healthcare, etc.)?
- Subsector (L3): How much comes from narrower industries within sectors (semiconductors, biotech, etc.)?
- Residual: What's left is the stock-specific component
At each level, the model produces three key metrics you'll see throughout the dashboard:
| Label | Name | What it tells you |
|---|---|---|
| HR | Hedge Ratio | How many dollars of an ETF to trade per $1 of stock to neutralize that factor — the actionable output |
| ER | Explained Risk | What percentage of the stock's variance is explained by that factor — the diagnostic output |
| RR | Residual Risk | The portion of variance not explained by factors at that level — the stock-specific remainder |
One Word, Two Axes: Residual Risk vs. Residual Return
The word "residual" names the factor-model remainder — a daily return series. Two different numbers derive from that one series, and they answer different questions:
| Quantity | Axis | Definition | Question it answers |
|---|---|---|---|
| Residual risk share | Risk (variance) | — a share of variance, sums with the factor ERs to 100% | "How much of the risk is stock-specific?" |
| Residual return | Return (realized) | The compounded over a window — a return in percent | "How much return did stock selection add?" |
A portfolio can have a high residual risk share and a negative residual return, or vice versa. Everywhere in the product, variance-share numbers carry a "risk" qualifier and realized-return numbers carry a "return" or "selection" qualifier — never read a bare percentage across axes. One more asymmetry: residual risk diversifies away as you add names (residuals are largely uncorrelated), while factor risk does not — so a portfolio's residual risk share is far smaller than its holdings' average.
These metrics are always qualified by level: L1 (Market), L2 (Sector), L3 (Subsector). So a dashboard column labeled L2 Sector HR is the hedge ratio for the sector ETF at level 2, L3 Subsector ER is the variance explained by the subsector factor, and L3 RR is whatever stock-specific (residual) risk remains after all three levels. The sections below walk through each concept in detail.
Why Three Levels?
Three levels capture the natural hierarchy of equity risk:
- Too few levels (just market) miss important sectoral dynamics. A tech stock isn't just "the market + noise"—it has specific tech sector exposure.
- Too many levels lead to overfitting and unstable estimates with limited data.
- Three levels align with how institutional investors think: market timing, sector rotation, and stock selection.
The key insight: each level captures incremental explanatory power that isn't already explained by higher levels. This is achieved through orthogonalization—we residualize stock returns at each step to isolate the marginal effect.
The Three Levels: L1, L2, L3
The Cascade: Each Level's Residual Becomes the Next Level's Target
The core idea is simple: regress, take the residual, regress again. Each level strips out one more layer of systematic risk, and the leftover () feeds into the next level as the new dependent variable.
| Step | Regression | What it captures | Residual |
|---|---|---|---|
| L1 | Broad market exposure | = stock return with market stripped out | |
| L2 | Sector exposure (incremental to market) | = stock return with market + sector stripped out | |
| L3 | Subsector exposure (incremental to market + sector) | = stock-specific return |
Read the table left to right and top to bottom — that is the model.
Example: If NVDA has and SPY returns +1%, we'd expect NVDA to move +1.3% from market exposure alone. Whatever is left over () gets passed to L2 to see how much is explained by the Tech sector (XLK). Whatever is left after that () gets passed to L3 for the semiconductor subsector (SOXX). The final residual is the stock-specific return series — compounded over a window it is the residual return (the stock-selection read), and its variance share is the residual risk share.
Orthogonalization: Why We Clean the Factors
There's a subtlety: sector ETFs like XLK aren't independent of the market — XLK has its own market beta. If we used raw XLK returns at L2, we'd double-count the market exposure already captured at L1.
The fix: before regressing at each level, we orthogonalize (clean) the factor by stripping out higher-level exposures using link betas:
| Level | What we clean | How |
|---|---|---|
| L2 | Sector ETF | Remove its market component: |
| L3 | Subsector ETF | Remove both market and sector components: |
Here is just the beta of ETF A regressed on ETF B (or its cleaned version). These are precomputed from historical data.
This ensures each captures only the incremental effect of its own level — no double-counting.
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.
Sign convention:
| HR Sign | Action | Meaning |
|---|---|---|
| Negative | Short the ETF | Hedge out factor exposure |
| Positive | Long the ETF | Add factor exposure |
The Challenge: Raw ETFs vs. Orthogonalized Factors
During estimation, we use orthogonalized sector and subsector returns to get clean incremental betas. But traders don't trade orthogonalized returns — they trade raw ETFs on Bloomberg terminals.
The solution: adjust the hedge ratios using link betas so they work directly with raw ETF prices.
L1 Hedge Ratios (Market Only)
At L1, it's straightforward — just hedge out the market beta:
Example: If your stock has , short $1.20 of SPY per $1 long the stock.
L2 Hedge Ratios (Market + Sector)
At L2, we add sector exposure. But buying/shorting sector ETFs implicitly adds market exposure (because sector ETFs have their own market beta). So we adjust.
Sector HR — direct beta, same as L1 logic:
Adjusted Market HR — subtract the market exposure embedded in the sector hedge:
Why the adjustment? When you short the sector ETF (negative ), you're also implicitly shorting the market. We reduce the direct market hedge to avoid double-hedging.
L3 Hedge Ratios (Market + Sector + Subsector)
At L3, we add subsector exposure and adjust for both market and sector exposure embedded in subsector ETFs.
Subsector HR — direct beta:
Adjusted Sector HR — subtract the sector exposure embedded in the subsector hedge:
Adjusted Market HR — subtract the market exposure embedded in the subsector hedge:
Internal consistency check: These adjusted HRs, applied to raw ETF returns, satisfy the replication identity — i.e., the decomposition into factor contributions plus residual reconciles back to the actual stock return. This is verified at runtime for every stock, every date. Note: this is a reconciliation check, not a claim about hedge performance. The betas themselves are noisy estimates from rolling regressions.
Explained Risk: Variance Decomposition
What Is Explained Risk (ER)?
Explained Risk measures what percentage of a stock's return variance comes from factor exposures vs. stock-specific (residual) noise.
Or equivalently, it's the from your factor regression.
The Additive Property
Because we use orthogonalized factors, the ERs from each level add up perfectly:
This is guaranteed by construction — the ER components must sum to 1.0 as a mathematical identity. At runtime, we verify the reconciliation holds to within 0.1% as a data-integrity check.
Calculating ER at Each Level
We build replicating portfolios using orthogonalized returns:
Then compute:
Interpretation
- High ER (e.g., 85%+): The stock is "a leveraged sector bet"—mostly systematic risk.
- Low ER (e.g., <50%): High residual risk share—more stock-specific risk, which diversifies away in a portfolio. (A risk statement, not a skill statement.)
- Sector vs. Market: If , sector dynamics dominate market timing.
Putting It All Together: The Replication Equation
The Core Identity
The ERM3 model lets us perfectly decompose any stock's return using only raw ETF returns — no orthogonalization required:
| Symbol | Description |
|---|---|
| Hedge ratio (exposure) to ETF | |
| Sum over market + sector + subsector ETFs | |
| Raw total return of the ETF (NOT residualized / orthogonalized) | |
| Residual stock-specific return (very small by construction) |
This is a mathematical identity — by construction, the hedge-ratio-weighted ETF returns plus the residual must equal the stock return. At runtime, we verify this reconciliation holds to within 0.1% for every stock on every date as a data-integrity check. If it doesn't balance, something is wrong with the input data or computation — not the math. This says nothing about the predictive accuracy of the betas or hedges themselves, which are noisy estimates from rolling regressions.
Why This Matters
This equation is the heart of tradability.
It means you can hedge almost any individual stock — or an entire portfolio — using only highly liquid ETFs, with hedge ratios that are economically meaningful and stable over time.
No custom baskets. No exotic derivatives. Just SPY, sector ETFs, and subsector ETFs.
Worked Example: Walmart (WMT)
Step 1 — Raw Regression Betas
Direct regressions on raw ETF returns yield:
| Parameter | ETF | Value |
|---|---|---|
| SPY | 0.50 | |
| XLP (Consumer Staples) | 0.30 | |
| PBJ (Food & Beverage) | 0.20 |
Step 2 — Link Betas
Historical average betas between ETFs at different levels:
| 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)
Start from the most granular level and work upward.
L3 — Subsector (PBJ — Food & Beverage)
L2 — Sector (XLP — Consumer Staples)
L1 — Market (SPY)
Final Hedge Ratios — Summary
| Level | ETF | Description | Direct Beta | Link Adjustment | Final HR |
|---|---|---|---|---|---|
| L1 Market | SPY | Broad Market | 0.50 | +0.096 +0.08 | −0.324 |
| L2 Sector | XLP | Consumer Staples | 0.30 | +0.14 | −0.16 |
| L3 Subsector | PBJ | Food & Beverage | 0.20 | — | −0.20 |
Verification — Sample Day
Suppose the following returns on a given day:
| Instrument | Return |
|---|---|
| SPY | +1.00% |
| XLP | +0.80% |
| PBJ | +1.20% |
| WMT | +1.10% |
Factor contribution (hedge ratios × raw ETF returns):
Residual return:
This +0.408% is the residual return — the stock-specific return left after neutralizing all factor exposures, the quantity manager evaluation reads as selection evidence.
Key Takeaways
- Exact decomposition identity — hedge-ratio-weighted ETF returns plus residual reconcile back to the stock return (no orthogonalized factors needed for trading)
- Hedge ratios built bottom-up — most granular level first, then adjust upward via link betas
- Runtime reconciliation verifies the decomposition identity balances to within 0.1% — a data-integrity check, not a hedge-accuracy claim
- All hedge instruments are highly liquid ETFs — executable on any brokerage platform
This is what makes the model practically tradable for hedging, risk attribution, and relative value strategies.
Multi-Period Return Attribution: The Geometric Bridge
The replication equation above decomposes a single day's return perfectly. But what happens when you want to attribute a stock's cumulative return over months or a full year?
Why Simple Sums Fail
Daily returns compound multiplicatively — not additively. The cumulative return over days is:
If you naively sum the daily factor contributions (market + sector + subsector + residual) over a year, the total will overstate the actual compound return. The gap is the well-known 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.
Simple addition pretends compounding doesn't exist. Over long horizons, that fiction becomes material.
Sequential Compounding Through the Hierarchy
The solution exploits the ERM3 hierarchy directly. At each level, we compound returns as if only factors through that level exist:
Each bar in the waterfall is a telescoping difference between adjacent levels:
| Bar | Formula | What it captures |
|---|---|---|
| Market | Compound return from market factor alone | |
| Sector | Incremental compound return from adding sector | |
| Subsector | Incremental compound return from adding subsector | |
| Residual | Compound stock-specific (residual) return after all factors | |
| Gross | Exact compound gross return |
The key property: the four bars sum exactly to the gross compound return. This is an algebraic identity (the intermediate terms cancel), not an approximation.
Why This Respects the Hierarchy
Each cumulative product mirrors the ERM3 cascade. answers "what would the compound return be if only the market drove this stock?" Adding sector to the daily returns gives , and the difference isolates sector's incremental contribution — just as the L2 regression isolates sector after residualizing against market. The ordering matters: Market Sector Subsector Residual must follow the strict L1 L2 L3 hierarchy.
Cumulative Residual-Return Line
The cumulative residual-return line on the performance chart uses the same geometric definition at each date :
This ensures the line's endpoint matches the residual bar in the waterfall exactly — both measure the compound residual return (return axis) after removing all three factor levels. Neither is a variance share: the risk-axis counterpart is the residual risk share on the decomposition bar.
Key Takeaways
- Arithmetic sums diverge — summing daily factor returns overstates the true compound return, with the gap growing with volatility and horizon
- Sequential compounding is exact — telescoping differences through L1 L2 L3 produce bars that sum to the geometric gross by construction
- No cross-term correction needed — the decomposition is an identity, not a linearization or Taylor approximation
- Line and waterfall are consistent — the cumulative residual-return line and the residual waterfall bar use the same geometric definition
How We Compare to Traditional Risk Models
RiskModels is built for tactical hedging and active trading using liquid ETFs. Traditional vendors (e.g., Barra, Axioma) focus on institutional reporting and broad factor coverage. The table below summarizes the main differences.
| Feature | RiskModels (Hierarchical ETF Model) | Traditional Models (Barra / Axioma) |
|---|---|---|
| Factor Composition | Directly tradeable: uses liquid ETFs (e.g., SPY, XLK) as the primary factors for L1–L3. | Abstract composites: factors are often "synthetic" (e.g., Value, Momentum, or PCA-derived statistical factors). |
| Hedging Execution | Immediate: neutralizing a sector risk is as simple as shorting the corresponding ETF. | Complex: requires building custom "factor-mimicking baskets" or using proxy trades, which increases slippage. |
| Model Structure | Hierarchical and orthogonal: each level (Market → Sector → Subsector) isolates incremental risk via residualization. | Multivariate and broad: often covers hundreds of fundamental and regional factors simultaneously across asset classes. |
| Responsiveness | Tactical: generally uses shorter lookback windows, making it highly responsive to sudden market shifts. | Structural: incorporates longer histories and fundamental data, prioritizing long-term stability over short-term agility. |
| Primary Use Case | Active trading: ideal for hedge funds and tactical PMs needing fast, precise hedging. | Institutional reporting: best for large-scale risk management and long-term performance attribution. |
Glossary: Quick Reference
| Term | Definition |
|---|---|
| L1 (Market) | First level capturing broad market (SPY) exposure |
| L2 (Sector) | Second level capturing sector-specific exposure (e.g., XLK, XLF) |
| L3 (Subsector) | Third level capturing granular industry exposure (e.g., SOXX, XBI) |
| Beta (β) | Sensitivity coefficient: |
| Hedge Ratio (HR) | Dollar amount of ETF to trade per $1 of stock to neutralize factor exposure |
| Explained Risk (ER) | Percentage of variance explained by factors: |
| Link Beta | Beta relationship between ETFs at different levels (e.g., sector ETF's market beta) |
| Orthogonalization | Removing higher-level exposure from lower-level factors: |
| Residual (ε) | The stock-specific return series left after all factor legs |
| Residual risk share | Risk axis: — the stock-specific share of variance |
| Residual return | Return axis: compounded over a window — the stock-selection read |
| Replication Equation |
Why This Matters for Trading
Direct Hedging
Unlike academic factor models that output abstract "factor loadings," our model gives you actionable hedge ratios that work with liquid ETFs you can trade on any brokerage platform.
Tax-Efficient Risk Scaling
Want to reduce your portfolio's tech exposure without selling NVDA and triggering capital gains? Short XLK proportionally. The adjusted hedge ratios ensure you're not accidentally double-hedging the market.
Risk Decomposition for Due Diligence
Before buying a "diversified" mutual fund, check its L3 decomposition. If 80% of its ER comes from the market, you're paying active management fees for passive beta.
Selection Measurement
The residual return (compounded ) at L3 is the stock-specific return. A persistently positive residual return is evidence relevant to selection skill; a negative one is underperformance that can't be blamed on "the market was down."
Additional Resources
- Interactive Demo: Try the model on 16,495 tickers at riskmodels.net
- How It Works: Visual walkthrough at /how-it-works
- Technical Paper: Contact us for the full methodology whitepaper
Last updated: July 2026