I was trying to create a factor that would contain stocks with the highest 10 (roa, roe....) and lowest 10 (pe and debt ratio). I tried to do this in the following code:
ranking_factor_1 = roa_factor + roe_factor + EPS_Growth_factor + Current_R_factor + dividentyield_factor
ranking_factor_2 = PE_factor + debt_to_marketcap_long_factor
ranking_factor_I = ranking_factor_1.top(20) + ranking_factor_2.bottom(20)
But adding factors with top and bottom atributes seems to not work. My question is: how to solve the problem while keeping the same logic?