def test_industry_neut1(self): df = random_alpha(n=20) neut1_df = api.industry_neut(df, 'level2') neut2_df = api.industry_neut(neut1_df, 'level1') self.assertTrue(frames_equal(neut1_df, neut2_df))
def test_barra_corr_neut(self): df = random_alpha(n=20) neut_df1 = api.barra_corr_neut(df, 'short', 'industry') neut_df2 = api.barra_corr_neut(neut_df1, 'short', 'industry') self.assertTrue(frames_equal(neut_df1, neut_df2))