Free research tool

Covariance Calculator

Covariance, correlation, R squared and both betas for any two stocks, ETFs, currencies or economic series, daily to annual.

Background

Data as of ; processed .

Why covariance matters in finance

  • Risk is a matrix, not a list. A portfolio's variance is the sum of every holding's variance and every pair's covariance. With 20 holdings there are 20 variances and 190 covariances: most of the risk is in the pairs.
  • Diversification only works between assets that do not move together. Two assets with correlation 0.9 add little protection; a correlation near zero or below adds a lot.
  • Hedges are covariances. A hedge ratio is a beta: the covariance of the position with the hedge divided by the hedge's variance.
  • Relations change, and they change fastest when it matters. Correlations between risky assets tend to rise in sell-offs, just when diversification is needed. Some of that rise is mechanical (higher volatility alone raises a measured correlation); some is real.
  • Macro data arrives late and is revised. A relation between a market and an economic release is only usable from the day the figure is published, and at the value first published.

How a lead works

  • A lead is measured against the release, not the month described. Oil's change in January is set against the producer price index released in March, which describes February: a lag of 2 release months is a lead of 1 month of the period described.
  • The usable time is to publication. From the end of the oil month to the release is 44 days at the median (331 releases since 1999): about 6 weeks.

From the Markets and Macro Quarterly, October 2026, Section 1.

How to use the calculator

The analyst: is the story in the data?

  • Test a macro thesis before writing it. "Rising real yields hurt technology stocks": pick DFII10 and a technology stock or sector fund, weekly or monthly, 5 to 10 years. The correlation says whether the relation exists; the beta says how large it is; the window says whether it is recent or long-standing.
  • Find what a company really moves with. A stock against oil, the dollar, the 10-year yield and credit spreads in turn: the strongest is its true macro driver, which is not always its sector label.
  • Check that a relation is not two trends. Run it on changes (the default), never on levels: two rising series always look related as levels.
  • Cite it. Every result names its data source; a pair, frequency and window can be shared as a link and reproduced by anyone.

Try an example:Exxon Mobil against WTI crude oil, daily, over1 year

The portfolio manager: what does the book really hold?

  • Diversification check before adding a position. The correlation of the candidate with the portfolio's largest exposure (or with SPY): near 1 adds concentration, near 0 or below adds diversification.
  • Hidden factor exposure. Each holding against the 10-year yield, the dollar, oil or credit spreads: several holdings with large betas to the same series are one bet, whatever their sectors.
  • Stress view. The same pair over a calm and a volatile window (for example 2024 against 2020): correlations usually rise in sell-offs, so the diversification that shows in calm data is the most a book can count on, not the least.
  • Benchmark fit. A fund or ETF held in the book against its benchmark (for example a sector fund against SPY): the beta is the market exposure it actually carries, the R squared how much of its movement the market explains.

Try an example:a technology sector fund against SPY, daily, over1 year

The trader: what has changed, and how much to hedge

  • Hedge ratio. The beta of the position on its hedge instrument, over a look-back that matches the holding period (1 to 3 months for a short-term trade); size the hedge as position value times beta.
  • Relative-value pairs. Two related names (KO and PEP, XOM and CVX): the correlation says whether the pair is still a pair; the beta gives the ratio to trade them in.
  • Regime check. The same pair over 1 month, 3 months and 1 year: a short-window reading far from the long one is the kind of aberration this paper tests for, and the first sign that a hedge or a pair has stopped working.
  • Macro event read. A sector against the series behind the next release (payrolls, CPI, claims), monthly, to see how strongly the sector has moved with that figure.

Try an example:Coca-Cola against PepsiCo, daily, over1 month3 months1 year

From the Markets and Macro Quarterly, October 2026, Section 2.

Open the calculator

This product uses the FRED® API but is not endorsed or certified by the Federal Reserve Bank of St. Louis.

Work with Gyre

The Gyre Investment Analytics Hub is inexpensive and sits on top of your current OMS, EMS and accounting systems, dramatically enhancing decision support and analysis. Gyre also provides custom analytics to meet any proprietary need. Contact us today: team@gyreresearch.com

team@gyreresearch.com

Markets and Macro is a summary of what Gyre's free tools show, with the studies behind them. The free tools behind it