← Back to Case Studies
PD BY CONSTRUCTIONQuantitative Finance • Real S&P 500 Data

Correlation Matrix: A PD-by-Construction Alternative

Higham's algorithm is the standard textbook method for repairing non-positive-definite correlation matrices. On a matrix built from non-overlapping S&P 500 data, it did not converge to a PD result within 200 iterations.

The Problem

Non-Positive Definite Correlation Matrices

In quantitative finance, correlation matrices frequently become non-positive definite (non-PD) when combining data from multiple sources with different observation windows. This breaks:

  • Cholesky decomposition (required for Monte Carlo simulation)
  • Portfolio optimization (produces nonsensical results)
  • Value-at-Risk calculations (mathematically invalid)

This is a common problem when merging unevenly-sampled data. It shows up when:

  • Merging data from different providers (Bloomberg, Reuters, internal systems)
  • Combining assets with different trading histories (new stocks, emerging markets)
  • Risk managers manually adjusting correlations based on expert judgment
  • Filling missing data with pairwise deletion

Test Methodology

Data

  • 100 S&P 500 stocks (real data)
  • 123 trading days (Jan-Jun 2020)
  • COVID crisis period - maximum market stress
  • Staggered observation windows (4 groups)

Resulting Matrix

  • 39 negative eigenvalues
  • Minimum eigenvalue: -9.23
  • 3,750 NaN correlations (no overlap)
  • Cannot perform Cholesky decomposition

Why This Matters

This scenario exactly replicates what happens at banks when combining data from multiple vendors or when new assets are added to a portfolio. The stocks in Group A (days 1-250) have no overlapping observations with stocks in Group B (days 250-500), making direct correlation calculation impossible.

Results: Industry Methods Compared

MethodWorks?TimeFrobenius Dist.Issue
Eigenvalue Clipping5 ms16.47Distorts structure
Higham's AlgorithmIndustry "Gold Standard"2,252 ms11.34Failed: 52 negative eigenvalues
Shrinkage to IdentityLedoit-Wolf style<1 ms47.2691% shrinkage destroys signal
VLA Factor ModelOur Method16 ms57.55PD by construction

Key Finding: The Standard Method Did Not Converge on This Data

Higham's alternating projections algorithm (2002) is cited in virtually every quantitative finance paper on correlation matrices. NAG, MATLAB, and most commercial risk systems use it. On real S&P 500 data from the COVID crisis, after 2.25 seconds and 200 iterations, it still produced a matrix with 52 negative eigenvalues.

Why Higham Struggled Here

Higham's algorithm alternates between projecting onto the space of positive semidefinite matrices and enforcing unit diagonal. On a valid finite input it is proven to converge; here, on a severely ill-conditioned matrix with many near-zero correlations from non-overlapping data, it had not converged within the 200-iteration cap. A higher cap or different setup may converge — the point is that the factor-model construction avoids the iteration entirely.

Why VLA Works

Instead of fixing a broken matrix, VLA builds a valid correlation structure from the underlying factor model. The result is mathematically guaranteed to be positive semi-definite because it preserves the outer-product structure of covariance.

Our Methodology

1. Factor Model Foundation

Instead of computing pairwise correlations (which breaks with missing data), we estimate the underlying factor structure that generates correlations.

ri = βi · F + εi

Where F represents common factors (market, sector) and ε is idiosyncratic risk.

2. Anchor Asset Identification

We identify assets with maximum data coverage as "anchors" and estimate factor loadings for all other assets relative to these anchors. This allows correlation estimation even between assets with no overlapping data.

3. Exact Arithmetic Accumulation

All summations use compensated arithmetic to prevent floating-point accumulation error. This ensures the resulting covariance matrix maintains its mathematical properties (symmetry, PSD) exactly.

4. PD by Construction

The correlation matrix is computed as Σ = BΛBT + D, which is guaranteed positive semi-definite by the outer-product structure. No post-hoc fixing required.

Implications

For Risk Managers

  • Monte Carlo VaR always runs - no matrix failures
  • Stress testing with new assets doesn't break models
  • Regulatory reporting deadlines met reliably

For Portfolio Managers

  • Optimization produces meaningful weights
  • New assets integrated without correlation hacks
  • Factor exposures preserved accurately

Bottom Line

The industry has relied on post-hoc matrix "fixes" for 20+ years. These methods either fail on hard cases (Higham), destroy the signal (91% shrinkage), or distort the structure (clipping).

The factor-model construction is positive semi-definite by construction — no post-hoc fixing required — and ran ~143× faster than Higham on this S&P 500 test case. Note the trade-off: it has a larger Frobenius distance to the input matrix (it rebuilds structure rather than minimally perturbing it).

References

  • Higham, N.J. (2002). "Computing the nearest correlation matrix—a problem from finance." IMA Journal of Numerical Analysis, 22(3), 329-343.
  • Ledoit, O. & Wolf, M. (2004). "A well-conditioned estimator for large-dimensional covariance matrices." Journal of Multivariate Analysis, 88(2), 365-411.
  • Rebonato, R. & Jäckel, P. (1999). "The most general methodology to create a valid correlation matrix for risk management." QUARC Working Paper.

Want to go deeper?

This is one example of exact arithmetic applied where the standard tools fail. Open to roles, research collaborations, and partnerships.