I would like to backtest equity strategies where I'm always fully invested but never using leverage/margin. Take the example below. How can one modify the code in this case?