What is 'Covariance'
Covariance is a measure of the directional relationship between theÂ returns on two risky assets. A positive covariance means that asset returns move togetherÂ while a negative covariance means returns move inversely. Covariance is calculated by analyzing atreturn surprises (standard deviations from expected return)Â or by multiplying the correlation between the two variables by the standard deviation of each variable.
BREAKING DOWN 'Covariance'
Covariance measures how the mean values of two variables move together. If stock A's return moves higher whenever stock B's return moves higherÂ and the same relationship is found when each stock's returnÂ decreases, then these stocks are said to have a positive covariance. In finance, covariances are calculated to help diversify security holdings.
When an analyst has a set of data, a pairÂ of x and y values, covariance can be calculated using five variables from that data. They are:
 x_{i} = a given x value in the data set
 x_{m}Â = the mean, or average, of the x values
 y_{i} = the y value in the data set that corresponds with x_{i}
 y_{m} = the mean, or average, of the y values
 n = the number of data points
Given this information, the formula for covariance is: Cov(x,y) = SUMÂ [(x_{i}Â  x_{m})Â * (y_{i}Â  y_{m})] / (n  1)
It's important to note that while the covariance does measure the directional relationship between two assets,Â it does not show the strength of the relationship between the two assets. TheÂ coefficient of correlationÂ is a more appropriate indicator of this strength.
Covariance Applications
Covariances have significant applications in finance and modern portfolio theory. For example, in the capital asset pricing model (CAPM),Â which is used to calculate the expected return of an asset, the covariance between a security and the market is used in the formula for one of the model's key variables, beta. In the CAPM, beta measures the volatility, or systematic risk, of a security in comparison to the market as a whole; it's a practical measure that draws from the covarianceÂ to gauge an investor's risk exposure specific to one security.
Meanwhile, portfolio theory uses covariances to statistically reduce the overall risk of a portfolio by protecting against volatility through covarianceinformed diversification. Possessing financial assetsÂ with returnsÂ that have similarÂ covariances does not provide very much diversification; therefore, a diversified portfolio would likely contain aÂ mix of financial assets that have varying covariances. For more on this, seeÂ How is covariance used in portfolio theory?
Example of Covariance Calculation
Assume an analyst in a company has a fivequarter data set that shows quarterlyÂ gross domestic product (GDP) growth in percentages (x) and a company's new product line growth in percentages (y). The data set may look like:
 Q1: x = 2, y = 10
 Q2: x = 3, y = 14
 Q3: x = 2.7, y = 12
 Q4: x = 3.2, y = 15
 Q5: x = 4.1, y = 20
The average x value equals 3, and the average y value equals 14.2. To calculate the covariance, the sum of the products of the x_{i}Â values minus the average x value, multiplied by the y_{i} values minus the average y values would be divided by (n1), as follows:
Cov(x,y) = ((2  3) x (10  14.2) + (3  3) x (14  14.2) + ... (4.1  3) x (20  14.2)) / 4 = (4.2 + 0 + 0.66 + 0.16 + 6.38) / 4 = 2.85
Having calculated a positive covariance here, the analyst can sayÂ that growth of the company's new product line has a positive relationship with quarterly GDP growth.Â To learn more about how covariance is calculated, see Calculating Covariance for Stocks.

Correlation Coefficient
A measure that determines the degree to which two variable's ... 
Correlation
In the world of finance, a statistical measure of how two securities ... 
Adjusted Mean
The adjusted mean accounts for outlines and anomalies in a data ... 
Inverse Correlation
A contrary relationship between two variables such that they ... 
BroadBased Weighted Average Ratchet
A mechanism seen in earlystage, prepublic companies in response ... 
Y
Y is a letter that appears on a stock symbol specifying that ...

Investing
What is Covariance?
Covariance is a concept used in statistics and probability theory to describe how two variables change when compared to one another. In business and investing, covariance is used to determine ... 
Investing
How This New ETF Tracks Millennial Consumer Habits
A recently launched ETF aims to track Millennial consumer habits. 
Investing
How to Pick the Best Stocks? Listen to Customers (AMZN, PZZA)
Rated top in customer service, these companies have delivered impressive stock performance over the past year. 
Investing
Is the Stock Correlation Strategy Effective?
The synchronized movement among stocks and markets in recent years is challenging diversification. 
Investing
Investing $100 a Month in Stocks for 20 Years
Learn how a monthly investment of just $100 can help build a future nest egg using properly diversified stocks or stock mutual funds. 
Trading
Apple Earnings: A Lot Depends on iPhone X Outlook
With reports of sluggish iPhone 8 sales, the outlook for Apple's iPhone X will be key. 
Investing
Understanding The Sharpe Ratio
The Sharpe ratio describes how much excess return you are receiving for the extra volatility that you endure for holding a riskier asset. 
Investing
10 SmallCap Stocks With Growth Potential (HMSY)
These 10 smallcap stocks have potential for growth. 
Investing
iPhone X Sales Could Be 20% Above Expectations: KGI
KGI Securities raised their shipment estimates, saying they will be as much as 20% higher in Q4. 
Investing
Breaking Down The Geometric Mean
Understanding portfolio performance, whether for a selfmanaged, discretionary portfolio or a nondiscretionary portfolio, is vital to determining whether the portfolio strategy is working or ...

How does covariance impact portfolio risk and return?
Understand how covariance is related to the risk and return of a portfolio of stocks, and learn how covariance is used to ... Read Answer >> 
According to the CAPM, the expected return on a stock, that is part of a portfolio, ...
A. the covariance between the stock and the market. B. the variance of the market. C. the market risk premium. D. ... Read Answer >> 
How can you find the demand function from the utility function?
Learn how the utility function can be used to derive the demand function, and how both of these concepts relate to utility ... Read Answer >> 
What is the formula for calculating beta?
Learn about beta, how to calculate it, and how it's used as a risk measure with examples that include Apple and Tesla Inc. Read Answer >> 
What is the difference between the expected return and the standard deviation of ...
Learn about the expected return and standard deviation and the difference between the expected return and standard deviation ... Read Answer >>