Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Newbie - zscore and index deviation

Hi I am new to Quantipian and python programming.

I have used Stratasearch for some time, but wondered if I could try and translate a profitable system that I use. Can anyone help.

Bottom line, it is based upon the standard deviation of a stock relative (above its 200 day MA) to it's own underlying index, and filtered with bollinger band and Williams%R with entry when the z-score is lower than -2 and exit signal when z-score is greater than -1. Other exit is trade is greater than 20 days.

It has a similar effect like bollinger band when it deviates outside the top or lower bands, but I find it much more violent to snap back in line with the underlying index using this approach

I don't know much about Python - but below is my Statasearch.

here Can anyone see how this runs on Quantopian?

Thank you!

2 responses

Hi Jason,

Here is a draft version of your system. It triggered only one trade as I most probably messed something up.
Please, look at it, run it, look at the log output and try to find what I did wrong. And please don't hesitate to ask questions about the code.

Regards,
Ed

This is great. Thanks Ed. I was trying to expand on this to remove bias on selected stock, I have played with Set_Universe but I have hit a brick wall. Ideas?