Back to Docs
T
Traderoid

Correlation Node

Measures linear relationship strength between variables

StatisticalCorrelationFundamental

Overview

Correlation measures the strength and direction of linear relationship between two variables on a scale from -1 to 1. A correlation of 1.0 means perfect positive relationship (both move together), -1.0 means perfect negative relationship (opposite moves), and 0 means no linear relationship. Correlation is fundamental to understanding portfolio diversification, hedge effectiveness, and asset co-movement patterns.

In trading, correlation helps identify which assets move together and which offset each other, enabling better portfolio construction and risk management. However, correlation can change dramatically during market stress, making it essential to monitor rolling correlation rather than assuming static relationships.

Formula & Calculation

Pearson Correlation Coefficient
ρ(X,Y) = Cov(X,Y) / (StdDev(X) × StdDev(Y))
Covariance normalized by standard deviations of both variables
Interpretation
Correlation = 0.85: Strong positive (assets usually move together)
Correlation = 0.30: Weak positive (some co-movement)
Correlation = -0.60: Moderate negative (good hedge)
Correlation = 0.05: Near zero (independent movements)

Parameters

ParameterDefaultDescription
series1, series2RequiredTwo price or return series to correlate
period20-60Rolling window size (number of periods to calculate)

Common Use Cases

1. Portfolio Diversification

Select assets with low or negative correlation to reduce portfolio volatility. Having 50% Stock A (corr=0.8) and 50% Stock B (corr=0.8) gives less diversification than 50% Stock A (corr=0.8) and 50% Bond (corr=0.2).

2. Hedge Effectiveness

Negative correlation indicates good hedge. If Stock A has -0.7 correlation with Stock B, shorting B hedges long position in A effectively. Monitor rolling correlation to ensure hedge stays effective.

3. Pair Selection

Find highly correlated pairs for statistical arbitrage. Pairs with correlation >0.8 and stable relationship are candidates for mean reversion trades when spread widens (cointegration check recommended).

4. Risk Reduction Opportunities

When rolling correlation spikes (assets moving together temporarily), diversification benefits diminish. This is the time to take risk off portfolio or hedge more aggressively.

Advantages & Limitations

Advantages

  • Simple and intuitive interpretation
  • Standardized 0-1 scale
  • Identifies diversification benefits
  • Industry standard metric
  • Fast to calculate
!

Limitations

  • Only measures linear relationships
  • Changes over time (regime-dependent)
  • Spikes during market stress (breaks when most needed)
  • Not causality (correlation ≠ causation)
  • Window-dependent values

Tips & Best Practices

📊 Use Rolling Correlation

Calculate correlation in moving windows (20-60 days) to track changes. Static correlation hides important variations - correlation can jump from 0.3 to 0.8 during crises.

🔄 Monitor Regime Changes

When rolling correlation significantly increases from historical average, diversification benefits disappear. Adjust portfolio accordingly or expect less effective hedges.

⚡ Test on Returns Not Prices

Calculate correlation on returns (daily changes) not prices. Price correlation is distorted by trends - returns give cleaner co-movement patterns.

⚠️ Remember "Correlation Compression"

During market crashes, almost all correlations approach 1.0 (everything falls together). Hedges are useless exactly when you need them most. Plan accordingly.

Example Strategy: Correlation-Based Portfolio Rebalancing

Setup: Track rolling correlation between SPY (stocks) and TLT (bonds)
Signal: When correlation > 0.3 (heating up), reduce equity exposure and increase bonds
Action: When correlation < -0.2 (traditional hedge), increase equity allocation
Benefit: Dynamically adjust portfolio to maintain constant risk level and diversification effectiveness

Related Nodes