Direct Answer

Covariance measures how two series move together. It is the average product of their deviations from their own means, so it is positive when they tend to be above or below their means together and negative when they move opposite. The sign shows the direction of co-movement and the size depends on the units of both series.

By Swoopr Editorial Team AI-assisted research, human-verified

Covariance: Formula, Meaning, Signals, Examples and How to Use It

How Is Covariance Calculated?

Covariance measures how two series move together. It is the average product of their deviations from their own means, so it is positive when they tend to be above or below their means together and negative when they move opposite.

Formula: cov(X, Y) = sum of (x_i - mean_x) * (y_i - mean_y) / (N - 1) for the sample estimate

Inputs:

Worked example. For x values 1, 2, 3, 4 and y values 2, 3, 5, 6, the sample covariance is 2.333. The inputs are illustrative numbers, not market data.

Reading it. The sign shows the direction of co-movement and the size depends on the units of both series. Covariance is the building block of portfolio variance, beta and correlation.

Limits. Its magnitude has no standard scale, so it cannot be compared across pairs, which is why it is usually normalized into correlation. It captures only linear relations and is sensitive to outliers.

What is Covariance?

Covariance measures how two series move together. It is the average product of their deviations from their own means, so it is positive when they tend to be above or below their means together and negative when they move opposite.

How to use Covariance

The sign shows the direction of co-movement and the size depends on the units of both series. Covariance is the building block of portfolio variance, beta and correlation. A reading alone is never a buy or sell signal; it needs context from price structure, volume, volatility and the broader market regime.

Strengths

Weaknesses and limitations

Editorial and risk note

This page is educational content, not individualized investment advice. It should not imply guaranteed prediction, accuracy or outperformance.

Frequently Asked Questions

Is Covariance a buy or sell signal?

No. The sign shows the direction of co-movement and the size depends on the units of both series. Its magnitude has no standard scale, so it cannot be compared across pairs, which is why it is usually normalized into correlation. A trade built on it still needs a trigger, an invalidation rule, a position size and realistic execution assumptions.

What is the best setting for Covariance?

Covariance takes these inputs: two aligned series; window length N. There is no universal best setting for the tunable ones, so test them across instruments, regimes and out-of-sample periods and favor stable parameter regions over one historical winner.

Can Covariance be used by itself?

Its magnitude has no standard scale, so it cannot be compared across pairs, which is why it is usually normalized into correlation. It captures only linear relations and is sensitive to outliers. For that reason it is read next to measures of direction, participation, valuation, liquidity and risk, not alone.

Does Covariance work on every timeframe?

The calculation (cov(X, Y) = sum of (x_i - mean_x) * (y_i - mean_y) / (N - 1) for the sample estimate) can be run on any bar size, but behavior is not portable: a reading on a five-minute chart describes a very different market window from the same reading on a daily chart. Validate the exact timeframe before relying on it.

Why does Covariance give false signals?

Its units are the product of the two series' units, which makes the number hard to interpret on its own. An N minus 1 sample estimate is unbiased but noisy for a window of a few dozen points across many assets. Lag, noise and regime changes add to this, because market participants react to new information after the reading is calculated.

How should Covariance be backtested?

Rebuild Covariance from two aligned series using point-in-time data, write the rules before testing, include delisted securities where relevant, model realistic fills and costs, reserve a validation sample and compare with a simpler baseline.

Swoopr Editorial Team

The Swoopr Editorial Team produces independent investment education, research, and tools for understanding markets, evaluating opportunities, and managing risk. All content is educational only and does not constitute personalized investment advice.

See our editorial policy and corrections policy.