#twitter-follow { border: 0;position: fixed; top: 240px; left:0;} #live-support { border: 0;position: fixed; top: 370px; left:0;} #knowledge-base { border: 0;position: fixed; top: 170px; left:0;}

## Covariance

by Stefan Kroscen, 3462 days ago

Calculates the covariance of two numeric arrays. Similar to the covariance function in excel. The following description is taken from ehow:

Covariance is a measurement of how related the variances between two variables are. If the two variables both tend to increase together, it is a positive covariance, while if one tends to increase when the other decreases, it is a negative covariance. Zero covariance would indicate that the two variables are independent of each other. A high covariance, either positive or negative, suggests a correlation worth investigating but does not indicate causation.

Read more: How to Calculate Covariances | eHow.com http://www.ehow.com/how_5208932_calculate-covariances.html#ixzz1IVtwtJyw

Examples:
To chart the covariance of the change in DIA and SPY over the past 90 days, you could use:

Plot(covariance(Perf(GetSeries("DIA", close), 1), Perf(GetSeries("SPY", close), 1),2), "Covariance DIA SPY", colorLime|55|colorLime|64|0, ChartBar, StyleOwnScale);

What is this?

 Type: Trading Indicator Object ID: 940 Country: All Market: All Style: Technical Analysis

Related objects
Show All
Least Squares Regression Line (by QuantShare, uploaded several months ago)
No notes
 40
No notes
 19
Average Cross-Correlations (by Vangelis M., uploaded several months ago)
No notes
 23
Highest and Lowest value over a dynamic period (by QuantShare, uploaded several months ago)
No notes
 40
Price Display Indicator (by QuantShare, uploaded several months ago)
No notes
 13
Fractal Adaptive Moving Average - FRAMA (by clonex, uploaded several months ago)
No notes
 66
Qualitative Quantitative Estimation Indicator (by Brian Brown, uploaded several months ago)
No notes
 27
Number of reviews
Average rate
Click to rate this item
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

Number of reviews
Average rate
Click to rate this item
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object