Print Page  
MISC / UTILITY
Eval(condition,expr1,expr2)
Full Description
Eval() can be used in many different ways.

To use an alternate criteria when NA's exist.

For example if you want stocks with PE < 20 , but when PE is NA (Not Avalaible) allow stocks with Price to Sales < 5, use the following rule:

Eval( PE = NA , Pr2SalesTTM < 5 , PEExclXorTTM < 20 )

To trim a position that gets too large in a Portfolio

SELL rules sell a position when any of the rules evaluates to TRUE, or 1. But a little known feature allows you to sell a portion of a position if a rule evaluates to a number between 0 and 1.0. For example to sell half a position if the weight exceeds 30% of the portfolio, and do nothing otherwise, enter the following SELL rule:

Eval(Weight>30, 0.5, 0)