With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

Correlation of stocks based on the daily percentage change of the closing price

Correlation is a measure of the strength of the association between two variables. A correlation coefficient of 1.0 means that every change in value in one set of data has a proportionate change in value in the other set of data. A 0.0 correlation means that the data sets have no relationship. The higher the correlation, the more ability there is to predict a change in each, based on one or the other.

The scatter plot matrix gave us a quick visual idea of the correlation between two stocks, but it was not an exact number. The exact correlation between the columns of data in DataFrame can be calculated using the .corr() method. This will produce a matrix of all ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required