GE
GiltEdgeUK Personal Finance

Investing Guide: How to Calculate Covariance — A Practical Guide for UK Portfolio Builders

Key Takeaways

  • Covariance measures whether two assets tend to move together (positive), in opposite directions (negative), or independently (near zero) — it is the mathematical foundation of portfolio diversification.
  • UK gilt yields and the US Federal Funds rate showed a sample covariance of 0.0131 and a correlation of 0.67 over the twelve months to January 2026, confirming they tend to move in the same direction.
  • For UK ISA and SIPP investors, combining assets with low or negative covariance — such as equities, gilts, and commodities — reduces overall portfolio volatility without necessarily sacrificing returns.
  • Covariance is backward-looking and assumes a linear relationship, so it should be recalculated periodically and supplemented with other risk measures rather than relied upon in isolation.
  • Both Excel and Google Sheets provide built-in covariance functions (COVARIANCE.S), making it straightforward for individual investors to analyse their own portfolio diversification.

If you hold more than one investment in your ISA or SIPP — and you should — then understanding how those assets move in relation to each other is one of the most valuable analytical skills you can develop. That relationship is measured by covariance, a statistical concept that sits at the heart of modern portfolio theory and underpins how professional fund managers construct diversified portfolios.

Covariance tells you whether two assets tend to rise and fall together (positive covariance), move in opposite directions (negative covariance), or behave largely independently of each other (covariance near zero). For UK investors allocating across FTSE 100 equities, gilts, global funds, and cash, grasping this concept can mean the difference between a portfolio that weathers volatility and one that amplifies it.

This guide walks through the formula step by step, works through a real example using UK gilt yields and US Federal Reserve interest rate data from the past twelve months, and explains how to apply covariance practically when building a diversified portfolio in a Stocks and Shares ISA or pension.

What Covariance Actually Measures

Covariance is a statistical measure of how two variables move together over time. According to FCA guidance on investment risk, in investing, those variables are typically the returns of two assets — say, FTSE 100 shares and UK government gilts. A positive covariance means that when one asset's returns are above its average, the other's tend to be as well. A negative covariance means they tend to move in opposite directions.

The formula for sample covariance between two assets X and Y over n periods is:

Cov(X, Y) = Σ [(Xᵢ − X̄) × (Yᵢ − Ȳ)] / (n − 1)

Where Xᵢ and Yᵢ are the individual observations, X̄ and Ȳ are the means, and n is the number of observations. The denominator uses (n − 1) rather than n for sample covariance, applying what statisticians call Bessel's correction to produce an unbiased estimate.

It is important to understand that covariance on its own does not tell you the strength of the relationship — only the direction. A covariance of 0.013 between gilt yields and interest — see the DMO for current gilt data (dmo.gov.uk), part of GOV.UK rates is positive, but is that strong or weak? To answer that question you need correlation, which normalises covariance by dividing it by the product of the two standard deviations. We will return to this distinction later. For more on portfolio construction and diversification, see our dedicated guide.

Step-by-Step Calculation Using Real UK Data

Let us work through a concrete example using twelve months of real data. We will calculate the covariance between UK long-term gilt yields and the US Federal Funds rate from February 2025 to January 2026 — two interest rate benchmarks that influence UK mortgage pricing and savings rates.

The monthly data points are as follows. UK gilt yields (percent): 4.51, 4.64, 4.58, 4.60, 4.52, 4.59, 4.64, 4.69, 4.57, 4.50, 4.48, 4.45. Federal Funds rate (percent): 4.33, 4.33, 4.33, 4.33, 4.33, 4.33, 4.33, 4.22, 4.09, 3.88, 3.72, 3.64.

Step 1 — Calculate the means. The mean UK gilt yield is 4.564% (54.77 ÷ 12). The mean Federal Funds rate is 4.155% (49.86 ÷ 12).

Step 2 — Calculate deviations from the mean. For each month, subtract the mean from the observed value. For example, February 2025 gilt yield deviation is 4.51 − 4.564 = −0.054, while the Fed Funds deviation is 4.33 − 4.155 = +0.175.

Step 3 — Multiply the paired deviations. For February 2025: (−0.054) × (+0.175) = −0.00945. Repeat for all twelve months.

Step 4 — Sum the products and divide by (n − 1). The sum of all twelve products equals approximately 0.1439. Dividing by 11 gives us a sample covariance of 0.0131.

The positive result confirms that UK gilt yields and the Federal Funds rate tended to move in the same direction over this period — both drifted lower in the final quarter of 2025 as central banks eased monetary policy.

From Covariance to Correlation: Putting the Number in Context

A raw covariance of 0.0131 is difficult to interpret without context. According to Bank of England yield curve data, is that a strong relationship or a weak one? This is where the Pearson correlation coefficient becomes essential. Correlation standardises covariance to a scale between −1 and +1 by dividing by the product of both assets' standard deviations.

Correlation(X, Y) = Cov(X, Y) / (σX × σY)

Using our data, the standard deviation of UK gilt yields over the twelve months is approximately 0.076, and for the Federal Funds rate it is approximately 0.256. This gives a correlation of 0.0131 / (0.076 × 0.256) ≈ 0.67.

A correlation of 0.67 indicates a moderately strong positive relationship — when one rate moves, the other tends to follow, though not in lockstep. For portfolio construction purposes, correlations above 0.7 suggest limited diversification benefit, while correlations below 0.3 or negative values indicate strong diversification potential.

