Why doesn't this rule work?

What is the problem with this logic in the screener:

I was trying to get "relative returns, 750 days (3 years) vs benchmark, one year ago.

I haven’t tested this and I have to look up specific code syntax, but here’s something to try:
It looks like you want to take the change in your stock at1y ago vs 3y ago; divided by the change in SPY at 1 yr ago vs. 3 yr ago.
Also looks like you want stocks that have underformed the SPY over that period by more than 20%

If so, maybe try something like this:
(Close(250)/Close(750)) / (Close(250,$SPY)/Close(750,$SPY)) < 0.8

What you’re actually getting is the number of stocks for which the following rule is true: the S&P’s returns are less than -20%. The series qualifies the entire rule. What you need is Rel%Chg, although that does not take an offset. Or use SpacemanJones’s suggestion.

thanks for helping as I learn to think through this. How could I avoid having negative signs during the performance period? Also, by using Close, it would not account for stock splits, correct?

Close() is adjusted for splits and dividends. My understanding is Price() can be used if you want price data unadjusted for splits/divs. But do test that because I don’t work with that kind of data often.

I keep this reference link bookmarked and refer to it often. It often has decent examples and descriptions of particulars of the available functions:

https://www.portfolio123.com/doc/doc_index.jsp?cids=&vocabType=