Class VolatilityDecomposition
java.lang.Object
com.quantfinlib.volatility.VolatilityDecomposition
Systematic vs IDIOSYNCRATIC volatility — the decomposition behind
"how much of this stock's risk is the market, and how much is the
company?" A single-factor (CAPM-style) regression of asset returns on
market returns splits total variance EXACTLY:
Var(asset) = β²·Var(market) + Var(residual)
└── systematic ──┘ └ idiosyncratic ┘
with β = Cov(asset, market)/Var(market) — the split is exact
(not approximate) because OLS residuals are uncorrelated with the
regressor by construction. The two halves behave differently and
deserve different treatment: systematic volatility (rates, inflation,
macro shocks) cannot be diversified away and is hedgeable with index
instruments; idiosyncratic volatility (earnings, management, product
launches) diversifies across names and is exactly what single-name
hedges, pairs trades and the CRB's per-symbol factors carry.
R² is the systematic SHARE — a utility at 0.7 is mostly a market
proxy; a biotech at 0.05 is mostly its own story. All variances are
per-period (annualize with ×periodsPerYear, vols with the
square root — the record has helpers). Sample moments (n−1)
throughout. Static, deterministic, research lane; pairs with
risk.RiskMetrics.beta (same β, cross-checked in tests) and
alpha.PortfolioConstruction's beta-neutralization.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondecompose(double[] assetReturns, double[] marketReturns) Decomposes an asset's variance against a market/benchmark series.
-
Method Details
-
decompose
public static VolatilityDecomposition.Decomposition decompose(double[] assetReturns, double[] marketReturns) Decomposes an asset's variance against a market/benchmark series.- Parameters:
assetReturns- per-period returns, ≥ 30 finite observationsmarketReturns- aligned benchmark returns (must carry variance — a flat benchmark decomposes nothing)
-