Hi there,
I am trying to create a factor which is the total of all True/False filters a stock has within a pipeline so that I can use this as a 'score' to go long/short. Example is:
def roe(mask=initial_screen):
return or_.roe.latest
roe1 = roe()
ROEF = roe1.percentile_between(40, 100)
pipe.add(ROEF, 'ROEF')
Now if the stock passed this filter and has a value of 'True' within the pipeline, then that would be counted towards the total of true values for that stock as a factor. Any help would be appreciated :)
Regards,
Ross D