Rebalance on first trading day of the year

Similar to the question posed in this thread, https://www.portfolio123.com/mvnforum/viewthread_thread,7652#38886, I’d like to know how to set the rebalance to the first trading day of the year.

I would like rebalancing to occur on the first trading day of each year. Currently, I have my buy rule set up as “Month = 1 and MonthDay >= 2 and MonthDay <= 5”.

The problem I have now is that:

  1. The strategy would buy the stocks on the 2nd and rebalance every day until the 5th…
  2. Then it liquidates the entire portfolio until next January.

I assume annual strategies are somewhat common. Does anyone have a solution they would be willing to share?

Thanks!

Add NoDays>7 as a sell condition. That way you won’t sell unless you have held more than a week, and hence won’t buy multiple times during the window you have set up.

Steve

Hey Steve,

Thanks for the tip! Now, I’m not sure if it’s something else I have done, but my January 2~5th trading window doesn’t seem to be working properly. With the “NoDay > 7” as a sell condition, the SIM now sells everything on Jan 13/14th. Looking at my buy/sell rules, I don’t think this should be happening.

I’ve attached a screenshot of my rules below.


Do this but do it as: AND NoDays > 7.

Put this at the end of all of your sell rules.

The rule, I think, was probably being executed as a logical OR if you put it on another line: as P123 puts it “(implicit OR).”

Hope that helps

-Jim

William - you are doing your AND’ing correctly, but you have to include the same time window on your sell rule as you have on the buy rule i.e. MonthDay …

And the Rank < 101 isn’t doing anything for you. You can delete that part of the rule.

Thanks guys! I still had some issues after implementing the suggestions so I reached out to P123 for support. Now everything is working exactly the way I wanted it to.

For anyone trying to implement a SIM with an annual rebalance that trades on the first trading day of the year, this is what you have to do:

  1. Set rebalance frequency to “Weekly”
  2. Set allow immediate buy back to “yes”
  3. Set Force positions into universe to “yes”
  4. Set up the buy rule as: Month = 1 & MonthDay >= 2 & MonthDay <= 7
  5. Set up the sell rule as: Month = 1 & MonthDay >= 2 & MonthDay <= 7 & NoDays > 355

I guess the 355 day is overkill but that’s ok…Now it’s bulletproof.

William - this should work with daily rebalance, no reason why you can’t get the actual first day instead of the first day of the week in the new year. However, with daily rebalance you wouldn’t be able to take advantage of the auto-rebalance… you would have to rebalance manually every night.

Steve