Upload correlation_matrix.csv
#27
by
phope
- opened
Calculated the correlation matrix for all of the tickers in the 220mb data.
Read in Stock csv data and convert to have each Ticker as a column.
df = pd.read_csv('D:/SimFinData/us-shareprices-daily.csv', sep=';')
stocks = df.pivot(index="Date", columns="Ticker", values="Adj. Close")
stocks
Log Returns for all SimFin Tickers
logRet = np.log(stocks/stocks.shift())
Calculate correlation coefficients for every ticker
stocksCorr = logRet.corr()
stocksCorr
not-a-clone
changed pull request status to
merged