'Handles any new position or modification to
a current position, by calling the respective
_add_position and _modify_position methods.
Hence, this single method will be called by the
PortfolioHandler to update the Portfolio itself.'

def transact_position(self, action, ticker, quantity, price, commission):

    if (action == 'BOT'):
        self.cur_cash -= ((quantity * price) + commission)
    elif (action == 'SLD'):
        self.cur_cash += ((quantity * price) - commission)
    if (ticker not in self.positions):
        self._add_position(action, ticker, quantity, price, commission)
    else:
        self._modify_position(action, ticker, quantity, price, commission)