This is directly relevant for UK investors. If your portfolio holds both UK gilts and assets sensitive to US interest rates, you are getting less diversification than you might assume. This is why many financial advisers recommend including asset classes with low or negative correlation to gilts — such as UK commercial property REITs, commodities, or emerging market equities — within a Stocks and Shares ISA or SIPP. For more on understanding covariance in portfolio context, see our dedicated guide.

Practical Applications for UK ISA and Pension Investors

Understanding covariance and correlation has direct implications for how you structure investments within your ISA or SIPP wrapper. The core principle is straightforward: combining assets with low or negative covariance reduces overall portfolio volatility without necessarily sacrificing returns.

Consider a simple example relevant to many UK investors. The FTSE 100 and FTSE 250 indices are heavily correlated — they tend to rise and fall together because they are both UK equity benchmarks heavily influenced by the same economic forces. Adding more FTSE 250 exposure to an existing FTSE 100 allocation provides limited diversification benefit.

By contrast, UK gilts have historically shown low or negative correlation with UK equities, particularly during market downturns. When equity markets fall sharply, investors often flee to government bonds, pushing gilt prices up. This negative covariance during stress periods is precisely why balanced funds typically hold a mix of equities and bonds.

For UK investors using the £20,000 annual ISA allowance for 2025/26, the practical takeaway is clear. Rather than concentrating in a single asset class or geographic region, aim for a mix of holdings where the portfolio-level covariance is as low as possible. A global index tracker combined with a UK gilt fund and perhaps a small commodity allocation provides structurally better risk-adjusted returns than putting everything into FTSE All-Share.

For a deeper look at this area, read our guide to How to Calculate Fixed Asset Depreciation Using Excel.

Limitations and Common Pitfalls to Watch For

Covariance is a powerful tool, but it comes with important limitations that UK investors should understand before relying on it too heavily. (Source: MoneyHelper diversification guide.)

Covariance is backward-looking. The calculation uses historical data, but past relationships between assets are not guaranteed to persist. During the 2022 gilt crisis, for example, UK government bonds and equities fell simultaneously — a positive covariance event that caught many supposedly diversified portfolios off guard. The relationship between gilts and equities can shift dramatically during regime changes in monetary or fiscal policy.

It assumes a linear relationship. Covariance only captures linear co-movement. Two assets might have a complex, nonlinear relationship that covariance misses entirely. For instance, gold might show near-zero covariance with equities during normal markets but strongly negative covariance during crises — a pattern that a single covariance number smooths away.

The time period matters enormously. Calculate covariance over three months and you may get a very different result than over three years. Short-term noise can dominate, while very long-term calculations may average away important structural changes. Most professional portfolio managers use rolling windows of three to five years for strategic asset allocation, with shorter windows for tactical adjustments.

It does not account for magnitude. A positive covariance tells you two assets tend to move in the same direction, but nothing about how far they move. Two assets might both fall during a downturn, but one might drop 5% while the other drops 40%. For a complete risk picture, you also need to consider individual asset volatility alongside the covariance matrix.

Despite these limitations, covariance and its normalised cousin, correlation, remain the foundation of portfolio construction. Most UK investment platforms that offer model portfolios — from Vanguard LifeStrategy to Nutmeg's managed portfolios — use covariance matrices as a core input to their allocation algorithms.

This article is for informational purposes only and does not constitute regulated financial advice. The value of investments can go down as well as up, and you may get back less than you invest. For personalised advice, consult a qualified financial adviser.. For more on asset allocation strategies for UK investors, see our dedicated guide. For more on tax-efficient investing through ISAs, see our dedicated guide.

For a deeper look at this area, read our guide to Cash Flow Statements Explained.

Conclusion

Covariance is not just an abstract formula from a statistics textbook — it is the mathematical foundation upon which diversification, the only genuinely free lunch in investing, is built. For UK investors building portfolios in ISAs and SIPPs, understanding how your holdings move in relation to each other is just as important as understanding each holding individually.

The worked example using real UK gilt yield and Federal Funds rate data illustrates both the calculation method and a key insight: even assets that appear different on the surface can show significant positive covariance, reducing the diversification benefit you might expect. A correlation of 0.67 between these two rates means nearly half of the variation in one can be statistically explained by the other.

As you review your own portfolio ahead of the April 2026 tax year end, consider not just what you own but how those holdings relate to each other. The tools to calculate covariance are freely available in any spreadsheet, and many UK investment platforms now provide correlation data directly. Use them — your future self, navigating the next inevitable market downturn, will thank you.

This article is for informational purposes only and does not constitute regulated financial advice. Past performance and historical correlations are not reliable indicators of future results. Consider consulting a qualified financial adviser before making investment decisions.

Frequently Asked Questions

Sources

Related Topics

covarianceportfolio diversificationUK investingcorrelationmodern portfolio theoryISA investinggilt yieldsrisk management
Enjoyed this article?

This article is based on publicly available UK economic and financial data. It is for informational purposes only and does not constitute regulated financial advice. GiltEdge is not authorised or regulated by the Financial Conduct Authority (FCA). Past performance is not a reliable indicator of future results. Always consult a qualified financial adviser before making investment or financial planning decisions.