Pandas with Python 2.7 Part 9 - Statistical Information

preview_player
Показать описание
In this tutorial, we cover the various statistical operations that Pandas can quickly perform on your dataset. This includes things like variance and correlation. This is actually quite impressive, as a popular method of investing is to find correlated assets and invest in the ones lagging change. Many people pay for a service to do this for them, yet it is actually relatively simple for us to program with Pandas.

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6
Рекомендации по теме
Комментарии
Автор

Love your tutorials and thank you for putting this unique material in youtube. They are very beneficial. On the last part I believe there is a quickier way rather than having to type manually each ticker every time using the corComp and so on. I'm still a novice but practice a lot and here is an alternative to getting the correlation matrix. (i'm using the price returns).import pandas as pdimport datetime from pandas_datareader import datalistall = list()tickers = ['XOM', 'YHOO', 'M', 'T']for ticker in tickers:             mydata = data.get_data_yahoo(ticker,                                                                start = datetime.datetime(2010, 1, 1),                                                                                                                              end = datetime.datetime(2015, 1, 1),                                                                     symbol = mydata['Adj Close']            symbol = pd.Series(symbol, name=ticker)            listall.append(symbol)df = = df.pct_change()correl_matrix = pctstocks.corr()print correl_matrix

skmistreci
Автор

Correlation is normalized covariance. So a covariance matrix will have unstandardized units. Useful if your units convey additional information 

theyoutube
Автор

Are you going to transition to Python 3.4 for your tutorials on Pandas? There are some simpler coding methods available to current users especially for downloading stock data from yahoo. 

esostoic
Автор

Nice tutorial, But very hard to hear your voice dude!

nabi
Автор

sentdex: great tutorial, great job

only one comment correlations are normally done on price returns not on prices

moongraber
visit shbcf.ru