Hi everyone,
So I am doing a backtest on XIV based on the VIX.
I would like to set a holding period of maximum 21 days, however, the code seems not to work and I am not sure why.
In lines 55 to 58 I defined the maximum holding period and in lines 189 to 200 I want to sell the position if it has ben bought more than 21 days ago.
Could maybe anyone give me a hand?
Thank you so much