LoopSum Formula Error

Can someone tell me why the following LoopSum formula is giving me an error.

I’m trying to screen for stocks where YoY EPS growth for the most recent quarter has exceeded YoY EPS growth for the previous quarter in at least 4 out of the last 5 quarters.

Here’s the formula I tried:

LoopSum(“EPSExclXorGr%PQ(CTR)> EPSExclXorGr%PYQ(CTR)”,5)>=4

Unfortunately, I get the following error message:

ERROR: Invalid criteria in Rule 1. Error near ‘)’: Too many parameter

Any ideas?

Hi Harry. There is no way to use EPSExclXorGr%PQ in loopsum. You have to write out the formula for the growth calculations. The first line is the LoopSum statement. The rest can be pasted into the screener if you want to test out the LoopSum.

LoopSum(“(EPSExclXor(CTR,QTR)/EPSExclXor(CTR+4,QTR))/abs(EPSExclXor(CTR+4,QTR)) > (EPSExclXor(CTR+1,QTR)/EPSExclXor(CTR+5,QTR))/abs(EPSExclXor(CTR+5,QTR))”,5) >= 4

showvar(@t1, 100* (EPSExclXor(0,QTR)/EPSExclXor(4,QTR))/abs(EPSExclXor(4,QTR)))
showvar(@t2, 100* (EPSExclXor(1,QTR)/EPSExclXor(5,QTR))/abs(EPSExclXor(5,QTR)))
showvar(@t3, 100* (EPSExclXor(2,QTR)/EPSExclXor(6,QTR))/abs(EPSExclXor(6,QTR)))
showvar(@t4, 100* (EPSExclXor(3,QTR)/EPSExclXor(7,QTR))/abs(EPSExclXor(7,QTR)))
showvar(@t5, 100* (EPSExclXor(4,QTR)/EPSExclXor(8,QTR))/abs(EPSExclXor(8,QTR)))
showvar(@t6, 100* (EPSExclXor(5,QTR)/EPSExclXor(9,QTR))/abs(EPSExclXor(9,QTR)))


%(EPSExclXor(0,QTR) , EPSExclXor(4,QTR))

is exactly the same as

100* (EPSExclXor(0,QTR) - EPSExclXor(4,QTR))/abs(EPSExclXor(4,QTR)