Correlation & Covariance Analysis
Pearson, denoised, Kendall, Spearman, and distance correlation. Covariance shrinkage and effective rank: understanding asset relationships in the Thrive Workbench.
From Thrive on YouTube
Watch the matching Thrive video
Win Rate vs Reward to Risk: The Math That Decides If You Make Money
Part of Risk Management and Position Sizing. Education only. Not financial advice.
Pearson Correlation Matrix
The Pearson correlation matrix is the standard starting point for portfolio analysis. Each cell measures the linear relationship between two assets' returns, ranging from -1.0 (perfect inverse) to +1.0 (perfect co-movement). For crypto portfolios, the typical picture is discouraging: most crypto assets show correlations of 0.5–0.9 with BTC, meaning "diversification" within crypto alone is limited. During severe market stress, these correlations spike toward 1.0: the diversification you thought you had disappears exactly when you need it.
1-- Full correlation matrix across your portfolio assets2SELECT *3FROM portfolio_correlation_matrix();45-- Returns a matrix like:6-- | BTC | ETH | SOL | AVAX | LINK7-- BTC | 1.00 | 0.82 | 0.71 | 0.68 | 0.658-- ETH | 0.82 | 1.00 | 0.76 | 0.73 | 0.729-- SOL | 0.71 | 0.76 | 1.00 | 0.69 | 0.5810-- AVAX | 0.68 | 0.73 | 0.69 | 1.00 | 0.6111-- LINK | 0.65 | 0.72 | 0.58 | 0.61 | 1.00Denoised Correlation
Raw sample correlation matrices are contaminated with noise, especially when the number of observations is not vastly larger than the number of assets. Random Matrix Theory (RMT) provides a principled framework for separating signal from noise. The Marchenko-Pastur distribution describes the eigenvalue distribution of a purely random correlation matrix. Eigenvalues that fall within this random band carry no real information. They are artifacts of sampling noise.
Denoising works by decomposing the correlation matrix into its eigenvalues, replacing the noisy eigenvalues (those within the Marchenko-Pastur bounds) with a constant (their average), and reconstructing the matrix. The result is a cleaner correlation structure that produces more stable portfolio optimizations. In crypto, where you often have limited history and many assets, denoising can dramatically improve out-of-sample performance.
1-- Compare standard vs denoised correlation2SELECT *3FROM portfolio_correlation_matrix()4WHERE type = 'denoised';56-- The denoised matrix removes sampling noise,7-- producing more stable portfolio weights.8-- Particularly valuable when you have:9-- - Many assets relative to observation count10-- - Short historical windows (< 1 year daily data)11-- - Assets with limited trading historyWhen to use denoised correlation
Kendall and Spearman Rank Correlations
Pearson correlation captures linear relationships. But crypto assets often exhibit non-linear co-movement. They may be moderately correlated during normal times but near-perfectly correlated during crashes. Rank correlations measure monotonic relationships (both assets tend to move in the same direction) without assuming linearity.
Kendall's tau counts the proportion of concordant vs discordant pairs of observations. It is more robust to outliers than Pearson but has lower statistical power. Spearman's rho is simply the Pearson correlation computed on the ranks of the data rather than the raw values. For crypto portfolios, Spearman is the pragmatic choice. It retains the interpretability of Pearson but is resistant to the extreme outliers that crypto data routinely produces.
1-- Compare Pearson vs Spearman correlations2SELECT *3FROM portfolio_correlation_matrix()4WHERE type IN ('pearson', 'spearman');56-- If Spearman >> Pearson for a pair, the relationship7-- is monotonic but non-linear: common in crypto where8-- large moves (outliers) distort the Pearson measure.Distance Correlation
Distance correlation (dCor) is a measure of dependence that captures both linear and non-linear relationships. Unlike Pearson, which can be zero for strongly dependent but non-linearly related variables, dCor equals zero if and only if the variables are truly independent. A distance correlation of 0.0 between two assets means they are genuinely independent, not just linearly uncorrelated.
For crypto portfolios, distance correlation often reveals hidden dependencies that Pearson misses. Two tokens might show a Pearson correlation of 0.3 but a distance correlation of 0.7, meaning they are far more dependent than the linear measure suggests. This matters for diversification: you think you have uncorrelated exposure, but the non-linear dependency means both assets will likely move together in extreme scenarios.
1-- Uncover non-linear dependencies2SELECT *3FROM portfolio_correlation_matrix()4WHERE type = 'distance';56-- Compare distance correlation with Pearson:7-- If dCor >> Pearson: hidden non-linear dependency exists8-- If dCor ≈ Pearson: relationship is approximately linear9-- If dCor ≈ 0: genuinely independent (rare in crypto)Covariance Matrix and Shrinkage Estimators
The covariance matrix Σ is the core input for every portfolio optimization. The sample covariance matrix is the default estimator, but it suffers from estimation error, especially when the number of assets approaches the number of observations. Shrinkage estimators improve accuracy by pulling the sample estimate toward a structured target (like the identity matrix or a constant-correlation matrix).
The Ledoit-Wolf shrinkage estimator is the most widely used: Σ_shrunk = α × F + (1 − α) × S, where S is the sample covariance, F is the structured target, and α is the optimal shrinkage intensity computed analytically. For a crypto portfolio with 10 assets and 365 daily observations, the shrinkage intensity is typically 0.2–0.4, meaning 20–40% of the sample structure is replaced with the more stable target. Thrive computes the optimal shrinkage automatically and uses the shrunk covariance for all downstream optimizations.
Effective Rank
Effective rank measures the true dimensionality of your portfolio: how many independent sources of risk you actually have. A portfolio of 10 crypto assets that all move together has an effective rank close to 1. The formula uses the eigenvalue distribution of the correlation matrix: ER = exp(−Σ pᵢ × log(pᵢ)), where pᵢ = λᵢ / Σλⱼ are the normalized eigenvalues.
For a typical crypto-only portfolio of 10 assets, the effective rank is often 2–3, meaning you effectively have 2–3 independent risk factors despite holding 10 different tokens. This is a sobering reality check on crypto "diversification." Adding more tokens does not always increase the effective rank. It may just add more of the same risk under a different name.
1-- Check the true dimensionality of your portfolio2SELECT *3FROM portfolio_diversification_ratio()4WHERE metric IN (5 'effective_rank',6 'num_assets',7 'diversification_ratio',8 'concentration_ratio'9);1011-- If effective_rank / num_assets < 0.3, your portfolio12-- has far less diversification than the asset count suggests.13-- Consider adding truly uncorrelated exposure (TradFi, commodities).Correlation regimes change
1.Your portfolio shows a Pearson correlation of 0.25 between two tokens but a distance correlation of 0.72. What does this mean?
2.A 10-asset crypto portfolio has an effective rank of 2.1. What should you conclude?
Put this lesson to work
Free on Thrive, no account needed.