The correlation calculator computes the Pearson coefficient between two closing price series, measuring how closely two assets move together on a scale from -1 to +1. Most retail traders believe diversification means owning different tickers — but SPY, AAPL, NVDA, and QQQ have pairwise correlations of 0.85–0.95, meaning they function as a single bet on U.S. large-cap tech. Use the calculator above to quantify the relationship between any two positions and determine whether your allocation requires adjustment.
How to Use
| Input | What to Enter | Example |
|---|---|---|
| Asset 1 Closing Prices | Comma-separated closing prices for the first asset | 510, 512, 509, 514, 516 |
| Asset 2 Closing Prices | Closing prices for the second asset (same count) | 440, 442, 440, 445, 447 |
| Normal Position Size | Your standard full-size allocation per position | $10,000 |
A minimum of 5 data points is required; 60 trading days (roughly 3 months of daily closes) produces a reliable rolling estimate for active position management. The output r value determines whether a position size reduction applies.
Formula Explained
r = Σ[(xi - x̄)(yi - ȳ)] / √[Σ(xi - x̄)² × Σ(yi - ȳ)²]
The numerator is the covariance: for each period, the deviation of Asset 1’s price from its mean is multiplied by the corresponding deviation of Asset 2’s price. Summing those products captures how consistently both assets deviate in the same direction. The denominator normalizes by each asset’s individual standard deviation, so the output always falls between -1 and +1 regardless of price levels.
Interpreting the result: an r of 0.70 or above means the two assets share substantial common risk — likely the same underlying factor (sector, rate sensitivity, or macro regime). An r between -0.30 and +0.30 indicates statistical independence: each position contributes separately to portfolio variance. Negative values mean the assets tend to move in opposite directions, which actively reduces overall portfolio risk.
Harry Markowitz established in his 1952 Modern Portfolio Theory that portfolio variance is minimized not by adding more assets, but by adding low-correlation assets. Correlation — not ticker count — is the operative variable.
Example Calculations
Scenario 1: Four Positions, One Factor
A trader with a $50,000 account holds four equity positions they believe are diversified:
- SPY: $10,000
- QQQ: $10,000 (60-day correlation vs SPY: 0.95)
- AAPL: $10,000 (60-day correlation vs SPY: 0.82)
- NVDA: $10,000 (60-day correlation vs SPY: 0.78)
- Cash: $10,000
Running 60-day Pearson on SPY and QQQ yields r = 0.95. These two positions do not represent two independent $10,000 risks — their combined exposure to the same factor is approximately $19,500 ($10,000 + $10,000 × 0.95). Applying the 25% reduction rule (r at or above 0.70) to each leg brings both to $7,500, reducing effective single-factor concentration while preserving dry powder for genuinely independent opportunities.
Scenario 2: Replacing Correlated Positions with Genuine Diversifiers
The same trader replaces QQQ with TLT (SPY correlation: approximately -0.25 in a stable rate environment) and NVDA with GLD (SPY correlation: approximately 0.05 over a 10-year horizon).
New book: $10,000 SPY, $10,000 TLT, $10,000 AAPL, $10,000 GLD, $10,000 cash. Neither SPY/TLT nor SPY/GLD breach the 0.70 threshold — no size reduction applies. Gross dollar exposure is unchanged at $40,000 invested, but portfolio variance drops materially because the positions draw from different return drivers. This is what Modern Portfolio Theory calls efficient diversification.
Scenario 3: Correlation Spike During Stress
During the March 2020 sell-off, average intra-S&P 500 pairwise correlations spiked from approximately 0.35 to near 0.80 within two weeks. A portfolio of AAPL, NVDA, GOOGL, and MSFT that appeared diversified at r = 0.35 suddenly carried the effective risk of a concentrated single position — precisely when diversification was needed most. Recalculating correlation weekly during elevated volatility and reducing sizes proactively is the only reliable defense.
When to Use Correlation Calculator
- Before adding a new position: confirm the planned trade does not replicate factor exposure already in the book
- During weekly portfolio review: run 60-day Pearson across all open pairs; flag any at or above 0.70 for size adjustment
- After a volatility spike: cross-asset correlations move toward 1.0 during market stress — re-run after sharp drawdowns
- When building sector exposure: ETF-based strategies using multiple sector funds often load on the same large-cap growth factor; verify with the broad market correlation before treating allocations as independent
- For risk managers and multi-asset traders: correlation is a required input for any formal portfolio construction process, not an optional check
Related Tools
- Position Size Calculator — Calculates the correct number of shares or contracts based on account size, risk percentage, and stop distance; use alongside correlation output to set the adjusted allocation per leg after applying the reduction factor
- Risk Management Calculator — Aggregates total portfolio heat across all open positions; run after correlation adjustments to confirm combined exposure stays within your target threshold
- Volatility Calculator — Historical volatility is a direct input to correlation-adjusted position sizing; higher volatility on correlated pairs amplifies the case for reducing each leg
Frequently Asked Questions
What is the Pearson correlation coefficient in trading?
The Pearson correlation coefficient measures how consistently two assets move together on a scale from -1 to +1. In trading, it quantifies whether two positions provide genuine diversification or duplicate the same factor risk — owning TSLA, NVDA, AAPL, QQQ, and SPY simultaneously is effectively one large-cap growth bet, regardless of ticker count.
What correlation is considered too high for diversification?
Any pairwise correlation of 0.70 or above means two positions carry overlapping risk. SPY and QQQ have averaged approximately 0.95 correlation from 2015 to 2025 — holding both provides almost no diversification benefit and doubles concentration in the same index factor.
How does correlation affect position sizing?
When two positions have a correlation of 0.70 or higher, reduce each by 25% from the standard full-size allocation. At r = 0.95, a $10,000 SPY position and a $10,000 QQQ position carry approximately $19,500 of effective single-factor exposure rather than two independent $10,000 risks.
Is correlation between assets stable over time?
No — correlation is regime-dependent. SPY and TLT averaged approximately -0.30 from 2000 to 2021, making bonds a reliable equity hedge, then both fell simultaneously in 2022 as the Fed hiked rates aggressively and their correlation turned positive. Always recalculate rolling 60-day correlation rather than relying on historical averages.
What assets have low correlation with the S&P 500?
Gold (GLD) has maintained a correlation with SPY of approximately 0.02 to 0.10 over the past decade, making it a genuine diversifier for ETF traders and equity-heavy books. Treasury bonds provide low or negative correlation in stable rate environments but lose that hedge property during rate-hiking cycles. Commodities and select currency pairs also tend to carry low equity correlation outside of broad market stress periods when cross-asset correlations compress toward 1.0.