Covariance Calculator
Covariance, correlation and beta for any two series

Methodology

Every number the calculator shows comes from the steps below, in this order. Nothing is smoothed, filled in or estimated.

  1. Data. A security's price is its daily adjusted close (the close for currencies and crypto, which have no adjusted close). Our price history begins on 2023-12-01, so a security can be looked back at most to that date. A FRED series is downloaded from the Federal Reserve Bank of St. Louis the first time anyone uses it and refreshed when FRED reports an update; FRED's "no value" marks are left out.
  2. Periods. Each series is put into periods at the chosen frequency (the day; the week, Monday to Sunday; the calendar month; the quarter; the year) and the last value in each period is kept. A weekly period is shown as its Friday, the others as their last day.
  3. Alignment. Only periods in which both series have a value are kept, so both changes are always measured over the same interval. A period that is not over by the end of the window (for example the current month) is left out and named in the notes.
  4. Changes. Each series is measured between consecutive kept periods as a percent change, a change in level, a log change, or left as its level. Percent and log changes need values above zero. A two-day change (daily frequency only, for both series) is measured from each day to the day two kept days later, as a percent change or, for a FRED series measured in percent, a change in level; the changes overlap, one per day. It is meant for two series recorded at different times of day (a stock's 4 pm close and a rate or currency fixed earlier): a move one series records a day after the other still falls inside a shared change.
  5. Statistics. Sample covariance with the N−1 denominator, Pearson correlation, R² (the square of the correlation), and each beta (the covariance divided by the other series' variance). The annualized covariance multiplies the per-period figure by the periods in a year: 252 trading days, 52 weeks, 12 months, 4 quarters or 1 year. A two-day change holds two days' worth of covariance per period, so it is annualized by 126 (252 divided by 2). Levels are not annualized.

Rules the calculator enforces

Reading the result

Covariance is in the units of the two measures multiplied together (for two percent changes, a fraction squared), so its size depends on the series. Correlation removes the units and runs from −1 to 1. The beta of the second series on the first is how much the second series' change moves, on average, for a one-unit change in the first.

FRED data and its owners

Each FRED series is listed with its source under the result. FRED marks some series as owned by a third party that requires permission before its data is used; the calculator does not offer those, nor series FRED gives no copyright status.

Economic data: Federal Reserve Bank of St. Louis, FRED®.

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