One of the things you may want to consider before updating any tables is do you want an audit trail or history of the transaction. If so you are going to need a stock transaction table that will list the ins and outs of stock units.
You can then run a query on this table to do a count of each stock line.
You don't have to do this with three tables necessarily. You can do it with one table only and one view.
The table would be transactions, the view what stocks you own right now. I have submitted an example of how you could do. To buy/sell stocks, enter the transactions into the table - the name of the stock, uncheck the "buy" checkbox if you sell, and enter the amount. The view will tell you what you have right now.