Hi, new to Quantopian and Python.I need create a ranking function to rank current days returns against returns of previous X days
Rank = # days with return lower than today / # of days in lookback
So first need to find returns for past X days then compare that list with todays return, count the number of days with a lower return than today and divide by total days in lookback. Lookback will be around 100 days. This function must be able to work on a universe of stocks.
Any help is appreciated!