Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Rate of Change Screener

Hello Quantopian Community!

Total newb here.
Wanting to do something pretty simple and thought there might be existing code to get me close. I can modify from there.

I want to scan US equities for one of two monthly rate of change patterns.

(pattern 1) month 2 rate of change > month 1 rate of change AND month 3 rate of change < month 1 rate of change -or-
(pattern 2) month 2 rate of change < month 1 rate of change AND month 3 rate of change > month 1 rate of change

Notes:
Rate of Change Calculation = [(Close - Close n periods ago) / (Close n periods ago)] * 100
For my purposes, "close" = closing price on the last day of the month and "n periods" = 30 months

I just need code that pulls historic closing data, does the ROC calc then, returns the above patterns. So, is there something out there that gets me close to this?

Thanks in advance for any help you can provide!