What the correlation calculator does
Correlation measures how closely two markets move together, from +1 (they always move in the same direction, in proportion) through 0 (no linear link) to −1 (they always move in opposite directions). Paste two price series, such as two currency pairs, a stock and an index, or Bitcoin and Ether, and the calculator returns the Pearson correlation coefficient r, its square r², a strength reading and a rough test of whether the result could be chance.
Why it matters for risk: two trades on highly correlated markets behave close to one bigger trade. Risking 1% on EUR/USD and 1% on GBP/USD in the same direction while they correlate strongly is nearer to 2% on one idea than to two independent 1% bets.
How to use it
- Choose Returns (recommended) or Raw prices.
- Paste the closing prices of series A and of series B, for the same dates and the same timeframe. Daily closes are the most common choice.
- Tell the calculator the order of both lists: oldest first or newest first.
If the lists have different lengths, the calculator compares the latest values they share and warns you. Make sure they really line up date for date: a day missing in one series, such as a stock-market holiday that crypto trades through, shifts every value after it.
The formula
return r_t = P_t ÷ P_(t−1) − 1
r = Σ (a − mean of a) × (b − mean of b)
÷ √( Σ (a − mean of a)² × Σ (b − mean of b)² )
r² = share of one series' variance that moves with the other
noise band ≈ ± 2 ÷ √n (n = number of values compared)
This is the same Pearson coefficient as Excel's CORREL and Pine Script's ta.correlation; on returns, compute the returns first and correlate those.
Why returns rather than prices
Two markets that both trended up over the period show a high correlation on prices even if their day-to-day moves are unrelated: any two rising lines correlate. Returns remove the trend and ask the question that matters for risk: when A moves on a given day, does B move the same way that day? Use raw prices only to compare levels, or to reproduce an indicator that is computed on prices.
Worked example
The sample loaded in the calculator holds 21 daily closes of two series shaped like EUR/USD and GBP/USD, which gives 20 returns each:
- On returns: r = +0.78, a strong positive correlation. r² ≈ 61%: about three fifths of one series' daily variance moves with the other. The noise band for 20 returns is 2 ÷ √20 ≈ ±0.45, so the reading is clearly outside it.
- On raw prices: r = +0.93. Both series drifted higher over the month (+3.6% and +2.7%), and that shared drift inflates the price correlation.
For position sizing, the two pairs would count close to one exposure in this sample.
How to read the result
- ±0.80 to ±1.00: very strong. Positions in the same direction behave almost as one.
- ±0.60 to ±0.79: strong.
- ±0.40 to ±0.59: moderate.
- ±0.20 to ±0.39: weak.
- Between −0.19 and +0.19: very weak or no linear relationship.
These bands are conventions, not laws. Three more things to check:
- The sign. A negative r means opposite moves. EUR/USD and USD/CHF have often shown negative correlation because the dollar sits on opposite sides of the two quotes, so long EUR/USD with short USD/CHF stacks the same bet.
- The noise band. With 20 returns, any r inside ±0.45 could easily be chance. With 250 daily returns, about a year, the band narrows to ±0.13. Prefer 60 values or more.
- Stability. Correlations shift with market regimes. Compare the last three months with the last year, and recompute regularly.
Correlation only captures linear relationships, and it says nothing about cause or about what happens next.
Using correlation in risk management
- Count correlated positions together. When two open trades are strongly correlated in the same direction, split your usual risk between them instead of taking it twice. The position size calculator gives the lot size for each share.
- Watch the daily loss limit. On a funded account, correlated losers hit together and can breach a daily limit in one move. The prop firm calculator shows how much room you have.
- Diversify with low correlation, not with more symbols. Five dollar pairs in the same direction are often one dollar trade.