Avg%Ret Rank

I noticed this while viewing the Stock tab. P123 has shown an historical list in order of return for sector/industry/stock.

I can’t seem to figure out how to include this as a buy rule? Say I wanted to only buy stocks in the top 50% of sectors or industries within the past 3mths. How would I go about setting up that syntax?

Also how would I set this up in my own ranking system so that I could include a weight to reward top performing sectors/industries?

you can use the following buy rule for top 50% of industries:
frank(“Pr13W%ChgInd”)>50

cheers, Z.

Not exactly. We still have not added precise functions for industries and sectors. All functions operate on the stock being examined or the universe of stocks so the function

frank(“Pr13W%ChgInd”)>50

does the following:

It sorts the values of the industry return in descending order and assigns a rank to the stock based on percentiles. However since the stocks in an industry all have the same value they will get the same rank. The problem is that industries have different number of constituents so the “step” in ranks from one industry to another varies.

A better workaround (but still complex because we’re trying to use something not designed specifically for this) is to use FOrder and the ‘distinct’ parameter. See the Full description for FOrder, there’s an example at the bottom:

FOrder(“Pr13W%ChgInd”,#all,#desc,#universe,true)<=3

These returns the top 3 industries based on 13 week price change. Change this to <= 51 to get the top 50% industries (since there are 102 industries in reuters taxonomy)

Again, this is a workaround and there’s nothing for sectors. We need to introduce industry specific functions.