Frank Cutoffs

Is there a way to extract the value of a cutoff used in frank? For example, if I filter to “frank(“mktcap / BookValQ”) < 20” can I find out what the value of mktcap / BookValQ is at the 20th percentile?

See my feature request “FMin(), FMax() and others to augment existing cross-sectional functions”.

Particularly this feature: FPercentile("Formula", k, [,scope, excl_zero])

for your specific example - run it in a screener with your desired univ. First rule apply filter followed by ShowVar(@myvar,mktcap/BookValQ) . Read it off in the screen results.
Not sure whether you can create a time series

Not elegant as formula - which I just voted

The FRank cutoff is going to depend on the universe you’re testing. The easiest way I know to do this is to use two lines in a screener:

frank(“pr2bookq”,#all,#desc) > 19 and frank(“pr2bookq”,#all,#desc) < 21
pr2bookq

Press run, then press screen factors, and you’ll see it.

If you want to do this with a formula that’s not encoded quite as cleanly, such as ev/grossprofit, substitute “ev/grossprofitttm” for “pr2bookq” in the first line and in the second line type

showvar(@myvar, ev/grossprofitttm)

This seems to work as a couple of equations:

SetVar(@group,FRank("mktcap/BookValQ")<20.1 and FRank("mktcap/BookValQ")>19.9)
Aggregate("mktcap/Bookvalq",#groupvar,#avg,0)

It’s approximate, but there’s so much going on there that approximate is probably the best that you can do.

Also, I am loathe to look at the bottom of a ranking. There are more than a few data points where the 20th percentile is going to be NA, and this will be meaningless. I think that this is better:

SetVar(@group,FRank("mktcap/BookValQ",#previous,#asc)<80.1 and FRank("mktcap/BookValQ",#previous,#asc)>79.9)
Aggregate("mktcap/Bookvalq",#groupvar,#avg,0)

This may be better since it avoids the sorting problem when BookValQ is negative.

SetVar(@group,FRank("BookValQ/MktCap",#All,#Desc)<80.1 & FRank("BookValQ/MktCap",#All,#Desc)>79.9)

I used #All for scope since I’m not following the need for #Previous.

Walter

You probably want to invert both sides of the sort.

I used #previous out of habit. I use it a lot more than #all in practice.

Yes, both sides! That’s a typo! I’ll go back and make the fix. Thanks.

EDIT: Fixed!

Thanks everyone! Voted on the feature request. For now showvar after filtering on both sides looks like the best option.