Corrections to investment.py

Also needs to be implemented in trade.py.