My friends and I have created this algorithm in an attempt to learn more about algorithmic trading. We have some limited familiarity with Python very little knowledge about algorithmic trading. We would like to make our algorithm more consistent and get rid of the context.simplerating variable to make it so that we can trade stocks based on NetRtg only. We have a basic "momentum reversion" concept, but we would like to know how to make this more consistent. Also, what is the best way to do stop-losses? Is there a way to bypass set_universe and make it so that we can trade a larger range of stocks.