Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Changing factor constraints based upon market conditions

I am new to the quantopian framework and APIs.

Based upon market conditions is there a template that someone could provide that changes from a mean reversion to a momentum based strategy?

I am not sure how to implement within the pipeline factors and screening criteria.

I have only seen examples involving a single strategy.

1 response

One way to do this would be to write a single Pipeline custom factor that contains your regime detection code, mean reversion and momentum code. You would do the regime detection first, and then depending on the result, pick either mean reversion or momentum (or maybe a linear combination of the two factors, which would be perhaps a better approach).