Edgoro
Analysis · Free tool

Correlation Calculator

Measure how closely two markets move together: Pearson correlation of returns or raw prices, with r², strength and a guide.

Compare
Order of both lists
Correlation coefficient (r) on returns
+0.78
StrengthStrong
DirectionSame direction
Shared variance (r²)61.1%
Returns compared20
Noise band (± 2 ÷ √n)± 0.45
Clear of the noise bandYes

How to read r

±0.80 to ±1.00Very strong
±0.60 to ±0.79Strong
±0.40 to ±0.59Moderate
±0.20 to ±0.39Weak
−0.19 to +0.19Very weak or none

Pearson correlation of simple returns (close ÷ previous close − 1) over the bars both lists share. Returns show whether the two markets move together bar by bar.

Trading involves substantial risk of loss and is not suitable for every investor. Edgoro is a software tool, not a broker or financial adviser: nothing it produces is investment advice, and past or backtested performance does not guarantee future results.

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

  1. Choose Returns (recommended) or Raw prices.
  2. 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.
  3. 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.

Frequently asked questions

What is a good correlation coefficient?

It depends on the purpose. To diversify, you want positions with low correlation, close to zero. To hedge, you look for a strong negative one. For risk control, a strong positive correlation between two open trades in the same direction means the risk adds up.

Should I correlate returns or prices?

Returns, in most cases. Prices of two markets that both trended show a high correlation even when their daily moves are unrelated. Returns measure whether they move together bar by bar, which is what matters for combined risk.

How many data points do I need?

At least 4 prices for a number, but a reliable reading needs more: with 20 returns, anything inside about ±0.45 could be chance. Use 60 or more values when you can, and about 250 daily returns for a one-year view.

Is this the same as Excel's CORREL function?

Yes. On raw prices the result equals CORREL applied to the two price columns. On returns it equals CORREL applied to the two columns of returns, each computed as the price divided by the previous price, minus one.

Why do EUR/USD and USD/CHF often show a negative correlation?

The US dollar is the quote currency in EUR/USD and the base currency in USD/CHF. When the dollar strengthens, EUR/USD tends to fall and USD/CHF to rise, so their returns often move in opposite directions.

Can correlation predict where a market will go?

No. Correlation describes how two markets moved together in the past window. It changes over time and says nothing about direction, so recompute it regularly and use it to manage combined risk, not to forecast.

Related guides

All guides
All free tools

Let AI build the indicator behind your numbers.

Turn the rules you just calculated into a TradingView indicator, an MT5 bot or a crypto bot. Instant access, with a 7-day money-back guarantee.