strange buy/sell difference

I am running a 20 position portfolio with no buy rules (buys top 20 ranked stocks) and selling when rankpos > 20.

i get some buy/sell difference transactions. I have immediate buy back enabled.

I am trying to see why these stocks would be bought back if the ranking position is greater than 20

All advice welcome. Thank you

Allow mergers?

Mergers will count in the rank pushing the rankPos down (perhaps below 20) for a stock. But when the port looks for stocks to buy it will bypass the stock set to merge: buying a stock ranked, say, 21.

May not be it, obviously.

-Jim

Thanks for responding. Allow Mergers is set to no

You have a conflict in your buy and sell rules where they don’t mirror each other or there is an inconsistency in how a stock is sold and then instantly bought back for some reason because the buy rules did not take into consideration the sell rules. Your buy rules should always be tighter than your sell rules. Or at least the negation of it. That always fixes the problem for me. I think that is why it is called buy/sell difference.

But David, he says he HAS no buy rules, and the only sell rule is rankpos > 20. I think Jim’s explanation is the correct one. If “Allow Mergers” is set to 0, then highly ranked stocks that are on the verge of being acquired will not be bought, and the system will buy the 21st ranked stock.

Vineeta,

Allow mergers set to no acts as an unseen buy rule (or it is just not in the usual place).

David’s advice can solve the problem (whatever is actually causing it), I think.

Buy rule: RankPos =< 20.

You might end up with just 19 or 18 (maybe less at times) stocks but with a 20 stock portfolio maybe that is not a problem.

-Jim

Yuval, his not having any buy rules could be causing the problem. As I said: Your buy rules should always be tighter than your sell rules. Or at least the negation of it.

crastogi, what portfolio are we talking about?

you were right. thanks much!