Hi Community:

I'm backtesting a very basic mean-reversion stock strategy (see below), which generates insights on every Monday and lasts for 5 days.  I expect the strategy to rebalance weekly.  However, when I check the backtest results, I find that tradings happen throughout the week.  How can this happen, given that new insights are only created on Mondays?

How should I revise the algorithm in order to achieve strict weekly rebalancing?  Thanks.

 

Author