I’ve been digging around the forums and think I’ve pieced together what I’m trying to do. The goal is to set a custom universe that only includes the blended avg of the top quartile in price to sales and ev to ebitda. Without being able to use the rating function this is kind of tricky for a novice on the platform. Here is the code I’ve written:
I think I would do it that way, too, with one exception. The default FRank sort order is #DESC. I would change the order to #ASC since lower is better for the metrics you chose;
In a ranking system there’d be an additional ranking. That is, you get the two ranks, then get an average as a raw score and then rank that raw score again. This will give you 25% actually passing, whereas your rules as presented don’t.
Just following up here. I’m utilizing this new universe in a simulation that aims to screen out expensive stocks and buy based on momentum. With very minimal optimization the simulation is at 28% annualized returns with annualized turnover under 150%. Will be turning this live within the next couple of weeks. Thanks again.
I am receiving an “ERROR: Value not set for temp variable @RankS uid 27582” error. What is wrong with these rules?
SetVar(@RankS, FRank(“Sales%ChgTTM”, #All, #Desc))
SetVar(@RankY, FRank(“Yield5YAvg” , #All, #Desc))
FOrder(“Avg(@RankS, @RankY)”) <= 20
EDIT: I tried this with a custom formula instead, and the error is: “ERROR: Could not find uid 27582 in function FRank – map size is 0”. Hope that helpd to debug.