def prep_data(self): daily_price = self.preprocess.retrieve_open_close() daily_change = post.compute_daily_change(daily_price).fillna(0) mu = daily_change.mean() residual = daily_change.subtract(mu) return residual
def compute_correlation(self): daily_price = self.preprocess.retrieve_open_close() daily_change = post.compute_daily_change(daily_price) return daily_change.corr(method='pearson', min_periods=30)