Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
New to Quantopian and Pipelines

I am brand new to this site and to python. I'm not new to coding but I need help getting started. I want to create a list of yesterdays top percent gainers using pipeline but cant quite it to work. Im not even sure if I should be using pipeline for this. Any help would be awesome thanks.

1 response

Can you attach a backtest?

Maybe try something like this. More: https://www.google.com/search?q="class+momentum"+site%3Aquantopian.com
Use .top() and .bottom() in pipeline and/or add the values and then sort/filter them in the dataframe coming from pipeline output.

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