Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Weird Mean Return by Sector. What have I done wrong?

I'm very new to algo-trading and Quantopian. I've taken a notebook from Learn from the Experts Episode 3 and adapted it to work with a factor I am testing. However, when I am looking at the mean return by sector from alphalense, they all seem to cap around 3.25bps. Have I not cleaned my data properly? Why is it doing this?

class MyYrGr(CustomFactor):  
    window_length = 1  
    def compute(self, today, assets, out, f, g):  
        out[:] = (g[0]/f[0])

my_factor = MyYrGr(mask=universe, inputs = [factset.Fundamentals.mkt_val_public, factset.Fundamentals.free_cf_minus_div_ltm])

pipe = Pipeline(  
    columns = {  
            'MyFactor': my_factor,  
            'Sector' : Sector()  
    },  
    screen=universe & my_factor.notnull() & my_factor.notnan() & my_factor.isfinite()  
)