Formula fore scaling out?

I tried to look around the forum for a good formula for scaling out of a positions. Do anyone have any they could share?

Lets say you want to sell out 1/3 of the position fore each 5-point drop in the ranking.

I saw this (Re-balance scaling - #4 by StockTrader8) But it dosent contain any rule.

Something like this: RankPos> 40 and nodays > 13 or Eval(10 - RankPrev(1) & Weight>2, 0.5,0) ?

What am I doing wrong?

The whole idea is to scale out 1/3 of a position for every 10 rank reduction.

Sell the whole position if its under rankpos 40, or if the rank position is 10 lower than the previous week sell 1/3 if the position is more then 2%:

RankPos> 40 and nodays > 13 or Eval(10 - RankPrev(1) & Weight>2, 0.3,0)

Instead, I'm getting an enormous turnover:

image

It seems the problem here is operator precedence. OR has higher precedence than AND, so you will need to add parentheses.

(RankPos> 40 and nodays > 13) or Eval(10 - RankPrev(1) & Weight>2, 0.5,0)

Thank you, but I'm still getting a turnover of more than 3500% when using the rule you gave ?!:

10 - RankPrev(1) is always going to be true. What did you want to do here? Basically, you're selling half of every stock with a weight greater than 2%.

It was supposed to scale out of a position when the points in rankpos falls with 10 points.

So the main rule is to sell the whole position if RankPos> 40 and nodays > 13, but if that criteria is not met, it was supposed to sell out 50% of a position if it was over 2% and had fallen more than 10 rankpos the last week.

Are there other scale-out rules that make more sense than I can try?

Hmm. While I don't know what "points in rankpos" means, I'm guessing that you want RankPos - RankPosPrev(1) > 10 instead of 10 - RankPrev(1), right?

Yes! Thank you, that seemed to work but did not improve the overall performance.