Thank you Anthony for the note. I agree to an extent that in order to achieve balanced portfolio, one must include more assets than there are in the above portfolio. In the regards, I aim to consider it as a sub portfolio of a larger portfolio which certainly would have assets more than 20. With that said, I also believe the optimal number of assets in an portfolio is an subjective matter that also depends on the targeted growth one is seeking for.
I will certainly explore more about the on/off switch approach and update my findings in the post. Also, thank you for pointing out about a deprecated, I will update the code.