Back to Community
New to python and quantopian: How to count consecutive days

Hello,
I would like to learn how to count consecutive days. E.g if the spy is up for 3 days on the 4th day what is the probability it's a down day? Or if news breaks and the spy sells off, how many days does it take to return back to its previous High? Any help would be greatly appreciated. I cannot figure this out for the life of me.

1 response