官术网_书友最值得收藏!

Correlation

Correlation is one of the most common statistics and is directly built into the pandas DataFrame. A correlation is a single number that describes the degree of relationship between two variables, and specifically between two sequences of observations of those variables.

A common example of using a correlation is to determine how closely the prices of two stocks follows each other as time progresses. If the changes move closely, the two stocks have a high correlation, and if there is no discernible pattern they are uncorrelated. This is valuable information that can be used in a number of investment strategies.

The level of correlation of two stocks can also vary slightly with the time frame of the entire dataset, as well as the interval. Fortunately, pandas has powerful capabilities for us to easily change these parameters and rerun correlations. We will look at correlations in several places later in the book.

主站蜘蛛池模板: 通山县| 大连市| 平舆县| 惠水县| 尼勒克县| 许昌市| 邵阳市| 东方市| 郴州市| 吉安县| 临武县| 永泰县| 永丰县| 大悟县| 馆陶县| 武山县| 沙湾县| 岑巩县| 金川县| 英山县| 宁城县| 湘西| 蕉岭县| 泊头市| 茶陵县| 清河县| 原阳县| 云南省| 隆德县| 桐柏县| 思南县| 浦江县| 北碚区| 龙井市| 永和县| 白城市| 义乌市| 友谊县| 独山县| 云龙县| 凌海市|