handles all the current commands for portfolio and inserts them into the investment table
merged with main