DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
The Finance Base
The Money Desk · Blog
Re:

How to Calculate Correlations Between Stocks

Calculate Pearson correlation between two stocks by comparing their returns over matching dates and intervals. See how to interpret the result and use it carefully.
From TheFinanceBase Team4 min to read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To calculate how two stocks moved together, calculate their returns over the same periods, pair the observations by date, and find the Pearson correlation between the two return series. The result ranges from −1 to +1: values nearer +1 indicate stronger positive linear co-movement, values nearer −1 indicate stronger negative linear co-movement, and values near zero indicate little linear association in the selected sample.

Calculate correlation from matched stock returns

When the question is whether two stocks’ performance moved together, use returns rather than comparing their raw share prices. Price levels are not directly comparable measures of performance; returns express each stock’s change over the same period. The CFA Institute’s SBBI Summary Edition defines the relevant relationship using return series.

  1. Choose the dates and frequency. Decide whether to use daily, weekly, or monthly returns, and choose a start and end date suited to your question. There is no universally correct interval or lookback window.
  2. Get comparable price observations. For each stock, collect prices for the same dates and use a consistent approach to corporate actions, such as splits and dividends, if your goal is to compare investment performance. The reviewed sources do not prescribe one data provider or adjustment convention.
  3. Calculate each period’s return. A simple return for period t is (Pₜ / Pₜ₋₁) − 1, where Pₜ is the price at the end of the period and Pₜ₋₁ is the price at the start. Apply the same return convention to both stocks.
  4. Match the return observations. Keep only periods for which both stocks have returns, and ensure each pair refers to the same dates and interval. A daily return for one stock should not be paired with a weekly return for the other.
  5. Compute Pearson correlation. Apply a Pearson correlation function to the two aligned return columns, or calculate covariance and divide it by the product of the two standard deviations.
  6. Report the result with its context. State the date range, frequency, return convention, and correlation. The estimate describes that sample; it is not a permanent characteristic of the stocks.

The formula and spreadsheet calculation

Pearson correlation between return series X and Y is:

ρXY = Cov(X,Y) / (σX × σY)

Cov(X,Y) is the covariance of the paired returns, while σX and σY are their standard deviations. If you calculate these separately, use consistent sample or population conventions throughout. A spreadsheet’s Pearson correlation function can calculate the same statistic directly once the return columns are aligned; the calculation is a statistical method, not a feature unique to any particular product. The CFA Institute glossary describes correlation as a measure of linear association between numeric variables.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the correlation tells you—and what it does not

Pearson correlation is bounded by −1 and +1. A value near +1 means the two return series had strong positive linear co-movement in the observed sample; a value near −1 means strong negative linear co-movement. A value near zero means little linear association, not necessarily no relationship of any kind.

As the CFA Institute’s SBBI Summary Edition (2020) puts it: “Two series can be related in a nonlinear way and have a correlation coefficient of zero.” Correlation also does not establish that one stock caused the other to move.

Rank #2

A correlation estimate can change with the sample period and market conditions. A 2013 CFA Institute Journal Review digest summary describes a study using 72 years of daily closing prices for 30 Dow Jones Industrial Average stocks. In that study, average correlations tended to rise when index returns were large in either direction, with a stronger effect during poor performance. This is a historical finding about the stocks and period studied, not a forecast that every pair will behave the same way.

Make two correlation estimates comparable

If you are comparing estimates—for example, a recent correlation with a longer-term one—keep the calculation choices visible. Differences in those choices can make two figures answer different questions.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Return frequency: daily, weekly, or monthly observations.
  • Start and end dates: the sample window used for each estimate.
  • Return convention: simple or log returns.
  • Missing dates and corporate actions: how unmatched observations, splits, and dividends are handled.
  • Full-sample or rolling estimate: one correlation for the entire period or repeated calculations over moving windows.

These are analytical choices rather than settings with one universally correct answer. Disclose them so a reader can tell what each estimate represents.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use correlation carefully in portfolio decisions

Correlation is one input into portfolio risk, not a complete risk measure. A two-stock portfolio’s risk also depends on each stock’s volatility and the portfolio weights assigned to them. Combining assets with less-than-perfect correlation can reduce portfolio volatility relative to a weighted average of their individual volatilities under the assumptions of the calculation, but a low or negative historical correlation does not guarantee protection in a future downturn. See the CFA Institute’s explanations of portfolio risk and return and diversification for the role of correlation alongside other portfolio inputs.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More post from the Money Desk

  1. The Money DeskBlogTheFinanceBase09 OCT 267 minMortgage Escrow FAQs: Taxes, Insurance, Shortages, and Refunds
  2. The Money DeskBlogTheFinanceBase09 OCT 265 minHow Mortgage Escrow Accounts Work and What Homeowners Pay For
  3. The Money DeskBlogTheFinanceBase09 OCT 265 minHow to Read a Stock Chart, Volume and Market-Cap Data
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.