Hi,
At the moment, I get an error message saying “ERROR: Composite node ‘False’ has no inputs”.
Is it possible to only define one-way conditional nodes ?
Given that Portfolio123 allows you to construct a ranking chain with composite and conditional nodes, it seems to me that it would make perfect sense to allow one-way conditional nodes (i.e that only target a true or false outcome).
Most programming languages I know of are able to do a simple if() test the contents of which are only executed if true (or false).
Similarly would be nice to be able to do elseif clauses too (but that’s more of a feature request I guess).
Thanks !
Tim
Tim,
The P123 IF() statement is the Eval function which can be found in the Help files (copied below).
Denny
Eval(condition,expr1,expr2)
Executes expr1 if the condition evaluates to non-zero, or expr2 otherwise. See Full Description for examples of the many uses of Eval()
Category
MISC / UTILITY
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)
Interesting. Thanks Denny !