Hey Guys,
I am trying to get my algorithm to cover positions that it has entered into 10 trading days after it opened the position. I tried this using
context.holding_time to create an empty dict. Then I added securities that I have entered into as a key with a value of zero and added to that value in the rebalance function until it gets to 10 then close the position. This doesn't seem to work as the backtest results aren't indicative of it following this pattern. I'd appreciate any help with this that you guys can offer, this has had me scratching my head. Thanks!