Dynamic Node Weights. Possible or No?

I’m interested in knowing if there is a method to dynamically set a node weight in a ranking system using a formula inside the node…

Haven’t found anything suggesting its possible so thought I would ask the group. Thanks

Steve

I can show you how to do two different preset weightings but beyond that is near impossible.
Steve

I would appreciate that Steve if its not too much trouble :slight_smile: , its a start.

OK - I’ve made an example ranking system public here: https://www.portfolio123.com/app/ranking-system/266421

I don’t make any claims that it is a good design. It was created to illustrate how to switch between two sets of weights.

You need to start by using a conditional node with an impossible condition, something that will never be true. I used Month>13.

Then in the true part of the condition you need to define the two nodes you want to switch between. In this example the two nodes are quite simple. The first is 70% Value (P32BookQ) and 30% Growth (Sales3YCGr%). The second node has the weightings reversed. Note that the weights have to sum to 100% or you will get an error.

The True portion of this conditional will never be executed but allows you to define the nodes or mini-ranking systems if you want to call them that. You can define as many nodes in this section as you want.

Now moving down to the False part of the conditional node… I’ve defined another conditional node, this time to switch between the two mini-ranking systems. For the True/False condition, the strength of the S&P pure value is compared to pure growth. If True then the “Value 70 / Growth 30” node is selected using the NodeRank function. Similarly for the False condition the “Value 30 / Growth 70” node is selected using the NodeRank function.

Normally I would differentiate between the node definition at the top and the call-up at the bottom by naming the top one “Def Value 70 / Growth 30”. I forgot to do so and since I’m already finished with this post I decided not to go back and edit it.

You can do more than two mini-ranking systems, but the logic at the bottom becomes more complex. I hope this helps.

Steve


1 Like

Yes, this is fantastic. I was about to dive into conditional nodes and this gives me a great head start.

I wonder if there is any limit to nesting conditional nodes?

Seems to me that not many members are really pushing the limits of P123 as you are, and I know I am. I search the public screens, rankers, etc and few if at all are using the advanced functions. At least if they are, they are not public.

Thanks for the direction!

-Steve

I’ve done each sector separately by dividing in half, and half again,… It takes a few nested conditional nodes. But it becomes very confusing.
Steve

This is close. I still need to find a way to pass a weight% to the node. Your example has hard coded weights. I’m thinking with enough if/thens built in I can pull this off.

Instead of a whole bunch of conditionals, you could try something like this as a node:

ANodeRank(“Node1”)+BNodeRank(“Node2”)+C*NodeRank(“Node3”) …

Where A, B, C, … are calculated weightings of some sort. (I’m not sure what you had in mind for the weight variables.)

Steve