scoring system with Binary Subcomponents

I am trying to build a scoring system (like F score), where the components have a value (0,1) based on whether they meet or pass tests (like OPinCTTM > OPINCPTM, for eg.)

Any pointers on how to go about doing this will be greatly appreciated.

Thanks!

In a screen use SetVar.

SetVar(@1,MktCap>2000)
SetVar(@2,ROE%TTM>5)
SetVar(@3,EPS%PQ>EPS%PYQ)
@1+@2+@3>=2

The same sort of thing can be done with custom formulas. The trick is that either a local or custom formula that is an inequality will return 1 if it is true and zero if it is false.

By the way, you can also do this sort of thing briefly in a single rule if your scoring system is small enough. I nearly always turn to SetVar or custom variables just because you’ll quickly hit the character limit in a single rule:

(MktCap>2000)+(ROE%TTM>5)>=1

Conditional Nodes in Ranking systems may be what you’re looking for.

In a ranking system you can use Eval for that, something like
Eval(OPinCTTM > OPINCPTM,1,0)+Eval(ROI%TTM>0,1,0)+Eval(SalesTTM>SalesPTM,1,0)
or
For shorter calcs I think something using just the operator will work and evaluate to 0 or 1, for example I think the rating rule could be used to
OpIncTTM>OPINCPTM + ROI%TTM>0 + SalesTTM>SalesPTM

I didn’t test the calcs, but I’m pretty sure I’ve used the latter construction before (edit) in both ranking systems and custom formulas.