Eliminating underperforming Industry from a screen

How would I format a buy rule that eliminates a specific industry that under performed the market by 10% or greater in the last 6 months? I am having trouble figuring out how to do it. :frowning:

Larry

Try this: [font=courier new](Close(0, #Industry) / Close(126, #Industry) - Close(0, #Bench) / Close(126, #Bench)) > -0.1[/font]

Aaron, what does close (industry) represent?

[font=courier new]Close(?, #Industry)[/font] accesses the stock’s industry index (generated by us), the same one that can be shown via a checkbox option on the technical chart page. You can also use [font=courier new]#Sector[/font], [font=courier new]#SubSector[/font], and [font=courier new]#SubIndustry[/font] if it better suits your purposes.

If however, max drawdown over a six month horizon is needed, it will take some more doing:
[font=courier new]Min(LoopMin(“Close(CTR, #Industry) / Close(126, #Industry) - Close(CTR, #Bench) / Close(126, #Bench)”, 100, 0), LoopMin(“Close(CTR, #Industry) / Close(126, #Industry) - Close(CTR, #Bench) / Close(126, #Bench)”, 26, 100)) > -0.1[/font]
[font=courier new]LoopMin[/font] is called twice with the same formula, since it currently limits you to 100 iterations.

Thanks. Both are interesting.

Larry

Aaron, thanks but I am still unsure about what the index represents.
How is it calculated?

I asked, and in a nutshell, it’s a market-cap weighted index of our own devising. It eliminates ADRs, has a minimum share-price restriction of $1, and also has requirements for volumes and dollar-amounts traded.

It also appears to be based on the ‘All Fundamental - US’ universe without regard to the current working universe.

Walter

Interesting. thank you

I think the greater sign (>) in the formula should be reversed (<) otherwise the formula will eliminate outperforming industries.

The original rule is correct. For a buy to occur, the buy rules need to evaluate to True. The given rule will do that for stocks in industries that outperform the benchmark by minus 10% or greater (which is the complement of underperforming the benchmark by 10% or greater).

Walter

While looking into this issue, I noticed that the cross-section commands do not support #Bench as a scope selection. Why is that?

Walter

EDIT: Never mind. After coffee, I realized that P123 doesn’t always have access to an index’s constituent holdings.