Risk & volatility

Correlation

Correlation is a unitless measure, from −1 to +1, of how closely two variables move together in a linear relationship.

Calculate it: Portfolio Concentration Calculator: HHI and Largest Weight →

What it means

When comparing stocks, correlation describes the extent to which their returns have moved together over a chosen period. A value near +1 means their returns tended to rise and fall together; near −1 means they tended to move in opposite directions. Near zero means little linear relationship, not necessarily no relationship at all.

Correlation has no units. Its value depends on the returns used, their frequency and the observation window. For example, a correlation calculated from daily returns over one year can differ from one calculated from monthly returns over five years. Historical correlation does not establish what will happen next.

How it is calculated

Pearson correlation compares the covariance of two return series with their individual standard deviations:

r_AB = Σ[(A_i − Ā)(B_i − B̄)] / √{Σ(A_i − Ā)² × Σ(B_i − B̄)²}

  • r_AB is the correlation coefficient for stocks A and B, between −1 and +1.
  • A_i and B_i are the two stocks’ returns in the same period i, expressed consistently as percentages or decimals.
  • Ā and B̄ are their respective average returns across the observations.
  • Σ means add the indicated values across all matched periods.

Use returns rather than raw share prices: two prices can trend upward together even when their period-by-period returns have little relationship. If either return series has zero variation, its standard deviation is zero and this correlation is undefined. For a basket, correlations between pairs of holdings can be combined with position weights and volatilities to estimate portfolio volatility; correlation alone does not give that volatility.

Worked example

Consider two hypothetical stocks with returns measured in percentage points over four matched periods:

Period Stock A Stock B
1 +1% +2%
2 +2% +4%
3 −1% −2%
4 −2% −4%
  1. Average each series. Both averages are 0%.
  2. Multiply each pair of deviations from its average: 1 × 2 + 2 × 4 + (−1) × (−2) + (−2) × (−4) = 20 squared percentage points.
  3. Sum the squared deviations for A: 1 + 4 + 1 + 4 = 10. For B: 4 + 16 + 4 + 16 = 40.
  4. Divide: r_AB = 20 / √(10 × 40) = 20 / 20 = +1.

B’s returns are exactly twice A’s in this artificial example, so their correlation is perfectly positive. That does not mean they have equal volatility: B’s return changes are twice as large.

Why it matters before you trade

Adding a stock to a basket does not necessarily add much diversification. If its returns closely follow those of existing holdings, the basket may remain exposed to similar movements. Conversely, a lower historical correlation can help explain why holdings sometimes offset one another, without guaranteeing protection during a downturn.

Before placing a trade, a correlation check is most useful alongside position weights, individual volatility, sector exposures and the time period examined. Correlations can change, particularly when market conditions change. A stock can also have a low correlation with another stock while both remain exposed to a broad market decline.

How PreTrAIde uses it

PreTrAIde’s stated quantitative layer does not list a pairwise correlation calculation. Its pre-trade analysis instead checks a proposed stock basket using measures including daily volatility, 1-day 95% value at risk, portfolio breakdowns by sector, country, region, currency and market capitalization, and a Herfindahl-Hirschman concentration index. These checks provide context for basket risk, but concentration by holdings or categories is not the same measure as return correlation. PreTrAIde’s GO, NO-GO and MODIFY verdicts are decision support, not investment recommendations.

Common mistakes

  • Treating +1 as equal risk: Stocks can move in lockstep but have different-sized returns, as in the example.
  • Treating zero as independence: Zero correlation rules out a linear relationship in the measured sample, not every possible relationship.
  • Mixing periods or data types: Compare returns from matched dates and the same frequency, using consistent treatment of dividends and corporate actions.
  • Assuming a fixed number: A historical estimate can shift with the observation window or future market conditions.
  • Confusing correlation with concentration: Equal sector labels do not prove high correlation, and different labels do not prove low correlation.

Frequently asked questions

What does a correlation of 0.8 mean for two stocks?

It means their returns had a strong positive linear relationship in the data measured. It does not mean one stock rose 0.8% whenever the other rose 1%, or that the relationship will continue.

Can two stocks have negative correlation?

Yes. A negative correlation means their returns tended to move in opposite directions over the measured periods; it does not guarantee they will offset each other in the future.

Does low correlation mean a portfolio is diversified?

Not by itself. Portfolio risk also depends on position sizes, each holding’s volatility and how relationships change over time.

Related terms

Risk & volatility

Historical volatility Implied volatility Annualized volatility Daily volatility Parkinson volatility estimator Yang-Zhang volatility estimator GARCH model Expected shortfall (CVaR) All glossary terms →

Check your next trade before you place it

Build a basket, run a pre-trade analysis, and get a GO, NO-GO or MODIFY verdict with the cost, liquidity and risk behind it.

Start your free trial Try the free tools

Educational content, not investment advice. PreTrAIde is analysis software, not a broker: it never executes orders, and its verdicts are decision support, not recommendations to buy or sell.