Hey guys, I am currently getting familiar with alphalens and started to test some factors. Now I have the problem that I do not know how to inverse a ranking. In the sense that the high numbers will be in the quantile to be shorted and the low numbers in the quantile to be longed.
The following line of code works fine for factors like roa, roe etc. But for RSI for example I saw that I could get some alpha if I reverse the ranking.
testing_factor = testing_factor.rank(mask=universe, method='average')
Is here someone who can let me know how this can be done and how I could get more control and info about this.
Thanks a lot in advance.
Kind regards
Marcel kresse