Skip to content

Horn parallel analysis

Compare ordered PCA eigenvalues with rank-matched noise simulations, reproduce a five-variable example, and understand null-model and retention limits.

Horn parallel analysis selects principal components or factors by comparing their ordered strengths with those produced by a chosen noise-only reference. In a quant risk panel, it asks how many apparent common directions are stronger than sampling noise alone would typically produce. The answer depends on what counts as noise.
Even independent variables acquire sample correlations. Their largest sample eigenvalue can exceed one simply because the leading direction was chosen to explain as much sample variance as possible. Horn's original contribution was to account for this sampling effect using generated random variables. His 1965 abstract states that rationale.

Build a comparison for each rank

This article uses correlation-PCA parallel analysis, with a rankwise 95th-percentile reference. It is one specified version of the method; implementations also use means or other percentiles and can generate their reference by permuting observed columns. Revelle's documentation distinguishes these choices and separates PCA from common-factor analysis.

Start with an n×pn\times p panel: observations in rows, variables in columns. Centre each column and divide by its sample standard deviation, calculated with divisor n−1n-1. If ZZ is the resulting matrix, analyse the sample correlation matrix

R=Z⊤Zn−1,λ1≥λ2≥⋯≥λp.R=\frac{Z^\top Z}{n-1}, \qquad \lambda_1\geq\lambda_2\geq\cdots\geq\lambda_p.

For each of BB simulated panels, generate n×pn\times p independent standard-normal observations, repeat the same centring and scaling, and sort its correlation eigenvalues in descending order. At rank jj, calculate

qj=Q0.95 ⁣(λj(1),…,λj(B)).q_j=Q_{0.95}\!\left(\lambda_j^{(1)},\ldots,\lambda_j^{(B)}\right).
Compare the largest observed eigenvalue with the simulated largest eigenvalues, the second with the simulated seconds, and so on. The strict passing rule is λj>qj\lambda_j>q_j; equality fails. Here the retained model uses the leading consecutive passing components, stopping at the first failure. Reporting that convention matters if an unusual spectrum crosses its reference more than once. Dobriban describes this rank-matched, sequential convention for permutation parallel analysis in §1.2.

The null and observed analyses must match: thresholds from correlation PCA cannot simply be applied to covariance eigenvalues measured in return-squared units. A common-factor analysis version also requires its own extraction and communality choices; the calculation below does not estimate common factors that way.

Five variables, one retained component

Take 100 observations and five variables. Stipulate the observed correlation eigenvalues as (2,1.2,0.9,0.6,0.3)(2,1.2,0.9,0.6,0.3); these are an illustrative spectrum, not estimates from a market dataset. They sum to five, as correlation eigenvalues must.
Generate 500 IID Gaussian null panels, using NumPy default_rng(42). Use separate sample means and standard deviations in every panel and column, then take each rank's 95th percentile with NumPy's method="linear". This quantile convention interpolates between adjacent ordered simulation results. The NumPy reference specifies the interpolation.
Component rankObserved eigenvalueSimulated 95th percentileStrict comparison
12.00000001.4148594Pass
21.20000001.2098315Fail
30.90000001.0551083Fail
40.60000000.9453020Fail
50.30000000.8346507Fail
Retain one component under this convention. A rule that retained every eigenvalue above one would retain two here. Parallel analysis changes that answer because the second-largest noise eigenvalue also tends to exceed one.
Stipulated observed eigenvalues 2, 1.2, 0.9, 0.6 and 0.3 are compared with rankwise simulated 95th percentiles 1.4148594, 1.2098315, 1.0551083, 0.9453020 and 0.8346507. Only rank 1 passes.
Stipulated observed eigenvalues 2, 1.2, 0.9, 0.6 and 0.3 are compared with rankwise simulated 95th percentiles 1.4148594, 1.2098315, 1.0551083, 0.9453020 and 0.8346507. Only rank 1 passes.
Original illustrative comparison: a stipulated observed spectrum against 500 simulated IID Gaussian correlation matrices with 100 rows and five columns. Dashed squares mark the separate threshold at each rank.
These are finite-simulation, rank-specific cutoffs. Comparing every observed rank with one upper edge from the Marchenko–Pastur law would be a different procedure.

What the retained count does—and does not—say

The decision is conditional on the reference model. Independent Gaussian simulations remove cross-variable structure and serial dependence. If financial observations contain serial dependence or changing volatility, these simulations may misrepresent their noise spectrum. Independently permuting entries within each observed column preserves its empirical marginal distribution but destroys its time ordering; it does not automatically solve that problem. A dependence-preserving null needs an explicit design and justification. Dobriban's theory for the permutation version rests on assumptions about the noise and signal, rather than covering every financial panel. See §2.1 and §4.1.
The simulated percentiles also have Monte Carlo uncertainty. Rank 2 misses its cutoff by only about 0.009830.00983 here. A fixed seed makes this run reproducible; it does not make that cutoff exact. More replications and checks across independent seeds can reveal whether a near-boundary retention decision is stable.
Finally, rankwise 95th-percentile comparisons are not a global test with a guaranteed 5% familywise error rate. Nor does a passing component establish a priced risk factor, a useful forecast or a stable economic interpretation. Assess those downstream claims separately.
For the underlying compression problem, PCA and Factor Compression connects covariance eigenpairs, explained variance and reconstruction error. The public page is a preview; the full lesson requires membership.

Sources

Last updated
  • parallel analysis
  • pca
  • factor retention
  • monte carlo
  • correlation matrix
← Back to the glossaryBack to top ↑