public void sellStock(String symbol, int quantity)
			throws StockNotExistException, IllegalQuantityException {
		boolean sellStock = false;
		int stockSymbolIndex = 0;

		// the quantity is invalid
		if (quantity == 0 || quantity < -1) {
			throw new IllegalQuantityException();
		}

		// find stock's index to sell
		for (int i = 0; i < portfolioSize; i++) {
			if (symbol.equals(this.stocksStatus[i].getSymbol())) {
				sellStock = true;
				stockSymbolIndex = i;
			}
		}
		// the symbol dosen't exists at stocks's array
		if (sellStock == false) {
			throw new StockNotExistException(symbol);
		}
		// sell all quantity
		if (quantity == -1
				|| quantity == stocksStatus[stockSymbolIndex].stockQuantity) {
			quantity = this.stocksStatus[stockSymbolIndex].stockQuantity;
		}
		// the client asks to sell more stock than he have
		if (stocksStatus[stockSymbolIndex].stockQuantity < quantity) {
			System.out
					.println("you ask to sell more stock then to actually have, all the quantity sell");
			quantity = this.stocksStatus[stockSymbolIndex].stockQuantity;
		}
		// Regular sale
		updateBalance(quantity * this.stocksStatus[stockSymbolIndex].bid);
		this.stocksStatus[stockSymbolIndex].stockQuantity -= quantity;
	}