Hi Leon,
Click on advanced settings and change your rebalance band from 50% to 2% and you will get the results below.
The rebalance band is the threshold which allows the weight of each stock to vary from the target weight.
For example, if you have 10 stocks in the portfolio, each stock should have a weight of 10%. Your rebalance band of 50% means that you will not rebalance the weights unless the stock's weight exceeds 50% of the target weight of 10% when it goes above 15% or below 5%. Because of this large tolerance level, it results in negative cash as the algorithm expects the weights of the other stocks to be close to the target weight of 10%.
Do let us know if you have further questions.
Kind regards,
The PyInvesting Team