Calculator
Correlation Matrix Visualizer
Pearson correlation heatmap, condition number, eigenvalue spectrum, effective-N. Diagnostics for redundant strategies before allocating. Free, client-side.
- Inputs
- Form inputs / CSV
- Runtime
- Instant
- Privacy
- Client-side · no upload
- API key
- Not required
- Methodology
- Open →
Upload a returns CSV
Wide format: date,strategy_1,strategy_2,.... Each column is one strategy or asset return series. Up to about 20 columns renders legibly. Nothing leaves your browser.
What this tool computes
Classical multi-strategy correlation diagnostics. The synthetic demo includes a deliberately-redundant "clone_of_momentum" column so you can see how the condition number and effective-N reflect redundancy. Load a CSV or the demo to begin.
How to use
Step-by-step
- 1
Upload return series for the asset universe (rows = time periods, columns = assets).
- 2
Pick correlation type: Pearson (linear), Spearman (rank-based, robust to outliers).
- 3
Toggle Ledoit-Wolf shrinkage if the asset count approaches or exceeds the observation count.
- 4
Read the heatmap. Hierarchical clustering reorders assets so related groups appear as visible blocks.
- 5
Identify diversification gaps: clusters with low cross-correlation are diversification candidates; clusters with high mutual correlation are concentration risk.
For agents
Use in an agent
Same math, same result shape as the UI above — as a static ES module. No HTTP request, no auth, no rate limit.
import { compute } from "https://aifinhub.io/engines/correlation-matrix-visualizer.js"; Contract: /contracts/correlation-matrix-visualizer.json Full agent guide →
Glossary references
Terms used by this tool
Questions people ask next
FAQ
How is correlation computed?
Pearson correlation by default — the standard linear correlation. Spearman (rank correlation) is available as an option for non-linear relationships and for series with outliers. Both are documented on the methodology page.
What does shrinkage do?
Ledoit-Wolf shrinkage pulls extreme correlation estimates toward zero (or toward a target structure like equicorrelation). Reduces noise in the matrix without biasing the structure too much. Critical when you have more assets than observations — without shrinkage, the sample correlation matrix is rank-deficient and unusable for optimization.
Why is the diagonal sometimes not exactly 1.0?
After shrinkage, the diagonal can drift slightly — a small bias the tool doesn't correct because it's shrinking the entire matrix uniformly. The methodology page documents this. For most uses, the drift (typically 0.95-1.0) is harmless.
How many observations do I need?
At minimum, more observations than assets. For a 50-asset matrix, 50+ observations is the floor; 200+ is the comfortable zone for Pearson. Below the floor, the matrix is rank-deficient. The tool warns at the boundary.
Why are some clusters in the heatmap obvious and others not?
The tool runs hierarchical clustering on the correlation distances and reorders the matrix to put related assets together. Strong clusters (e.g., financial stocks, commodity ETFs) become visible blocks. Weak clusters or assets with mixed exposures don't pop out — that's a feature, not a bug. The cluster dendrogram is on the methodology page.
Related deep dive
All articles →Read further
Long-form context behind the tool output.
- Methodology · Opinion·7 min
Markowitz 1952 Portfolio Selection: A Worked Example
Markowitz 1952 Portfolio Selection on a real stocks/bonds/gold tape: the E-V rule, why variance holds diversification, and a live efficient frontier.
Read - Tutorial · Runnable·9 min
How to Read a Backtest Report: 2026 Cheat Sheet
Five questions a backtest report must answer — edge real, persistent, cheap to trade, bearable, explainable — with the statistics that verify each.
Read - Methodology · Opinion·11 min
Multi-Timeframe Signal Integration With LLMs
LLMs belong on weekly fundamentals, not intraday microstructure. A two-layer architecture: weekly LLM thesis plus rule-based intraday invalidation gates.
Read
Used in
Decision workflows that use this tool
Goal-driven flows that bundle this tool with adjacent ones.
Complementary tools
Users of this tool often explore
Efficient Frontier Builder
Paste a multi-asset returns CSV. See the Markowitz mean-variance frontier, the minimum-variance portfolio, the max-Sharpe (tangency) portfolio.
Risk-Adjusted Returns Calculator
Paste a returns CSV. Sharpe, Sortino, Calmar, Omega, alpha, beta, tracking error, information ratio, max drawdown, and tail moments — plus.
Fractional Kelly Sizer
Map conviction tiers to fractional Kelly bet sizes with a drawdown Monte Carlo simulator. Client-side. Private by default.