Issue of Int object is not iterable
First of all, wonderful contribrituion to solve portfolio optimization using GA!
During implementation, found issue with 'int object is not iterable' while executing next_generation in Task#10. Saw issue duteto sum(chk), where chk is an integer variable in the scope and used in sum function, which except list, tuple, dict, or arrey as its input. I applied the fix by removing sum (Original: if sum(chk)>0 Change: if chk>0:) in the next_generation function, however, please verify and fix your code base, or reject if I missed anything in which context fix is not required.
PS: ipython notebook was executed in the google colab environment. After applying the changes, solution works fine as per requirements.
I have a same problem with @sureshgautam I change the sum(chk)>0 to chk>0 just like him, but it made an error in the Arithmatic-crossover at the end of the code. the iteration of the arithmetic-crossover did not end. Can you check it?
i have made same change but assigning negative weights if portfolio returns are negative