I have a complicated formula for intrinsic value that takes into account whether a stock is in the financial sector or not. If it's in the financial sector it uses cost of equity, and if it's not it uses cost of capital. Then I create a conditional node with the condition being "sector = financial." The True node is $intrinsicvalue/mktcap and the False node is $intrinsicvalue/ev.
When I run this, to my surprise, the top-ranked stocks are mostly in the financial sector and the bottom-ranked stocks are mostly not. I had thought that with conditional nodes the stocks are ranked entirely separately, which would evenly space all the financials among the non-financials, but that's clearly not the case. It's not a matter of N/A handling as only about 2% of the stocks are N/A.
If instead of a conditional node I just use Eval(Sector=Financial, $intrinsicvalue/mktcap, $intrinsicvalue/ev), I get quite different results and the top-ranked stocks are more evenly spread between sectors. But you can't really compare the two ratios, so the Eval formula is incorrect.
So I ran a screen to see exactly what was happening and this is what I found.
Each of the sub-nodes ranks ALL stocks according to the rule in that subnode. The final ranking then consists of the rank in the subnode that pertains to the condition.
So, for example, Passage Bio, a biotech, ranks highest in the non-financials. But there are bunch of financial stocks that rank higher than Passage Bio in the $intrinsicvalue/ev ratio. That fact should be irrelevant, since you don't use EV numbers when looking at financial companies, and it's very clearly not what I specified.
So the conditional ranking takes into account a huge amount of entirely irrelevant data.
There's no easy fix for this, as far as I know. I tried this: in the True node, use Eval(Sector=Financial, $intrinsicvalue/mktcap, NA); in the false node, use Eval(Sector=Financial, NA, $intrinsicvalue/EV), and use NAs neutral. But then all the financial stocks are near the top and bottom of the rankings, which are 50% financial and 50% non-financial, and the middling stocks have no financials at all. If you rank by sector, you get the right distribution of financials and non-financials, but outside of the financial/non-financial distinction, I'd rather favor high intrinsic value to EV stocks regardless of sector. Using FRank, even with #exclna, makes no difference.
If anyone knows of a workaround, I'd appreciate hearing from you.
