Divide rank into percentages instead of values

I was wondering if it’s possible to divide a rank into deciles for example instead of absolute values.

I have a rank that runs off a universe that varies. Sometimes I have 234 stocks to rank and other times 321 etc.

The rank puts the stocks in order but I need to then screen these one more time and for example I need the top 20% of the ranked stocks.

Would rank >= 80 be correct?

Thanks.

You can certainly use Rank >= 80 in the buy rules. However, this may be less useful than you might expect. This is because the sim or port automatically picks the highest ranked stocks anyway. Some use this as a type of market timing because with other buy rules it can function to limit the number of holdings under certain market conditions.

You might also look at Rating (“secondary ranking system”) >= 80. This gives you a buy rule that is separate from the ranking that will occur with or without the buy rule anyway.