I was reading an article titled A simple statistical edge in SPY and decided to hack together a quick test of the authors idea.

He states:

General theory - After a period of consecutive losses, many traders will liquidate their positions out of fear for even larger loss. Much of this behavior is governed by fear, rather than calculated risk. Smarter traders come in then for the bargains.

Hypothesis: Next-day returns of SPY will show an upward bias after a number of consecutive losses.

I thought this would be fun to play with and would enjoy feedback on both the idea and my implementation. I've also included a variable to control the number of days of consecutive losses.