Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
CustomFactor look ahead bias

Does this CustomFactor has look ahead bias? close[-1] refers to current day or previous day?

class MeanReversion(CustomFactor):  
    inputs = [USEquityPricing.close]  
    def compute(self, today, assets, out, close):  
        out[:] = close[-1] / close[0]

def initialize(context):  
    schedule_function(  
        my_rebalance,  
        date_rules.every_day(),  
        time_rules.market_open(minutes=30)  
    )  
    my_pipe = make_pipeline()  
    attach_pipeline(my_pipe, 'my_pipeline')

def make_pipeline():  
    mr = MeanReversion(window_length=20)  
    shorts = mr.top(10)  
    longs = mr.bottom(10)  
    securities_to_trade = (shorts | longs)

    return Pipeline(  
        columns={  
            'longs': longs,  
            'shorts': shorts  
        },  
        screen=(securities_to_trade)  
    )