Possible to use Rotational only once per month with weekly data?

I have the beginnings of a long-only system that uses weekly data. I would like to check for trend violations weekly to exit any holdings that no longer pass my check for an uptrend but I would like to adjust or add new positions each month based on a ranking of momentum. Goal is to reduce turnover (momentum check monthly) but limit drawdowns (trend check weekly).

I've read the KB examples on Rotational Trading but I'm having hard time constructing this.

Any guidance you can offer would be much appreciated.

Sure, read the manual

Use scoreNoRotate to prevent rotation.

NewMonth = Month() != Ref( Month(), -1 );
// rotate only on new month
PositionScore = IIF( NewMonth, your_position_score, scoreNoRotate );
1 Like

Will the use of a sell command to exit securities that violate the trend conditions as I mentioned above cause a conflict with EnableRotationalTrading()?

Thanks for the quick response, Tomasz, and the stellar application!

The manual clearly states not to do that!

Did you read the manual from the link provided to you?

Yes, which is why I asked the question above.

My original issue is that I would like to check weekly (using weekly data) for any trend violations and EXIT those securities where they occur. Then once per month, rank securities and exit any that fall below the minimum rank as well as add any new securities that meet the ranking criteria. In other words, "rotational trading".

I've read multiple examples using rotational trading including the online manual and can't figure out how this should be done.

Would it be sufficient to set the rank for any owned securities that violate the trend criteria to some very low number (e.g. -1000) to force an exit but do so only during the weeks when not adding new positions? Then have a different set of rules for the monthly ranking such as momentum after the trend check is passed?

Any examples others can share would be helpful.

When you are using Rotational Trading, you have to embed your conditions into PositionScore.
If you want to stop rotation, use scoreNoRotate, it will prevent ANY rotation and any exits except stops generated by ApplyStop

As it is explained in the manual:

  1. if you are using Rotational mode you do NOT use Sell = statement
  2. positions are ranked according to ABSOLUTE VALUE of position score, so large negative value is not forcing an exit. It is strong SHORT ENTRY signal

Please read the manual carefully.

Extra Exits/Scaling in addition to rotational backtest can be implemented as shown in the Knowledge Base

Ahhhh. Back to the CBT then.

Thanks very much for the example, Tomasz. I think that will be helpful and keep me busy for a while.

Blessings to you and yours!

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.