Possibility with the New "Days" functions

Hi, I would like to create a filter (very simple) that counts if the number of months that the return of an ETF has been higher than the benchmark is above X.
I would expect to use the LoopSum and some of the new functions, but I’m struggling in how to get it.

Do you have any idea?

thanks in advance.

This is not precise in terms of months, but let’s say you take 22 weekdays as a month and you’re looking for ETFs that have outperformed the S&P 500 in 9 out of the last 12 months. The formula would be LoopSum("Close_D(Ctr)/Close_D(Ctr+22) > Close_D(Ctr,$SP500)/Close_D(Ctr+22,$SP500)",12,0,22) > 9

I hope this helps. If you need a rule that only considers the first trading day of the calendar month, that’ll take a little more work on my part . . .

Hi Yuval, Thank you very much.
I understand that functions like Close_W for months, won’t be available?

This helps. Nevertheless, let me know how you would approach to have it for closing months, and I’ll try myself.

thank you

Well, we’d need the Close_M function, which we haven’t created yet. But it’s in the pipeline.