Hi all

I would like to rebalance my portfolio at every start of the month. However, I have noticed that if the start of the month happens to be on a weekend/public holidays, the rebalance will not occur. How can i code my algorithm in a way that if the start of the month happens on a non-trading day, the algorithm should not skip the rebalancing part for the month but rather rebalance on the next trading day?

Thank you! Appreciate all your help here.