Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Why doesn't my algo trade for the first 3 years?

Hi, for some reason my algo isn't trading for the first three years. The weird thing is, when I change the number of shorts and longs from 15 to 25, it begins making trades immediately. Can someone please explain what is happening?

1 response

@Michael

Try replacing in make_pipeline ()

    shorts = factor.top(15)  
    longs = factor.bottom(15)  

to

    shorts = factor.top(15, mask = universe)  
    longs = factor.bottom(15, mask = universe)